Segmentation fault and no module named onboard

Bug #1067797 reported by David López
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Onboard
Fix Released
Undecided
Unassigned

Bug Description

Hi. I use 64bits archlinux and today I've updated my system and onboard refuses to work. I recceive this error

Traceback (most recent call last):
  File "/usr/bin/onboard", line 12, in <module>
    from Onboard.Exceptions import chain_handler
ImportError: No module named 'Onboard'

I used a onboard trunk version built by myself. Changed to the current 0.98.1 from arch repo and now the error message is more cryptic

[1] 726 segmentation fault (core dumped) onboard

I've tested with lots of different onboard versions (0.98.0, 0.98.1 and 2 different trunks), some of them from Arch's repos and some of them built by myself (using Arch's PKGBUILD's) and the pattern was the same: all the onboard version built BEFORE the update give the no-module error, all the versions built AFTER the update give the segmentation fault.

Probably it is not an onboard bug, it seems pretty obvious that some updated package broke onboard, and maybe downgrading that buggy package will make onboard work again. However there are too muck packages to test blindly. Those were today's modified packages:

[2012-10-17 14:40] removed python-mechanize (0.2.5-2)
[2012-10-17 14:40] removed python-imaging (1.1.7-4)
[2012-10-17 14:40] removed python-notify (0.1.1-11)
[2012-10-17 14:40] removed python-simplejson (2.6.1-1)
[2012-10-17 14:40] upgraded bzr (2.5.1-1 -> 2.5.1-2)
[2012-10-17 14:40] upgraded python2-cssutils (0.9.9-2 -> 0.9.9-3)
[2012-10-17 14:40] upgraded python2-cherrypy (3.2.2-1 -> 3.2.2-2)
[2012-10-17 14:40] installed python2-mechanize (0.2.5-3)
[2012-10-17 14:40] upgraded python2-lxml (2.3.5-1 -> 3.0-1)
[2012-10-17 14:40] installed python2-imaging (1.1.7-5)
[2012-10-17 14:40] upgraded sip (4.13.3-2 -> 4.14-2)
[2012-10-17 14:40] upgraded python2-sip (4.13.3-2 -> 4.14-2)
[2012-10-17 14:40] upgraded python-dbus-common (1.1.1-1 -> 1.1.1-2)
[2012-10-17 14:40] upgraded python2-dbus (1.1.1-1 -> 1.1.1-2)
[2012-10-17 14:40] upgraded pyqt-common (4.9.4-2 -> 4.9.5-2)
[2012-10-17 14:40] upgraded python2-pyqt (4.9.4-2 -> 4.9.5-2)
[2012-10-17 14:40] upgraded python2-psutil (0.6.1-1 -> 0.6.1-2)
[2012-10-17 14:40] upgraded calibre (0.9.2-1 -> 0.9.2-2)
[2012-10-17 14:40] upgraded hplip (3.12.10.a-2 -> 3.12.10.a-3)
[2012-10-17 14:40] upgraded python2-xdg (0.23-1 -> 0.23-2)
[2012-10-17 14:40] installed python2-notify (0.1.1-12)
[2012-10-17 14:40] upgraded ibus (1.4.2-1 -> 1.4.2-2)
[2012-10-17 14:40] upgraded pygobject-devel (3.2.2-1 -> 3.2.2-2)
[2012-10-17 14:40] upgraded pygobject2-devel (2.28.6-6 -> 2.28.6-7)
[2012-10-17 14:40] upgraded python (3.2.3-3 -> 3.3.0-1)
[2012-10-17 14:40] upgraded python-cairo (1.10.0-1 -> 1.10.0-2)
[2012-10-17 14:40] upgraded python-dbus (1.1.1-1 -> 1.1.1-2)
[2012-10-17 14:40] upgraded python-distutils-extra (2.32-1 -> 2.37-1)
[2012-10-17 14:40] upgraded python-gobject (3.2.2-1 -> 3.2.2-2)
[2012-10-17 14:40] upgraded python-virtkey (0.61.0-1 -> 0.61.0-2)
[2012-10-17 14:40] upgraded python2-crypto (2.6-2 -> 2.6-3)
[2012-10-17 14:40] upgraded python2-distribute (0.6.28-1 -> 0.6.28-3)
[2012-10-17 14:40] upgraded python2-distutils-extra (2.32-1 -> 2.37-1)
[2012-10-17 14:40] upgraded python2-gobject (3.2.2-1 -> 3.2.2-2)
[2012-10-17 14:40] upgraded python2-gobject2 (2.28.6-6 -> 2.28.6-7)
[2012-10-17 14:40] upgraded python2-httplib2 (0.7.4-1 -> 0.7.6-1)
[2012-10-17 14:40] upgraded python2-pyinotify (0.9.3-2 -> 0.9.3-3)
[2012-10-17 14:40] upgraded python2-pyopenssl (0.13-1 -> 0.13-2)
[2012-10-17 14:40] upgraded python2-virtkey (0.61.0-1 -> 0.61.0-2)
[2012-10-17 14:40] upgraded python2-zope-interface (3.8.0-1 -> 4.0.1-1)
[2012-10-17 14:40] upgraded system-config-printer-common (1.3.11-1 -> 1.3.11-2)
[2012-10-17 14:40] upgraded system-config-printer-gnome (1.3.11-1 -> 1.3.11-2)

