After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 577649 - deskbar-applet crashes because of GnomeURLopener in deskbar.core.Web on x86_64
deskbar-applet crashes because of GnomeURLopener in deskbar.core.Web on x86_64
Status: RESOLVED FIXED
Product: deskbar-applet
Classification: Deprecated
Component: Core
2.26.x
Other All
: Normal critical
: ---
Assigned To: Deskbar Applet Maintainer(s)
Deskbar Applet Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-04-01 20:17 UTC by Markus Kanet
Modified: 2009-05-01 18:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Test program (177 bytes, text/plain)
2009-04-04 09:27 UTC, Sebastian Pölsterl
  Details
Check value of get_xdg_user_dir in has_requirements method (1.02 KB, patch)
2009-04-04 12:36 UTC, Sebastian Pölsterl
committed Details | Review
backtrace from deskbar crash on x86_64 (6.56 KB, text/plain)
2009-04-05 18:25 UTC, Markus Kanet
  Details
Logfile from python import deskbar.core.Web (16.88 KB, text/plain)
2009-04-07 04:34 UTC, Markus Kanet
  Details
Don't make GnomeURLopener a GObject (3.55 KB, patch)
2009-04-07 14:08 UTC, Sebastian Pölsterl
committed Details | Review

Description Markus Kanet 2009-04-01 20:17:58 UTC
Steps to reproduce:
1. run /usr/lib/deskbar-applet/deskbar-applet -w -d
2. you get an error on x86_64 about 'Argument out of range'
3. 


