Closed
Bug 958758
Opened 11 years ago
Closed 11 years ago
WebGL ABORT: Calling InitDecoder() but already decoded!: '!mDecoded'
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
Tracking | Status | |
---|---|---|
b2g-v1.3T | --- | fixed |
People
(Reporter: posidron, Assigned: tnikkel)
References
Details
(Keywords: crash, testcase, Whiteboard: [fuzzblocker])
Attachments
(4 files)
69.33 KB,
application/x-zip-compressed
|
Details | |
3.68 KB,
text/plain
|
Details | |
1.37 KB,
patch
|
seth
:
review+
|
Details | Diff | Splinter Review |
4.07 KB,
patch
|
seth
:
review+
|
Details | Diff | Splinter Review |
Reporter | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
It's probably the FinishedSomeDecoding call in SyncDecode just before the problematic InitDecoder call that sets mDecoded to true and nulls out mDecoder. Which is fine, because we need to wrap up that decode and throw it away and start a new one with the new decode flags. So I guesss we should check if we are mDecoded after the FinishedSomeDecoding call, and ForceDiscard if we are so we can get a new decoder in place lower down.
Assignee | ||
Comment 4•11 years ago
|
||
This does comment 3.
I didn't test that it fixed the testcase, but I think it should.
try builds are here http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/tnikkel@gmail.com-600b56b50bf0/ and here http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/tnikkel@gmail.com-5d8fde1d9564/
Assignee: nobody → tnikkel
Attachment #8358773 -
Flags: review?(seth)
Comment 5•11 years ago
|
||
Comment on attachment 8358773 [details] [diff] [review]
patch
Review of attachment 8358773 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me. (Though we definitely have design issues here, but this is the right short-term fix.)
::: image/src/RasterImage.cpp
@@ +2377,5 @@
> + if (mDecoded) {
> + // If we've finished decoding we need to discard so we can re-decode
> + // with the new flags. If we can't discard then there isn't
> + // anything we can do.
> + if (!CanForciblyDiscard() || mDecoder || mAnim)
This will introduce the third place we use this exact if-condition in RasterImage.cpp. Can we think up a name for this and convert it into a function? Perhaps CanForciblyDiscardAndRedecode()?
Having all of CanDiscard / CanForciblyDiscard / CanForciblyDiscardAndRedecode suggests to me that we don't have these functions factored correctly, but that's probably best handled in a separate bug.
Attachment #8358773 -
Flags: review?(seth) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Christoph, it would be great if your fuzzing in this area (images used as webgl textures) could include all four combinations of images with/without transparency and animating/non-animating images. That would test all codepaths in that area. You might already be doing this for all I know. :)
Flags: needinfo?(cdiehl)
Reporter | ||
Comment 7•11 years ago
|
||
Thanks for the hint. I am not sure about transparent images but animating and non-animating images are already used during fuzzing.
Flags: needinfo?(cdiehl)
Assignee | ||
Comment 8•11 years ago
|
||
I made it as a patch on top, I think that'll be clearer.
The case in RequestDiscard I was very conservative. It originally called CanDiscard and then ForceDiscard. Not sure if that was an oversight or what, so I just preserved the CanDiscard and added CanForciblyDiscardAndRedecode.
Attachment #8362037 -
Flags: review?(seth)
Comment 9•11 years ago
|
||
Christoph, sorry to needinfo you again but I just wanted to add to Timothy's suggestion: we should also fuzz both premultiplied alpha and non-premultiplied-alpha textures for webgl, since the two can trigger significantly different behavior, especially in a mixed-HTML-and-WebGL situation where the same image is used in both contexts on the same page.
Flags: needinfo?(cdiehl)
Comment 10•11 years ago
|
||
Comment on attachment 8362037 [details] [diff] [review]
Factor out discard checks.
Review of attachment 8362037 [details] [diff] [review]:
-----------------------------------------------------------------
Love it!
Attachment #8362037 -
Flags: review?(seth) → review+
Assignee | ||
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cb09583bf5ca
https://hg.mozilla.org/mozilla-central/rev/27b19b03da11
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Reporter | ||
Comment 13•11 years ago
|
||
(In reply to Seth Fowler [:seth] from comment #9)
> Christoph, sorry to needinfo you again but I just wanted to add to Timothy's
> suggestion: we should also fuzz both premultiplied alpha and
> non-premultiplied-alpha textures for webgl, since the two can trigger
> significantly different behavior, especially in a mixed-HTML-and-WebGL
> situation where the same image is used in both contexts on the same page.
Noted. :-)
Flags: needinfo?(cdiehl)
Comment 14•11 years ago
|
||
Reproduced in Nightly 2014-01-09-mozilla-central-debug.
Verified fixed Nightly 2014-01-26-mozilla-central-debug, win 7 x64.
Status: RESOLVED → VERIFIED
Updated•11 years ago
|
blocking-b2g: --- → 1.3T?
Comment 15•11 years ago
|
||
blocks Bug 962670
1.3T+
blocking-b2g: 1.3T? → 1.3T+
status-b2g-v1.3T:
--- → ?
Comment 16•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•