Closed Bug 1042689 Opened 7 years ago Closed 7 years ago

crash in java.lang.RuntimeException: Camera is already stopped! at org.webrtc.videoengine.VideoCaptureAndroid.stopCapture(VideoCaptureAndroid.java)

Categories

(Core :: WebRTC, defect)

ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox31 --- unaffected
firefox32 --- affected
firefox33 --- affected
firefox34 --- affected

People

(Reporter: cos_flaviu, Assigned: gcp)

Details

(Keywords: crash, regression, reproducible)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-dbf6ba96-0551-4d03-9c7e-da90f2140723.
=============================================================

Environment: 
Device: Samsung Galaxy R (Android 2.3.4);
Build: Nightly 34.0a1 (2014-07-23);

Steps to reproduce:
1. Go to http://mozilla.github.com/webrtc-landing/gum_test.html and select Video;
2. Accept permissions;
3. Quit Firefox by selecting 'Quit' from the options menu.

Expected result:
Firefox successfully quits.

Actual result:
Firefox crashes.

Stack trace:
java.lang.RuntimeException: Camera is already stopped!
	at org.webrtc.videoengine.VideoCaptureAndroid.stopCapture(VideoCaptureAndroid.java:235)
	at dalvik.system.NativeStart.run(Native Method)
Component: General → WebRTC
Product: Firefox for Android → Core
>3. Quit Firefox by selecting 'Quit' from the options menu.

Clarified on IRC this requires "clear data on quit" or something similar to be enabled.
Assignee: nobody → gpascutto
Gingerbread has a quit menu item by default for reasons I can't remember why
Last good build: 2014-05-30;
First bad build: 2014-05-31;

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e6f113c83095&tochange=323156681cef
Almost certainly caused by the 987979 update.
When pressing quit, the Android code gets the onPause notification before the native code has had a chance to stop the camera. So it'll pause, disable the camera, after which the native code tries to stop the already stopped capture.

Deal with this correctly. Coincidentally also deal with getting a stopCapture exactly when we're being backgrounded, which looks pretty much the same.
Attachment #8466208 - Flags: review?(rjesup)
Attachment #8466208 - Flags: review?(rjesup) → review+
https://hg.mozilla.org/mozilla-central/rev/68551387765a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.