Closed Bug 990017 Opened 6 years ago Closed 4 years ago

Canvas2D: failed assertion "contains_inclusive(*devBounds, pts[0])"

Categories

(Core :: Canvas: 2D, defect, critical)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: posidron, Assigned: mchang)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, crash, testcase, Whiteboard: [skia-upstream])

Crash Data

Attachments

(3 files, 1 obsolete file)

Attached file testcase
Preferences:

user_pref("gfx.canvas.azure.backends", "skia");
user_pref("gfx.canvas.azure.accelerated", true);

Tested with http://hg.mozilla.org/integration/mozilla-inbound/rev/3dc94091255a
Attached file callstack
Whiteboard: [skia-upstream]
Assignee: nobody → mchang
The current test case isn't crashing for me, but this is still a crasher when running mochitests.

Just an update, this code was rewritten upstream in https://codereview.chromium.org/880643002
We'd get some crashes with skia content on OS X such as: http://archive.mozilla.org/pub/firefox/try-builds/mchang@mozilla.com-3f43be4bb05b4bcfa9e51ec4036d24d561d5256a/try-macosx64-debug/try_snowleopard-debug_test-mochitest-browser-chrome-4-bm106-tests1-macosx-build739.txt.gz

This was because, on OS X, we have accelerated Skia for canvas rendering and unaccelerated Skia for content rendering. When we call CanvasRenderingContext2D::DrawWindow, we'd use the accelerated Skia backend to render content for the snapshot, but we don't really support accelerated Skia content at the moment. The accelerated Skia backend would render an nsBulletFrame, we'd go down the GPU path, and the assertion would trigger as one of the points for the convex path would be off by 0.000001 and thus the assert would trigger, thinking that not all points are convex on the path. 

I still haven't tracked down where exactly we lose the precision, but rendering a bullet point only in accelerated skia works, rendering a bullet point in only unaccelerated skia works, but not mixing the two. I might still try to track it down, but either way, it seems like we shouldn't try to render a document with accelerated skia as it's unsupported.
Attachment #8682267 - Flags: review?(jmuizelaar)
Comment on attachment 8682267 [details] [diff] [review]
Force software skin backend when calling CanvasRenderingContext2D

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

It would probably be better for SupportsAzureContentForDrawTarget to return false in this case. Probably doesn't matter that much though...
Attachment #8682267 - Flags: review?(jmuizelaar) → review+
Carrying r+, moved to SupportsAzureContentForDrawTarget.

Successful try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d365c3e08905
Attachment #8682267 - Attachment is obsolete: true
Attachment #8694819 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/4feee02dd1d6
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Blocks: 1289929
You need to log in before you can comment on or make changes to this bug.