GNOME Bugzilla – Bug 149326
Wnck-CRITICAL when loading applet
Last modified: 2005-12-13 20:05:20 UTC
Here's the backtrace from --g-fatal-warnings: GConf-CRITICAL **: file gconf-client.c: line 547 (gconf_client_add_dir): assertion `gconf_valid_key (dirname, NULL)' failed aborting... Program received signal SIGABRT, Aborted.
+ Trace 49104
Thread NaN (LWP 22990)
Unique stack trace.
Not seeing those GConf-CRITICAL's any longer, but I do see this when adding the window list: (wnck-applet:28264): Wnck-CRITICAL **: wnck_screen_get_windows: assertion `WNCK_IS_SCREEN (screen)' failed (wnck-applet:28264): Wnck-CRITICAL **: wnck_screen_get_active_window: assertion `WNCK_IS_SCREEN (screen)' failed
Created attachment 35881 [details] [review] Fix new warnings I ran across these while trying to debug bug 163343, and these warnings are caused by some of the related code. Anyway, here's a patch that fixes the warnings. The tasklist was being updated, which depended on knowing the screen, but the screen wasn't setup until realization time. So I deferred this part of the code until the realization happened.
Comment on attachment 35881 [details] [review] Fix new warnings Anything in realize() should be undone in unrealize() (and anything in init should be undone in destroy/finalize, so hopefully the code to copy to unrealize is currently in finalize...)
If this is just warnings now, marking down.
Created attachment 49488 [details] [review] Better patch to fix the warnings This patch only moves the code that is calling the problem, and mvoes it to the "new" method, rather than the realize method. I'm not marking the other patch obsolete though, in case Havoc or someone deems the realize/unrealize method a better way of doing it.
Havoc? Can this be committed?
new() has a couple problems I think: 1. it should only be a convenience method, real stuff should be in init() possibly with construct_only properties 2. you don't have an X screen at new() time, only when realized I haven't really looked at the specifics here though so I don't know if these are important points.
Created attachment 54364 [details] [review] Proposed patch Here's my try :-) We just return if tasklist->window is NULL :-)
Created attachment 54365 [details] [review] Other solution And here's the realize/unrealize way.
Please commit the patch from comment #10.
Committed