Any idea of the wrong package? Maybe ibus? Thanks

Revision history for this message
marmuta (marmuta) wrote :

Try running in the debugger:
$ gdb --args python3 /usr/bin/onboard
gdb$ r
wait for the segfault, then:
gdb$ bt
the topmost entries in the backtrace should hint at which modules are involved in the crash.

Revision history for this message
David López (david-lopez-upct) wrote :

Thanks. I've done what you said but honestly I can't understand anything from the display results. It's a bit long, I uploaded to http://pastebin.com/xXgCxSX1

Do you have any idea of what's going on?

Revision history for this message
marmuta (marmuta) wrote :

It segfaults somewhere in gobject introspection code. On Ubuntu this is the package python3-gi. It would perhaps help to install debug symbols and re-run it in gdb to get symbols for the topmost two entries of the stack. On Ubuntu the symbols are inpython3-gi-dbg. I guess the Arch package is python-gobject-dbg or something.

I've removed the unrelated packages from you list, that leaves these:
[2012-10-17 14:40] upgraded python-dbus-common (1.1.1-1 -> 1.1.1-2)
[2012-10-17 14:40] upgraded ibus (1.4.2-1 -> 1.4.2-2)
[2012-10-17 14:40] upgraded python (3.2.3-3 -> 3.3.0-1)
[2012-10-17 14:40] upgraded python-cairo (1.10.0-1 -> 1.10.0-2)
[2012-10-17 14:40] upgraded python-dbus (1.1.1-1 -> 1.1.1-2)
[2012-10-17 14:40] upgraded python-distutils-extra (2.32-1 -> 2.37-1)
[2012-10-17 14:40] upgraded python-gobject (3.2.2-1 -> 3.2.2-2)
[2012-10-17 14:40] upgraded python-virtkey (0.61.0-1 -> 0.61.0-2)

The big thing that sticks out is python itself, apparently Arch just upgraded to python 3.3. That's a first for Onboard, I haven't tried it yet. Will do here and let you know. The second is perhaps python-gobject, it's 3.2.2 there, while Ubuntu's python-gi is at 3.4.0.

Revision history for this message
marmuta (marmuta) wrote :

Nope, python3-gi isn't ready for python 3.3. No segfault here, just import errors, but I can't fix this from Onboard. Are you able to install python3.2 in parallel to the python package? If yes, you can probably run
$ python3.2 ./setup.py build
$ python3.2 ./onboard
or modify the shebang in setup.py, onboard and onboard-settings to read
#!/usr/bin/python3.2

Revision history for this message
David López (david-lopez-upct) wrote :

You are my savior (again). I don't know how to install 3.2.3 and 3.3.0 versions simultaneously. However downgrading python to 3.2.3 and replacing python-cairo-1.10.0, python-dbus-1.1.1, python-gobject-3.2.2 and python-virtkey-0.61.0 to the previous versions (built with phyton 3.2.3 instead of 3.3.0) makes onboard work again. I don't know if the mixture of 3.2.3 and 3.3.0 packages that I have will cause some trouble in the future, but today everything seems fine. Thanks a lot.

Revision history for this message
Balló György (ballogy) wrote :

Using python-gobject 3.4 solves the segmentation fault, but Onboard still fails to run with python 3.3:

