If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

gtk2 build crashes at exit

RESOLVED FIXED

Status

()

Core
Preferences: Backend
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Brian Ryner (not reading), Assigned: Brian Ryner (not reading))

Tracking

({crash})

Trunk
x86
Linux
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

15 years ago
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.
(Assignee)

Comment 1

15 years ago
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.
(Assignee)

Updated

15 years ago
Attachment #126348 - Flags: superreview?(alecf)
Attachment #126348 - Flags: review?(bolian.yin)

Comment 2

15 years ago
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 3

15 years ago
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 4

15 years ago
Comment on attachment 126348 [details] [diff] [review]
patch

sr=alecf
Attachment #126348 - Flags: superreview?(alecf) → superreview+
(Assignee)

Comment 5

15 years ago
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.
(Assignee)

Comment 6

15 years ago
fix checked in.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.