Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194674 - www-client/mozilla-firefox-2.0.0.7 crashes on various dialog boxes
Summary: www-client/mozilla-firefox-2.0.0.7 crashes on various dialog boxes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-04 04:10 UTC by Iain Buchanan
Modified: 2007-12-07 11:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output from emerge --info (einfo,3.27 KB, text/plain)
2007-10-04 04:11 UTC, Iain Buchanan
Details
gdb output and backtrace, after the crash (firefox-backtrace,8.84 KB, text/plain)
2007-10-04 04:13 UTC, Iain Buchanan
Details
gdb output for edit-preference crash (firefox-backtrace-2,8.02 KB, text/plain)
2007-10-04 04:18 UTC, Iain Buchanan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Buchanan 2007-10-04 04:10:07 UTC
Hi,

1. start firefox, go to any web page
2. go to bookmarks menu, add bookmark
3. firefox crashes.

This is firefox compiled from source with gome, ipv6 and linguas_en_GB use flags.

I moved my .mozilla directory out of the way - same thing.

emerge --info and backtrace coming :)
Comment 1 Iain Buchanan 2007-10-04 04:11:30 UTC
Created attachment 132515 [details]
output from emerge --info
Comment 2 Iain Buchanan 2007-10-04 04:13:10 UTC
Created attachment 132517 [details]
gdb output and backtrace, after the crash
Comment 3 Iain Buchanan 2007-10-04 04:18:14 UTC
OK, it crashes when trying to edit my prefs as well.  backtrace on the way, but it looks very similar...
Comment 4 Iain Buchanan 2007-10-04 04:18:45 UTC
Created attachment 132518 [details]
gdb output for edit-preference crash
Comment 5 Steven Robertson 2007-10-05 08:40:54 UTC
Same problem here, on both an ~x86 and an ~amd64.  Check out this link:

http://forums.gentoo.org/viewtopic-t-588263.html

People here fixed the problem by downgrading glib and gtk.



Comment 6 Mart Raudsepp gentoo-dev 2007-10-05 09:56:23 UTC
The downgrade is no fix, not even a good workaround. "G_SLICE=always-malloc mozilla-firefox" is just slightly better, but still awful, especially if you accidentally apply that to all things ran on the system.

The problem is that apparently firefox uses g_free to free GtkBorder and GtkRequisition structures. Gtk+ has always provided gtk_requisition_free and gtk_border_free for that and g_free is not correct. In gtk+-2.12 GSlice is used to allocate said structures (for slight performance and memory gains) and freeing GSlice allocated things with free (through g_free) leads to a crash as GSlice doesn't use malloc.

So Fedora seems to have a patch already:
http://cvs.fedoraproject.org/viewcvs/devel/firefox/firefox-2.0-indicator-crash.patch?rev=1.1&view=auto

The workaround of G_SLICE=always-malloc is bad, as it makes EVERYTHING not use GSlice, not just GtkBorder and GtkRequisition, and that option is generally only provided for debugging purposes - such as running a gtk+ program under valgrind, as valgrind doesn't understand the posix_memalign stunts that GSlice is doing, so GSlice can be instructed to use malloc/free with that env var. If someone sets that env var in env.d or for any other thing than not-yet-fixed firefox product, I'll come after them with a big piece of RAM broken from too much inefficient malloc/free usage for fixed-size memory structures or something ;p
Comment 7 Mart Raudsepp gentoo-dev 2007-10-05 09:59:04 UTC
Additionally the Fedora CVS seems to suggest that this code path with the wrong kind of freeing of GtkBorder and co is only hit with a theme that sets GtkOptionMenu::indicator_size or GtkOptionMenu::indicator_spacing. So that's probably why my firefox works just fine. I use the default clearlooks theme from gtk-engines, and it apparently doesn't set these style properties on the long-ago-deprecated GtkOptionMenu control.
So a good workaround might also be to use a different gtk/GNOME theme or something.
Comment 8 Iain Buchanan 2007-10-07 13:20:17 UTC
going back to the gnome theme "clearlooks" works for me :)
Comment 9 Alexandre Ghisoli 2007-10-10 12:16:09 UTC
Firefox was crashing on "save as" dialog.
I've also noticed that home compiled oocalc crash.

So should be a bigger issue than just Firefox !!

Changing Gtk theme until I found one that didnt make my heavy Gtk apps crashing (using Glider as theme).
Comment 10 Iain Buchanan 2007-10-11 13:03:14 UTC
ooffice (oowriter specifically - haven't tried others) crashes on some format > page tabs for me.  See Bug 194473
Comment 11 Raúl Porcel (RETIRED) gentoo-dev 2007-12-07 11:20:35 UTC
This was fixed on 2.0.0.8