Stack trace:
$ /usr/lib/deskbar-applet/deskbar-applet -w -d | tee logfile
04-01 22:05:56 root         INFO     Starting Deskbar instance: <gnome.applet.Applet object at 0x1252910 (PanelApplet at 0x12a6000)> None
04-01 22:05:57 deskbar.core.Keybinder INFO     Binding Global shortcut <Alt>F3 to focus the deskbar
04-01 22:05:57 deskbar.core.CoreImpl INFO     Successfully binded Deskbar to <Alt>F3
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Twitter' from file /usr/lib/deskbar-applet/modules-2.20-compatible/twitter.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'identi.ca' from file /usr/lib/deskbar-applet/modules-2.20-compatible/twitter.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Google Search' from file /usr/lib/deskbar-applet/modules-2.20-compatible/googlesearch.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Files, Folders and Places' from file /usr/lib/deskbar-applet/modules-2.20-compatible/files.py.
04-01 22:05:57 deskbar.core.ModuleLoader WARNING  Class EvolutionHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/evolution.py has missing requirements. Skipping.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Yahoo! Search' from file /usr/lib/deskbar-applet/modules-2.20-compatible/yahoo.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Yahoo! Suggestions' from file /usr/lib/deskbar-applet/modules-2.20-compatible/yahoo.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Recent Documents' from file /usr/lib/deskbar-applet/modules-2.20-compatible/recent.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Google Code Search' from file /usr/lib/deskbar-applet/modules-2.20-compatible/googlecodesearch.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Window Switcher' from file /usr/lib/deskbar-applet/modules-2.20-compatible/iswitch-window.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Wikipedia Suggest' from file /usr/lib/deskbar-applet/modules-2.20-compatible/wikipedia-suggest.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Calculator' from file /usr/lib/deskbar-applet/modules-2.20-compatible/calculator.py.
04-01 22:05:57 deskbar.core.ModuleLoader WARNING  Class MozillaBookmarksHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/mozilla.py has missing requirements. Skipping.
04-01 22:05:57 deskbar.core.ModuleLoader WARNING  Class MozillaSearchHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/mozilla.py has missing requirements. Skipping.
04-01 22:05:57 deskbar.core.ModuleLoader WARNING  Class MozillaHistoryHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/mozilla.py has missing requirements. Skipping.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Web Bookmarks (Epiphany)' from file /usr/lib/deskbar-applet/modules-2.20-compatible/epiphany.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Web History (Epiphany)' from file /usr/lib/deskbar-applet/modules-2.20-compatible/epiphany.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Web Searches (Epiphany)' from file /usr/lib/deskbar-applet/modules-2.20-compatible/epiphany.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'del.icio.us Bookmarks' from file /usr/lib/deskbar-applet/modules-2.20-compatible/desklicious.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Computer Actions' from file /usr/lib/deskbar-applet/modules-2.20-compatible/gdmactions.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Templates' from file /usr/lib/deskbar-applet/modules-2.20-compatible/templates.py.
04-01 22:05:57 deskbar.core.Utils WARNING  Icon devhelp Load Error: Icon 'devhelp' not present in theme (or Icon 'devhelp' not present in theme)
04-01 22:05:57 deskbar.core.Utils WARNING  Icon `stock_unknown' is not present in theme
04-01 22:05:57 deskbar.core.ModuleLoader WARNING  Class DevhelpHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py has missing requirements. Skipping.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Programs' from file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Dictionary' from file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Files and Folders Search' from file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Tomboy Notes' from file /usr/lib/deskbar-applet/modules-2.20-compatible/tomboy.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'History' from file /usr/lib/deskbar-applet/modules-2.20-compatible/history.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Web' from file /usr/lib/deskbar-applet/modules-2.20-compatible/web_address.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Beagle' from file /usr/lib/deskbar-applet/modules-2.20-compatible/beagle-static.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'OpenSearch' from file /usr/lib/deskbar-applet/modules-2.20-compatible/opensearch.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Loading module 'Beagle Live' from file /usr/lib/deskbar-applet/modules-2.20-compatible/beagle-live.py.
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Initializing History
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Initializing Recent Documents
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Initializing Calculator
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Initializing Web
04-01 22:05:57 deskbar.core.ModuleLoader INFO     Initializing Programs
04-01 22:05:58 deskbar.core.ModuleLoader INFO     Initializing Files, Folders and Places
04-01 22:05:58 deskbar.core.ModuleLoader INFO     Initializing Web Bookmarks (Epiphany)
04-01 22:05:58 deskbar.core.ModuleLoader INFO     Initializing Web Searches (Epiphany)
04-01 22:05:58 deskbar.core.ModuleLoader INFO     Initializing Computer Actions
04-01 22:05:58 deskbar.core.ModuleLoader INFO     Initializing Templates
04-01 22:05:58 deskbar.core.ModuleLoader ERROR    Error while initializing Templates: Argument out of range
04-01 22:05:58 deskbar.core.ModuleLoader ERROR    Argument out of range
Traceback (most recent call last):
  • File "/usr/lib/python2.5/site-packages/deskbar/core/ModuleLoader.py", line 180 in initialize_module
    module.initialize ()
  • File "/usr/lib/deskbar-applet/modules-2.20-compatible/templates.py", line 191 in initialize
    templates_dir = deskbar.core.Utils.get_xdg_user_dir(deskbar.core.Utils.DIRECTORY_TEMPLATES)
ValueError: Argument out of range



Other information:
Installed on a x86_64 Slackware based distro (BlueWhite64). When compiling the same GNOME 2.26 related packages for 32bit deskbar-applet seem to work.
Comment 1 Gianluca Borello 2009-04-02 11:43:02 UTC
I can't reproduce this bug on Ubuntu x86_64 (deskbar-applet version 2.24.1)
Comment 2 Sebastian Pölsterl 2009-04-02 19:29:02 UTC
The exception occurs in deskbar/core/_userdir/__userdirsmodule.c when the value given to g_get_user_special_dir is out of range. Maybe PyInt_AsLong does something work on 64bit machines? Unfortunately, I currently don't have access to a 64bit OS.
Comment 3 Markus Kanet 2009-04-04 04:40:46 UTC
I spent some more time on this problem and i figured out that if i run "xdg-user-dirs-update" manually after a fresh install and for a newly created user then the deskbar-applet works fine.

This will create the default "User" directories like "Downloads", "Documents", "Public" and "Templates". If i remove all these directories again deskbar-applet fails to start again.

It looks like that i only need to create the "Templates" directory (or any directory specified in the ".config/user-dirs.dirs" configuration file for XDG_TEMPLATES_DIR) and deskbar-applet works.

This is weired since on x32 systems i do not have these directories and it works. On x64 it only works when i have a "Templates" directory, the other directories are not required.
Comment 4 Markus Kanet 2009-04-04 05:58:10 UTC
I have to add that i can run /usr/lib/deskbar-applet/deskbar-applet -w -d
 and i get that window for the deskbar-applet now but i cannot add deskbar to the panel: it fails to load. Not sure if that is related to the same initial error.

Using GNOME 2.26, deskbar-applet 2.26.0, Python 2.5. No logfile shows any errors related to deskbar-applet.
Comment 5 Sebastian Pölsterl 2009-04-04 09:25:42 UTC
(In reply to comment #4)
> I have to add that i can run /usr/lib/deskbar-applet/deskbar-applet -w -d
>  and i get that window for the deskbar-applet now but i cannot add deskbar to
> the panel: it fails to load. Not sure if that is related to the same initial
> error.
> 
Just start it without -w and add it to the panel as usual.
Comment 6 Sebastian Pölsterl 2009-04-04 09:27:06 UTC
Created attachment 132062 [details]
Test program

Could you please compile the attached program with "gcc -o get_template_dir `pkg-config --libs --cflags glib-2.0` get_template_dir.c" and run "./get_template_dir"?
Comment 7 Markus Kanet 2009-04-04 11:01:53 UTC
On a newly created user i get:

:~$cc -o get_template_dir `pkg-config --libs --cflags glib-2.0` get_template_dir.c
:~$ ./get_template_dir 
Directory: (null)


When running xdg-user-dirs-update i get:
:~$ ./get_template_dir 
Directory: /home/user/Templates


When removing the Templates directory i get:
:~$ ./get_template_dir 
Directory: /home/user/Templates


This is what i get when using deskbar from the command line when i do not have a templates directory:
user@europa:~$ /usr/lib/deskbar-applet/deskbar-applet -w
04-04 12:54:39 deskbar.core.Utils WARNING  Icon devhelp Load Error: Icon 'devhelp' not present in theme (or Icon 'devhelp' not present in theme)
04-04 12:54:39 deskbar.core.Utils WARNING  Icon `stock_unknown' is not present in theme
04-04 12:54:39 deskbar.core.ModuleLoader WARNING  Class DevhelpHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py has missing requirements. Skipping.
04-04 12:54:39 deskbar.core.ModuleLoader WARNING  Class GoogleHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/googlesearch.py has missing requirements. Skipping.
04-04 12:54:39 deskbar.core.ModuleLoader WARNING  Class BeagleLiveHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/beagle-live.py has missing requirements. Skipping.
04-04 12:54:40 deskbar.core.ModuleLoader WARNING  Class BeagleHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/beagle-static.py has missing requirements. Skipping.
04-04 12:54:40 deskbar.core.ModuleLoader WARNING  Class MozillaBookmarksHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/mozilla.py has missing requirements. Skipping.
04-04 12:54:40 deskbar.core.ModuleLoader WARNING  Class MozillaSearchHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/mozilla.py has missing requirements. Skipping.
04-04 12:54:40 deskbar.core.ModuleLoader WARNING  Class MozillaHistoryHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/mozilla.py has missing requirements. Skipping.
04-04 12:54:40 deskbar.core.Utils WARNING  Icon tomboy Load Error: Icon 'tomboy' not present in theme (or Icon 'tomboy' not present in theme)
04-04 12:54:40 deskbar.core.Utils WARNING  Icon `stock_unknown' is not present in theme
04-04 12:54:40 deskbar.core.ModuleLoader WARNING  Class TomboyNotesModule in file /usr/lib/deskbar-applet/modules-2.20-compatible/tomboy.py has missing requirements. Skipping.
04-04 12:54:40 deskbar.core.ModuleLoader WARNING  Class EvolutionHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/evolution.py has missing requirements. Skipping.
04-04 12:54:43 deskbar.core.ModuleLoader ERROR    Error while initializing Templates: [Errno 2] No such file or directory: '/home/user/Templates'
04-04 12:54:43 deskbar.core.ModuleLoader ERROR    [Errno 2] No such file or directory: '/home/user/Templates'
Traceback (most recent call last):
  • File "/usr/lib/python2.5/site-packages/deskbar/core/ModuleLoader.py", line 180 in initialize_module
    module.initialize ()
  • File "/usr/lib/deskbar-applet/modules-2.20-compatible/templates.py", line 193 in initialize
    for f in os.listdir(templates_dir):
OSError: [Errno 2] No such file or directory: '/home/user/Templates'


And ater a while i can see that:
(deskbar-applet:3078): Bonobo-WARNING **: Never got frame, control died - abnormal exit condition

(deskbar-applet:3078): Bonobo-WARNING **: Never got frame, control died - abnormal exit condition


I think that bug can be closed because when i have that Templates directory at least the command line command seem to work but deskbar-applet still crashes on my x86_64 system when i try to add it to the panel: All i get is a dialog that tell me that the applet has quit unexpectedly.

Using the command line /usr/lib/deskbar-applet/deskbar-applet -w will bring up the icon/window and i can use the deskbar as a window.

Comment 8 Sebastian Pölsterl 2009-04-04 12:36:09 UTC
Created attachment 132069 [details] [review]
Check value of  get_xdg_user_dir in has_requirements method

Could you please try if this patch works for you?
Comment 9 Markus Kanet 2009-04-04 16:52:05 UTC
This patch does work for me when using the command line method (deskbar-applet -w) to start the deskbar-applet: No complaining about a missing Templates directory or "ValueError: Argument out of range" error anymore. But i still cannot load the applet to the panel on x86_64 only but that might be a different problem. Thanks for the patch.
Comment 10 Sebastian Pölsterl 2009-04-05 12:09:03 UTC
(In reply to comment #9)
> But i still cannot load the applet to the panel on x86_64 only but that might
> be a different problem. Thanks for the patch.
> 

Try the following:
- Remove all instances of deskbar-applet from the panel
- Start deskbar-applet from the command line with "-d" switch
- Add it to the panel as usual

You should now see debugging output in the terminal.
Comment 11 Markus Kanet 2009-04-05 12:50:09 UTC
I have set log level in the deskbar script to "DEBUG" and redirected the log messages to a file but besides the messages below i do not see any reason for why the the applet does quit unexpectedly. All i get is the dialog that will ask me if i want to reload the applet.

04-05 14:43:46 deskbar      DEBUG    Data Dir: /usr/share/deskbar-applet
04-05 14:43:46 deskbar      DEBUG    Handlers Dir: ['/home/user/.local/share/deskbar-applet/modules-2.20-compatible', '/usr/lib/deskbar-applet/modules-2.20-compatible']
04-05 14:43:52 deskbar      DEBUG    Data Dir: /usr/share/deskbar-applet
04-05 14:43:52 deskbar      DEBUG    Handlers Dir: ['/home/user/.local/share/deskbar-applet/modules-2.20-compatible', '/usr/lib/deskbar-applet/modules-2.20-compatible']
04-05 14:43:52 deskbar.gtkexcepthook INFO     Using GTK exception handler
04-05 14:43:53 root         INFO     Starting Deskbar instance: <gnome.applet.Applet object at 0x12eeaf0 (PanelApplet at 0x1347000)> OAFIID:Deskbar_Applet
04-05 14:43:53 deskbar.core.Keybinder INFO     Binding Global shortcut <Alt>F3 to focus the deskbar
04-05 14:43:53 deskbar.core.CoreImpl INFO     Successfully binded Deskbar to <Alt>F3
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Computer Actions' from file /usr/lib/deskbar-applet/modules-2.20-compatible/gdmactions.py.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Templates' from file /usr/lib/deskbar-applet/modules-2.20-compatible/templates.py.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Files, Folders and Places' from file /usr/lib/deskbar-applet/modules-2.20-compatible/files.py.
04-05 14:43:53 deskbar.core.Utils WARNING  Icon devhelp Load Error: Icon 'devhelp' not present in theme (or Icon 'devhelp' not present in theme)
04-05 14:43:53 deskbar.core.Utils WARNING  Icon `stock_unknown' is not present in theme
04-05 14:43:53 deskbar.core.ModuleLoader WARNING  Class DevhelpHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py has missing requirements. Skipping.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Programs' from file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Dictionary' from file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Files and Folders Search' from file /usr/lib/deskbar-applet/modules-2.20-compatible/programs.py.
04-05 14:43:53 deskbar.core.ModuleLoader WARNING  Class GoogleHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/googlesearch.py has missing requirements. Skipping.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Wikipedia Suggest' from file /usr/lib/deskbar-applet/modules-2.20-compatible/wikipedia-suggest.py.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Yahoo! Search' from file /usr/lib/deskbar-applet/modules-2.20-compatible/yahoo.py.
04-05 14:43:53 deskbar.core.ModuleLoader INFO     Loading module 'Yahoo! Suggestions' from file /usr/lib/deskbar-applet/modules-2.20-compatible/yahoo.py.
04-05 14:43:53 deskbar.core.ModuleLoader WARNING  Class BeagleLiveHandler in file /usr/lib/deskbar-applet/modules-2.20-compatible/beagle-live.py has missing requirements. Skipping.
Comment 12 Sebastian Pölsterl 2009-04-05 13:44:15 UTC
If you start deskbar-applet from the command line first and add it to the panel afterwards it works, right?

