Closed Bug 210471 Opened 21 years ago Closed 21 years ago

gtk2 build crashes at exit

Categories

(Core :: Preferences: Backend, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

Details

(Keywords: crash)

Attachments

(1 file)

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.
Attached patch patchSplinter Review
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.
Attachment #126348 - Flags: superreview?(alecf)
Attachment #126348 - Flags: review?(bolian.yin)
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.
Attachment #126348 - Flags: review?(bolian.yin) → review+
Comment on attachment 126348 [details] [diff] [review]
patch

sr=alecf
Attachment #126348 - Flags: superreview?(alecf) → superreview+
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.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: