Closed Bug 358607 Opened 18 years ago Closed 18 years ago

Crash [@ nsCocoaWindow::GetAttention] when I call goQuitApplication()


(Core :: Widget: Cocoa, defect)

Not set





(Reporter: jruderman, Assigned: MatsPalmgren_bugz)



(Keywords: crash, testcase)

Crash Data


(3 files)

Calling goQuitApplication() makes Firefox crash.

Since I use goQuitApplication for automated testing, this crash makes it very hard for me to do automated testing on Gecko to find security holes, regressions that cause crashes, etc.

I initially reported this as a comment in bug 343033, but hwaara said I should split it because the stacks are different.
Attached file quit-browser.html
The testcase needs privs, so it should be saved and loaded with a file: URL.
Attached file stack trace
Attached patch fix?Splinter Review
The problem is the static gHiddenWindowMenuBar is used after the hidden
window has been destroyed.,1109-1113#1102,160-161#157

GetHiddenWindowMenuBar() doesn't seem to be called that often so I think
we can look it up every time.

The change in nsAppShellService.cpp is just to remove a warning:
WARNING: requested removal of nonexistent window: file nsWindowWatcher.cpp, line 1114
which happens because nsAppShellService::CreateHiddenWindow() does not
actually register the window.
Attachment #244024 - Flags: review?(joshmoz)
Comment on attachment 244024 [details] [diff] [review]

Looks fine to me, fwiw. I was debugging this yesterday and was more or less on the same track.

I think the reason for bug 343033 is more, and related strangeness to how the hidden window menubar is used. In that bug, someone holds a strong ref to it for too long (seems to never be released, actually).
Comment on attachment 244024 [details] [diff] [review]

#if defined(XP_MAC) || defined(XP_MACOSX)

When you check in the change to nsAppShellService.cpp, can you please kill off tests for XP_MAC elsewhere in the file (just leave XP_MACOSX).
Attachment #244024 - Flags: review?(joshmoz) → review+
Assignee: joshmoz → mats.palmgren
(In reply to comment #6)
> can you please kill off
> tests for XP_MAC elsewhere in the file (just leave XP_MACOSX).

Did so and checked in to trunk at 2006-11-15 19:25 PDT.

Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 341983
Product: Core → Core Graveyard
Component: Widget: Mac → Widget: Cocoa
Product: Core Graveyard → Core
QA Contact: mac → cocoa
Crash Signature: [@ nsCocoaWindow::GetAttention]
You need to log in before you can comment on or make changes to this bug.