Closed Bug 400321 Opened 18 years ago Closed 17 years ago

Fix appshell workarounds for Camino crashing on exit

Categories

(Core :: Widget: Cocoa, defect, P2)

PowerPC
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: smichaud, Assigned: smichaud)

References

Details

Attachments

(1 file)

My appshell patch to process Gecko events on demand (bug 395397) contained two workarounds for a problem in Camino that it seemed to trigger -- with this appshell patch, Camino was much more likely to crash on exit. But these workarounds were only partially effective, and Camino continues to be quite likely to crash on exit (see bug 398002). This patch's workaround gets to the bottom of the problem, and seems to resolve it entirely. It replaces the two previous workarounds. The basic problem is a design flaw in Camino: When you quit Camino with at least one window open, Camino (indirectly) destroys the currently running appshell as the last browser window (class BrowserWindow) is closed. This means that some Camino code will run _after_ the appshell is destroyed. But as the appshell is destroyed it releases all its own autorelease pools -- which can (and normally should) cause all objects in any autorelease pool to be released, including all of the remaining autorelease pools. This should (and with the new appshell often does) lead to errors (in the system console) about objects being leaked because no autorelease pool is in place, and to crashes caused by references to deleted objects. These problems should have been visible before my bug 395397 appshell patch was landed -- I don't know why they weren't. But in any case they _are_ now quite visible. In principle this problem should be resolved in Camino. But that could be a lot of trouble, and I've found a very simple and effective workaround.
Flags: blocking1.9?
Attachment #285400 - Flags: review?(joshmoz)
Severity: normal → critical
Blocks: 398002
Attachment #285400 - Flags: superreview?(roc)
Attachment #285400 - Flags: review?(joshmoz)
Attachment #285400 - Flags: review+
Attachment #285400 - Flags: superreview?(roc) → superreview+
Josh, please mark this blocking1.9+. Then I'll seek approval to land it.
Flags: blocking1.9? → blocking1.9+
Target Milestone: --- → mozilla1.9 M10
Attachment #285400 - Flags: approval1.9?
Attachment #285400 - Flags: approvalM9?
Comment on attachment 285400 [details] [diff] [review] Fix appshell workarounds for Camino crashing on exit a=endgame drivers for after M9 freeze
Attachment #285400 - Flags: approvalM9?
Attachment #285400 - Flags: approvalM9-
Attachment #285400 - Flags: approval1.9?
Attachment #285400 - Flags: approval1.9+
Priority: -- → P1
Priority: P1 → P2
Landed on trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: