The gtk2 build crashes at exit, due to the system-pref extensions unloading the GConf library when the service is destroyed. This is a problem because GConf initializes ORBit when gconf_client_get_default() is called; and ORBit registers atexit handlers. When those handlers are called at shutdown, we crash since the library has been unloaded. I think it's perfectly ok to not worry about unloading the library. Also, I found that we leak our reference to the GConfClient at shutdown. I'll attach a patch to address both problems.
Created attachment 126348 [details] [diff] [review] patch In addition to the things I mentioned above, I also got rid of some code in the GConfProxy dtor that doesn't really serve any purpose.
bryner: not really related, but... can you explain how you debugged this? I tried to get some stacks in gdb, but they just showed libc.so/libpthread.so, i.e. nothing useful. I spent a fair amount of time on it, so it'd be nice to know for future endeavours. :)
Comment on attachment 126348 [details] [diff] [review] patch I did not realize unloading gconf lib causes that problem. Thanks. I am aslo curious about how can you locate that atexit.
Comment on attachment 126348 [details] [diff] [review] patch sr=alecf
I couldn't figure out anything it could be other than an atexit handler, and guessed that anything GNOME related would use g_atexit. So, I set a breakpoint on that function and saw it getting hit from ORBit initialization.
fix checked in.