Closed Bug 1207750 Opened 9 years ago Closed 9 years ago

preference/envvar to crash on cairo error

Categories

(Core :: Graphics, defect)

43 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: milan, Assigned: milan)

References

Details

(Keywords: feature, Whiteboard: [gfx-noted])

Attachments

(1 file, 2 obsolete files)

It's sometimes useful to be able to set a preference or environment variable to crash cairo the instant an error occurs, marking the root case of the error handling path or subsequent problems much further down the line.
Jeff, any objections in principle?  I'd probably start with an environment variable approach...
Assignee: nobody → milan
Flags: needinfo?(jmuizelaar)
Whiteboard: [gfx-noted]
No objections in principle. I've typically just set a break point on _cairo_error to accomplish this in the past.
Flags: needinfo?(jmuizelaar)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> No objections in principle. I've typically just set a break point on
> _cairo_error to accomplish this in the past.

Right, but that may not be something we can ask random people "out there" to do - on the other hand, we can have them set an environment variable, run the steps that cause the problem, submit the crash report...
(In reply to Milan Sreckovic [:milan] from comment #3)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> > No objections in principle. I've typically just set a break point on
> > _cairo_error to accomplish this in the past.
> 
> Right, but that may not be something we can ask random people "out there" to
> do - on the other hand, we can have them set an environment variable, run
> the steps that cause the problem, submit the crash report...

This is a very compelling argument.
Attached patch (wip) Crash on cairo error (obsolete) — Splinter Review
Something like this.  Questions - how do we want to crash (I took the null pointer assignment from Bas' recent special build to exactly deal with this in the field), and it feels like this should be inside of an #ifdef that is specific to our builds.  Thoughts?
Attachment #8669080 - Flags: feedback?(jmuizelaar)
Attachment #8669080 - Flags: feedback?(bas)
Comment on attachment 8669080 [details] [diff] [review]
(wip) Crash on cairo error

Review of attachment 8669080 [details] [diff] [review]:
-----------------------------------------------------------------

I like this idea.
Attachment #8669080 - Flags: feedback?(bas) → feedback+
Attachment #8669080 - Flags: feedback?(jmuizelaar) → feedback+
May as well do a review; same as the WIP patch, except I added the #ifdef around the code.
Attachment #8669080 - Attachment is obsolete: true
Attachment #8670431 - Flags: review?(bas)
Attachment #8670431 - Flags: review?(bas) → review?(jmuizelaar)
Comment on attachment 8670431 [details] [diff] [review]
Crash on cairo error. r=bschouten

Review of attachment 8670431 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/cairo/cairo/src/cairo.c
@@ +172,5 @@
>      CAIRO_ENSURE_UNIQUE;
>      assert (_cairo_status_is_error (status));
>  
> +#ifdef MOZILLA_VERSION
> +    static int abortOnError = -1;

abort_on_error would be the preferred casing for this variable.
Attachment #8670431 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/253dbc53a583
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Depends on: 1215774
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: