Comment 51 for bug 226470

Revision history for this message
In , Robert-bradbury (robert-bradbury) wrote :

Created an attachment (id=256359)
Firefox segfaulting in gdk_window_get_root_origin?

I'm not an expert at interpreting these stack traces yet, but it looks like this segfault is in gdk/x11/gdkwindow-x11.c:gdk_window_get_root_origin() which is called from nsWindow.cpp:WidgetToScreen. My suspicition is that GTK_WIDGET(mContainer)->window is hosed but I don't understand the structures enough to know for sure. If anyone wants to advise on anything that needs to be looked at in the core dump let me know.

What I was doing at the time was a Google search and had just done a search along the lines of "firefox fetch CVS site:mozilla.org". It segfaulted before it could display any of the results.

It was not a memory problem (the core file is only 282 MB). Nor was the system particularly busy. The libraries were gtk+-2.10.9 and glib-2.12.9.

Just as an FYI, for those of you who build firefox from scratch and who want to debug these types of problems, I would highly urge you to compile toolkit/xre/nsSigHandlers.cpp (aka xpfe/bootstrap/nsSigHandlers.cpp) with the -DDEBUG so you can get stack traces from within Firefox rather than having to mess around with gdb. You don't want to compile the entire source with DEBUG because there are 1200+ instances where it adds additional code which one may not want in general.

It also looks as if we can arrange glib so if we can tell it *when* there is a problem (using a signal or the debugger to set a flag) we could have it produce stack traces in gdk_event_translate() on every DestroyNotify by calling the Netscape function DumpStackToFile(stderr). (Of course libgtk won't be usable by anything other than Mozilla/Firefox at that point but we are debugging a *real* problem here.)