Closed
Bug 989707
Opened 11 years ago
Closed 11 years ago
Skia canvas: failed assertion "currE->fLastY >= curr_y"
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: jruderman, Assigned: gw280)
References
Details
(Keywords: assertion, testcase, Whiteboard: [skia-upstream])
Attachments
(3 files)
Debug:
gfx/skia/trunk/src/core/SkScan_Path.cpp:137: failed assertion "currE->fLastY >= curr_y"
Non-debug:
nothing bad happens
Reporter | ||
Comment 1•11 years ago
|
||
This is with:
user_pref("gfx.canvas.azure.backends", "skia");
Comment 2•11 years ago
|
||
Can you post a stack?
Reporter | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
In a nutshell:
- We build an SkPath
- We grab the bounds of the path (floatrect)
- We convert that to an intrect
- We create a list of edges in the path
- We sort the edge list by y value
- We walk through the edgelist from top to bottom, starting at the y coordinate for the top of the bounding rect and stopping at the y coordinate for the bottom.
The reason we're failing this assert is because the path boundary happens to lie on 0.499999997 or so, and then we add 0.5f then floor to do a round to int, which returns 1 instead of 0 as that's the closest representable floating point value. The edge of the path that fails lies on Y=0 and it blows up because start_y is 1 instead of 0 (rounded from the original 0.499999...). I think it doesn't happen for 0.5 <= start_y <= 1.0 because the edge builder will generate edges in that case with y = 1 rather than y = 0.
I think the solution here is that as we're using this rect to determine the start_y and stop_y coordinates for walking through the edgelist, we should roundOut() instead of round() which will take the floor of (top,left) and the ceil of (bottom,right).
Attachment #8399307 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 5•11 years ago
|
||
To clarify: SkEdge uses fixed point arithmetic rather than floating point, so it'll have different rounding behaviour for values very close to (but not quite) 0.5.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gwright
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Comment on attachment 8399307 [details] [diff] [review]
0001-Bug-989707-roundOut-the-bounds-rect-instead-of-round.patch
Review of attachment 8399307 [details] [diff] [review]:
-----------------------------------------------------------------
Seems pretty reasonable to me, but you should get this upstreamed and reviewed by the skia team asap.
Attachment #8399307 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 8•11 years ago
|
||
My thoughts exactly. Mike's away this week so I'll be following up directly with him when he's back.
Assignee | ||
Updated•11 years ago
|
Whiteboard: [skia-upstream]
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 11•11 years ago
|
||
The following changeset is now in Firefox Nightly:
> 5f286e259379 Bug 989707 - roundOut() the bounds rect instead of round(), as round() can return a rect that's not quite large enough to cover the path r=mattwoodrow
Nightly Build Information:
ID: 20140402030201
Changeset: 4941a2ac0786109b08856738019b016a6c5a66a6
Version: 31.0a1
TBPL: https://tbpl.mozilla.org/?rev=4941a2ac0786
URL: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central
Download Links:
> Linux x86: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-i686.tar.bz2
> Linux x86_64: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-x86_64.tar.bz2
> Linux x86_64 ASAN: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-x86_64-asan.tar.bz2
> Mac: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.mac.dmg
> Win32: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.win32.installer.exe
> Win64: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.win64-x86_64.installer.exe
Previous Nightly Build Information:
ID: 20140401030203
Changeset: 1417d180a1d8665b1a91b897d1cc4cc31e7980d4
Version: 31.0a1
TBPL: https://tbpl.mozilla.org/?rev=1417d180a1d8
URL: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-01-03-02-03-mozilla-central
Assignee | ||
Comment 12•11 years ago
|
||
Upstream fixed this a different way: https://code.google.com/p/skia/source/detail?r=14566
You need to log in
before you can comment on or make changes to this bug.
Description
•