Closed
Bug 1036657
Opened 10 years ago
Closed 10 years ago
"Assertion failure: intercept.HasPositiveWCoord()"
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: jruderman, Assigned: bjacob)
References
Details
(Keywords: assertion, testcase)
Attachments
(3 files)
Assertion failure: intercept.HasPositiveWCoord(), at gfx/thebes/gfx3DMatrix.cpp:821 This assertion was just added, in bug 1031948.
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
also found on http://letour.yorkshire.com/stage-1/race-day-photos as example
Assignee | ||
Comment 3•10 years ago
|
||
My bad for not catching this during review. I can reproduce; intercept.w is NaN. That is because the points that we are working on have 'inf' coordinates in this testcase. Even if they hadn't, in ComputePerspectivePlaneIntercept we do: float w = 0.00001f; float t = (w - aFirst.w) / (aSecond.w - aFirst.w); // Use t to find the remainder of the components return aFirst + (aSecond - aFirst) * t; So we could easily end up with NaN if the computation of t were a 0/0 division. Finally, that assertion could also fail if loss of precision caused w to be exactly zero. All in all, I think that that assertion is bad and needs to be removed. Note that MOZ_ASSERT already prevents people from accidentally writing assertions on floating-point values being nonzero (MOZ_ASSERT(x)) as those are most often bad assertions. But here we are not in a trivial case that MOZ_ASSERT's static checking can catch for us.
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8458845 -
Flags: review?(matt.woodrow)
Updated•10 years ago
|
Attachment #8458845 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d4a18a375d0
Assignee: nobody → bjacob
https://hg.mozilla.org/mozilla-central/rev/9d4a18a375d0
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•