Closed Bug 831821 Opened 7 years ago Closed 7 years ago

add exception handling so we always clean up our video elements

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: djf, Assigned: djf)

Details

As described in bug 830995 and bug 831747, camera/js/filmstrip.js sometimes gets a mystery exception while creating a video thumbnail. When this happens the exception prevents proper cleanup of the <video> element that was in use to create the thumbnail.  And later, this causes resource contention that freezes up the camera.

This bug is just about adding exception handling to avoid this freeze.
Taking this bug, cc'ing people and nominating for tef+ because this fix will be trivial and will prevent a freeze in the camera.
Assignee: nobody → dflanagan
blocking-b2g: --- → tef?
I can't actually reproduce the freeze described here: https://bugzilla.mozilla.org/show_bug.cgi?id=830995#c17

Mike can you still reproduce it?

I'm using the nightly build from https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-b2g18-unagi/latest/unagi.zip

If you can still reproduce, Mike, I can create a gaia patch for you to try, but it looks like I'm not going to be able to test this myself.
(In reply to David Flanagan [:djf] from comment #2)
> I can't actually reproduce the freeze described here:
> https://bugzilla.mozilla.org/show_bug.cgi?id=830995#c17
> 
> Mike can you still reproduce it?
> 
> I'm using the nightly build from
> https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-b2g18-
> unagi/latest/unagi.zip
> 

I also can not reproduce this.

But I assume, the exception is thrown by a failure of GonkIOSurfaceImage::GetAsSurface(). The function copy video data from gralloc buffer to gfxImageSurface and also do color convert. From the above failure, nsCanvasRenderingContext2DAzure::DrawImage () throws exception.

I assume this story.

http://mxr.mozilla.org/mozilla-central/source/gfx/layers/GonkIOSurfaceImage.cpp#79
(In reply to Sotaro Ikeda [:sotaro] from comment #3)
> (In reply to David Flanagan [:djf] from comment #2)
> 
> I also can not reproduce this.
> 

I use today's source from git.
I just tested regular and debug builds against what's currently in m-i, and am also unable to reproduce.
Closing since none of us can reproduce anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
blocking-b2g: tef? → ---
You need to log in before you can comment on or make changes to this bug.