If that's the case the file /usr/lib/bonobo/servers/Deskbar_Applet.server might point to the wrong executable.
Comment 13 Markus Kanet 2009-04-05 14:09:14 UTC
No... start deskbar from the command line and add it to the panel afterwards does not work. This is what i have done:

1) kill all instances from deskbar-applet
2) /usr/lib/deskbar-applet/deskbar-applet -d
3) Add deskbar-applet to the panel
4) deskbar-applet icon is on the panel for about one second
5) deskbar-applet disappears
6) Dialog window pops up "Applet has died unexpectedly! Reload it?"

I would like to give more info but there are no other messages (except the messages in comment #11 ), neither when launched from the command line nor when trying to add it to the panel using "Add applet" dialog. The bonobo server file includes the correct path to the executable.

If deskbar-applet would be an executable i could give a gdb backtrace but i don't know how to do that for a python script.

The odd thing is that when using "deskbar-applet -w" deskbar is working well in a window...

Comment 14 Sebastian Pölsterl 2009-04-05 15:52:52 UTC
Actually, you can use gdb:
$ gdb python
(gdb) run /usr/lib/deskbar-applet/deskbar-applet

It might be difficult to get a meaningful stacktrace, though.
Comment 15 Markus Kanet 2009-04-05 18:25:53 UTC
Created attachment 132142 [details]
backtrace from deskbar crash on x86_64

As you mentioned before a backtrace does not show any helpful info except that i got a SIGSEGV. I tried that on two different systems and the only difference is the module that was last loaded before the SIGSEGV was received.

I just recompiled GNOME 2.24.3 with deskbar-applet 2.24.3 on a fresh install of the same x86_64 system and i do not get any errors. I recompiled deskbar 2.24.3 on GNOME 2.26 and there this version will fail to start also so i think it's not a problem in deskbar, but a change in one of the other GNOME related packages... the odd thing is that this only affects my x86_64 systems...
Comment 16 Sebastian Pölsterl 2009-04-05 20:35:17 UTC
I saw the same stacktrace already at https://bugs.launchpad.net/ubuntu/+source/deskbar-applet/+bug/333608

I guess it's some bug in pygobject, maybe related to bug 566571?

Adding Paul Pogonyshev to CC to get some insight.
Comment 17 Sebastien Bacher 2009-04-06 10:51:16 UTC
the ubuntu comments suggest it could be due to the twitter option
Comment 18 Markus Kanet 2009-04-06 20:04:12 UTC
Confirmed: If i remove the twitter modules on x86_64 i can add the deskbar-applet to the panel. Removing the applet, copy back the twitter files and then add back the deskbar-applet back to the panel and deskbar will crash again.
Comment 19 Sebastian Pölsterl 2009-04-06 21:02:27 UTC
From the stacktrace on launchpad it seems that importing deskbar.core.Web causes this problem. Could remove everything but that import from twitter.py and try again please?

Btw, thank you so much for helping me out. Unfortunately, I can't test this myself.
Comment 20 Sebastian Pölsterl 2009-04-06 21:11:27 UTC
Or maybe just using python's interactive shell and typing in "import deskbar.core.Web" will do it.

What's super weird is that it actually works in window mode.
Comment 21 Markus Kanet 2009-04-07 04:34:31 UTC
Created attachment 132236 [details]
Logfile from python import deskbar.core.Web

When running python and just do a import deskbar.core.Web then python just exits without any message displayed. If i use python -dv and then try to import deskbar.core.Web i can see that some files get imported (see logfile) but after gnomekeyring python exits without any errors...

And yes... i tried again using "deskbar-applet -w" and the window pops up and i can use the search.
Comment 22 Markus Kanet 2009-04-07 04:40:46 UTC
I forgot to add that if i type in a search with twitter module enabled the search suggested to post a comment via twitter when using "deskbar-applet -w". So the twitter module really works in window mode.

Comment 23 Sebastian Pölsterl 2009-04-07 09:54:54 UTC
Does python crash when you import gnomekeyring directly, too?

Could please get stacktrace with gdb --args python -c "import gnomekeyring"?
Comment 24 Vassily Gavrilyak 2009-04-07 10:34:47 UTC
I am the reporter of stacktrace with twitter module in Ubuntu launchpad.
I find out the way to crash deskbar-applet in window mode.
It's a little strange, but anyway.
From Alt-F2 "Run" I launched /bin/dash with "run in terminal" marked.
From the terminal I'm running /usr/lib/deskbar-applet/deskbar-applet -w
It crashes each time, so it is reproducible 100% on my computer.

It doesn't crash with bash, though.

From this shell I launched python and tried import gnomekeyring and import deskbar.core.Web. Both are working just fine.

I would be glad to offer help and do more tests, just tell me what to do.
Comment 25 Markus Kanet 2009-04-07 10:59:49 UTC
gdb --args python -c "import gnomekeyring" works for me.

I do not have dash, only bash, csh and zsh and when using ALT+F2 + [bash|csh|zsh] in Terminal mode line described in comment #24 everything works well in window mode, no crash here. But as i said, i do not have dash.

I added some extra logging.info lines to the deskbar-script and python does execute the deskbar-script until the last command (gnomeapplet.bonobo_factory). Another logging.info command behind that is not executed anymore.

If i add a logging.info on top of the Web.py script but behind the "import gnomekeyring" i get another logfile entry so the deskbar goes atleast til here and gnomekeyring was just the last import that worked.

I'm not a python programmer so i don't know where to add the next logging.info entries that might be helpful. 

Comment 26 Sebastian Pölsterl 2009-04-07 11:11:36 UTC
(In reply to comment #25)
> gdb --args python -c "import gnomekeyring" works for me.
>
Could you try the same with deskbar.core.Web please

> I added some extra logging.info lines to the deskbar-script and python does
> execute the deskbar-script until the last command (gnomeapplet.bonobo_factory).
> Another logging.info command behind that is not executed anymore.
> 
I don't think it has something to do with gnomeapplet.bonobo_factory, because twitter.py has nothing to do with it.

> If i add a logging.info on top of the Web.py script but behind the "import
> gnomekeyring" i get another logfile entry so the deskbar goes atleast til here
> and gnomekeyring was just the last import that worked.
> 
Seems that gnomekeyring isn't the fault. This is just awful to debug. The only thing that seems to be a little bit out of the ordinary is the class GnomeURLopener that inherits from two classes.
Comment 27 Markus Kanet 2009-04-07 11:28:44 UTC
gdb --args python -c "import deskbar.core.Web" produces the same SIGSEGV as in the stracktraces already reported.

In twitter.py i added more logging.info entries just before and behind the import of deskbar.core.Web. The logging.info command behind "import deskbar.core.Web" is not executed anymore.

So when loading the applet to the panel and when twitter gets loaded it chrashes while doing the import of deskbar.core.Web.

Comment 28 Sebastian Pölsterl 2009-04-07 11:37:43 UTC
The only thing I can think of right now is to remove one class after another from deskbar.core.Web and check each time if the import still fails.
Comment 29 Sebastian Pölsterl 2009-04-07 11:40:20 UTC
To be precise I can only be either AccountDialog or GnomeURLopener, because the all other classes don't inherit from a pygtk or pygobject class.
Comment 30 Vassily Gavrilyak 2009-04-07 11:41:24 UTC
It segfaults in Web.py line 236

        proxies = get_proxy()

if I comment out the whole __init function for GnomeURLopener, it works
uncomment this line - segfault
Comment 31 Vassily Gavrilyak 2009-04-07 11:47:55 UTC
Hmm, nevermind my last comment, it still crashes, even with __init__ commented out.
Comment 32 Vassily Gavrilyak 2009-04-07 12:24:09 UTC
Removing FancyURLopener from declaration like this 

class GnomeURLopener (#urllib.FancyURLopener,  
             gobject.GObject): 

makes the crash go away. Any further ideas?
Comment 33 Sebastian Pölsterl 2009-04-07 13:33:20 UTC
Does it work when you only inherit from urllib.FancyURLopener, too?

Make sure to comment out gobject.GObject.__init__ (self) in __init__.
Comment 34 Vassily Gavrilyak 2009-04-07 13:39:47 UTC
Yes, it does. It looks like problem with using multiple inheritance and GObject together. Migrating to single inheritance+delegation should help, IMHO.
Comment 35 Sebastian Pölsterl 2009-04-07 14:08:51 UTC
Created attachment 132271 [details] [review]
Don't make GnomeURLopener a GObject

Could you please try this patch. Make sure you still can post to twitter/identi.ca if you have an account. It works at least for me.
Comment 36 Vassily Gavrilyak 2009-04-07 14:33:41 UTC
Yes, it works for me too. I registered account and my posts from deskbar appeared in twitter.
Thanks!
Comment 37 Markus Kanet 2009-04-07 16:40:08 UTC
Ich have tested the patch also and even with twitter enabled the applet loads to the panel now. Thx a lof for the patch!

Comment 38 S. Erben 2009-04-07 16:55:55 UTC
I think I am too late with this information, but for the record:
When I set the logging configuration on DEBUG in line 46 in /usr/lib/deskbar-applet/deskbar-applet, I can add the deskbar-applet to the panel and can use it without problems. 
Comment 39 Sebastian Pölsterl 2009-04-07 17:00:30 UTC
I committed the GnomeURLopener patch to svn trunk and it will be part of 2.26.1. I'm still waiting for string freeze break approval for the templates patch.

Thanks a lot for all your help!
Comment 40 Michel Alexandre Salim 2009-04-14 05:13:40 UTC
The patch solves an intermittent bug on Fedora rawhide x86_64 that has been occuring on and off for a while. I'll post an update if the breakage reoccurs -- rather weird that it never caused a problem on 32-bit systems.
Comment 41 Sebastian Pölsterl 2009-05-01 18:06:28 UTC
I committed the patch for the crash in the templates module as is to master and a slightly modified version to gnome-2-26 branch to avoid breaking string freeze break.