Closed Bug 764066 Opened 12 years ago Closed 9 years ago

CanvasRenderingContext2D::DrawImage for discarded image randomly throws NS_ERROR_NOT_AVAILABLE (browser_bug666317.js)

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: justin.lebar+bug, Unassigned)

References

Details

This is the same as bug 761049, but with less bugspam.

The test in question uses drawImage in an attempt to force an image to be decoded; it's the drawImage call which throws intermittently.

There are only two places where nsCanvasRenderingContext2D can return NS_ERROR_NOT_AVAILABLE.  But this is all layout-y stuff that's beyond my ken.

The sheriffs would like us to figure this out, since this orange is happening a lot.
Joe, Roc: Any idea what is going on here, or who I should poke?
Unless someone just accidentally suppressed it in a way that will come back, I think the place to look is at mozilla-inbound pushes in the neighborhood of 2012-06-10 22:03:06, since that's the last time it happened on inbound.
Maybe http://hg.mozilla.org/integration/mozilla-inbound/rev/f08886a8cf22 ?  A bunch of layout changes were backed out in there.
So NS_ERROR_NOT_AVAILABLE can only happen when res.mSurface is null but !res.mIsStillLoading, afaict, when an actual image is passed to drawImage.

As far as I can tell, that can happen in the following cases:

1)  The imgIRequest has STATUS_ERROR (and not STATUS_LOAD_COMPLETE)
2)  GetImagePrincipal() fails or returns null.
3)  GetImage() fails or returns null.
4)  GetFrame() or GetWidth() or GetHeight() on the image container fails.

It'd be pretty useful to know which of these is the problem.  Maybe add some logging code to the relevant branches in nsLayoutUtils::SurfaceFromElement(nsIImageLoadingContent* aElement), if this is happening often enough for that to work?
Well, it no longer happens at all on the trunk.

It still happened on Aurora, practically every Linux opt run, until it was disabled this morning, at which point http://mxr.mozilla.org/mozilla-central/source/netwerk/test/browser/browser_NetUtil.js began timing out nearly every run.

And this was actually the second thing, because this one started as soon as https://hg.mozilla.org/integration/fx-team/rev/7dded40bb32b stopped the Tilt tests from running because they were getting WebGL errors and then OOM.

Would OOM explain the NS_ERROR_NOT_AVAILABLE?
This apparently hasn't been seen in 3 years. Resolving.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.