Traceback (most recent call last):
  File "/usr/bin/onboard", line 15, in <module>
    from Onboard.OnboardGtk import OnboardGtk as Onboard
  File "/usr/lib/python3.3/site-packages/Onboard/OnboardGtk.py", line 23, in <module>
    from Onboard.Indicator import Indicator
  File "/usr/lib/python3.3/site-packages/Onboard/Indicator.py", line 18, in <module>
    config = Config()
  File "/usr/lib/python3.3/site-packages/Onboard/Config.py", line 148, in __new__
    cls.self = object.__new__(cls, args, kwargs)
TypeError: object.__new__() takes no parameters

Revision history for this message
marmuta (marmuta) wrote :

@György,I think this is fixed in trunk now, though I can't really test it on Ubuntu. I don't even come that far due to python-gi import errors.

Revision history for this message
Balló György (ballogy) wrote :

@marmuta: thanks! I applied your fix, and now Onboard works well with python 3.3 and pygobject 3.4.

Revision history for this message
David López (david-lopez-upct) wrote :

I can also confirm that the stable 0.98.1 release with 1012 and 1013 revisions that György packed for the archlinux repo works with python 3.3 and pygobject 3.4 . I've also built the trunk version and onboard works. Thanks, marmuta

marmuta (marmuta)
Changed in onboard:
status: New → Fix Committed
Revision history for this message
Francesco Fumanti (frafu) wrote :
Download full text (3.5 KiB)

The fix is available in the alpha 1 preview release of Onboard 0.99.0. Thus, I am marking this bug as Fix Released. Please, do not hesitate to reopen it or file a new bug if this problem is still an issue for you.

onboard (0.99.0~alpha1~tr1190-0ubuntu1) raring; urgency=low

  * New upstream alpha release. (LP: #1089396)
    + Fix Onboard becoming empty when system font dpi changes

 -- Francesco Fumanti <email address hidden> Wed, 12 Dec 2012 21:33:43 +0100

onboard (0.99.0~alpha1~tr1188-0ubuntu1) raring; urgency=low

  * Sponsorship request for Ubuntu Raring (LP: #1089396)
  * debian/control: raise virtkey run dependency to 0.63.0 or above
  * debian/patches: refresh patch and change default theme
  * Onboard requires now virtkey >= 0.63.0
  * Add example file with system defaults for the nexus7
  * Various changes to get acceptable speeds on the nexus7 (LP: #1070760)
  * Add docking feature (LP: #405034)
  * Add sliding feature for docking and auto-repositioning
  * Add multitouch support
  * Add a toggle to stop listening to touch events in case of many problems
  * Add popup on long press for key variants like diacritics
  * New option to choose popup vs repeat for keys with variants
  * New gsettings key for the popup delay
  * Make move, frame and touch handles work on the nexus7
  * Perform simulated clicks on correct touch position
  * Auto-release pointer grab after timeout in case nexus7 is unresponsive
  * Fix xserver memory leaking
  * Improve speed when typing and moving the pointer (LP: #1055448)
  * Fix rendering being slowed by emboss effect on keycaps (LP: #890221)
  * Fix for not being able to move/resize Onboard on touchscreens (LP: #959035)
  * Have Onboard respect launcher icon size (LP: #1078554)
  * Auto-show Onboard by clicking already selected text entries (LP: #1078602)
  * Make default shortcut for language/layout work from Onboard (LP: #1078629)
  * New design of the Preferences dialog with more options (LP: #1053496)
  * Disable click buttons when mousetweaks is not installed
  * Add D-Bus service to show and hide the keyboard (LP: 1032042)
  * Don't export dbus service for embedded instances
  * Set NumLock's default sticky behavior to LOCK_ONLY
  * Keep state of NumLock across restarts
  * New attribute in layout files for sticky key behaviour
  * New layout tags key_template and keysym_rule defining keysym-specific labels
  * New window tag for color schemes to define border of popups
  * New layout tag for language specific overrides in the layouts
  * Move common key definitions into template for import by layout files
  * Sync modifier states of Onboard with changes by hardware keyboard or tools
  * Fix keys not re-rendered when releasing latched modifiers (LP: #1069990)
  * Send key strokes for all modifiers (LP: #1067797)
  * Blacklist Ctrl-LAlt+Fn keys by default
  * Add alternative key generation by at-spi2
  * Try to improve struts handling for metacity and mutter
  * Fix getpreferredencoding hack, by Matthias Klose
  * Build for all python3 versions, by Matthias Klose
  * Add work arounds for some problems with the search box of firefox
  * Improve startup sequence to fix Onboard showing up so...

Read more...

Changed in onboard:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.