Closed Bug 1693434 Opened 3 years ago Closed 3 years ago

Report uncaught Objective C exceptions via crash reports

Categories

(Core :: Widget: Cocoa, task, P1)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

If something triggers an Objective C exception that isn't caught by one of our exception guards, we never hear about it.
We should install catch-all handlers for uncaught exceptions, and crash in them, so that we can see those exceptions in crash reports.

Such exceptions are unexpected. They might get us into an inconsistent state, where some things continue to operate normally and others are strangely broken. Just as an example, if -[ChildView pasteboard:item:provideDataForType:] throws an exception, drag and drop is broken for the rest of the browsing session.

Crashing eagerly is a safer default. It might lead to increased amounts of crashing, but at least we will know about these occurrences and can address them properly.

NSSetUncaughtExceptionHandler installs a handler which is called just before we
would crash anyway, I think. So this handler lets us collect information about
exceptions that are not even caught by the native event loop.

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/084675db1f00
Report uncaught Objective C exceptions. r=spohl
https://hg.mozilla.org/integration/autoland/rev/cb05c7bcf9bf
Crash when an Objective C exception bubbles up into the native event loop. r=spohl
Severity: -- → S2
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Regressions: 1694000
Blocks: 1694990
Regressions: 1695291
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: