Closed
Bug 1190705
Opened 9 years ago
Closed 9 years ago
Canvas rotate & fillText: SkFixed.h: failed assertion "n64 == n32"
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: jruderman, Assigned: lsalzman)
References
Details
(Keywords: assertion, testcase)
Attachments
(4 files)
gfx/skia/skia/include/core/SkFixed.h:46: failed assertion "n64 == n32"
Reporter | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Hardware: Unspecified → All
Assignee | ||
Comment 2•9 years ago
|
||
The webidl for the Canvas functions currently handles if explicit Infs or NaNs are passed in to the transform functions, but it does not handle the case where a large double number becomes an Inf through truncation to float. Further, in certain cases like the rotate function, the Inf angles passed in to trig functions give out NaNs. Skia canvas' Mac scaled font backend and also apparently the cross-platform Cairo scaled font backend both can't handle any non-finite numbers in the font transform, otherwise they can trigger assertions like above or various downwind failures like null-derefs (for the Cairo backend). To mitigate this, this patch tries to verify that the resulting draw target transform has all finite values, especially after it has been composed with the existing transform. This weed out both cases where truncation directly produces non-finite values and cases where valid inputs through repeated composition may still yield a non-finite transform.
Attachment #8644073 -
Flags: review?(bas)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8644074 -
Flags: review?(bas)
Assignee | ||
Comment 4•9 years ago
|
||
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2104e8fcce3e
Updated•9 years ago
|
Attachment #8644073 -
Flags: review?(bas) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8644073 [details] [diff] [review] part 1 - ensure that canvas 2d matrix transforms are finite Jeff, I feel okay with this, do you agree?
Attachment #8644073 -
Flags: review?(jmuizelaar)
Updated•9 years ago
|
Attachment #8644074 -
Flags: review?(bas) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #6) > How do other browsers handle these cases? Chrome ignores it in this case.
Comment 8•9 years ago
|
||
(In reply to Lee Salzman [:eihrul] from comment #7) > (In reply to Jeff Muizelaar [:jrmuizel] from comment #6) > > How do other browsers handle these cases? > > Chrome ignores it in this case. So this makes us match them?
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8) > (In reply to Lee Salzman [:eihrul] from comment #7) > > (In reply to Jeff Muizelaar [:jrmuizel] from comment #6) > > > How do other browsers handle these cases? > > > > Chrome ignores it in this case. > > So this makes us match them? More or less, the transform seems to not take effect for them. In any event, this is much better than bombing out.
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8) > (In reply to Lee Salzman [:eihrul] from comment #7) > > (In reply to Jeff Muizelaar [:jrmuizel] from comment #6) > > > How do other browsers handle these cases? > > > > Chrome ignores it in this case. > > So this makes us match them? Also verified against Internet Explorer. This patch would make us match both Chrome and IE (and not crash).
Updated•9 years ago
|
Attachment #8644073 -
Flags: review?(jmuizelaar) → review+
Comment 11•9 years ago
|
||
It would be nice to add a test for case this to the web-platform-tests
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/97de68014b7a https://hg.mozilla.org/integration/mozilla-inbound/rev/da1c20faa1d3
Keywords: checkin-needed
Comment 13•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/97de68014b7a https://hg.mozilla.org/mozilla-central/rev/da1c20faa1d3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•