Comment 10 for bug 1051152

Revision history for this message
Sami Jaktholm (sjakthol) wrote : Re: Firefox 16 beta crash in nsIContent::SetAttr

Alright, it didn't take that long the get it crashing again. After looking into the traffic of the DBusmenu of Firefox, it seems obvious that hud-service is causing these crashes.

When Firefox is launched HUD starts to map the menus. HUD iterates trough the menu structure and sends 'opened' events to all the sub-menus in need of mapping.

When the focus is changed to another window, HUD wants to close the opened menus. So it sends 'closed' event to all the menus and Firefox responds to that request. But here's the problem: it's closing more menus it opened. For me, it sent 'opened' event to 40 objects but sends 'closed' event to 46 objects. And Firefox crashes.

Disabling add-ons one by one I concluded that it's Greasemonkey causing the crashes (which is also in the list of extensions of the original reporter). Greasemonkey adds its own sub-menu to Tools which happen to have exactly 6 menu items: the same number of objects as the extra ones HUD tries to close. So my guess is that HUD considers those items normal menus and tries to close them (why this happens, I have no idea).

Here's steps to reproduce the crash:
#1: Have Greasemonkey installed and enabled
#2: Open Firefox and wait for the window to appear
#3: Invoke HUD with ALT and perform a search (might not be needed if hud-service was already running)
#4: Give focus to another application
#5: Firefox crashes

The reason the crash didn't happen all the time was that I hadn't used HUD after booting my computer. So the hud-service wouldn't try to close any menus and the crash would not happen.