Closed Bug 1382681 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: WebRTC, defect, P1)

56 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- wontfix
firefox55 --- fixed
firefox56 --- fixed

People

(Reporter: marcia, Assigned: dminor)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-c62bbc1a-1252-4cdf-9eed-71f080170720.
=============================================================

Seen while looking at crash stats. Fennec #29 top crash: http://bit.ly/2tj4Yv2

Seen across nightly, beta and release branches and affects many different Android versions/phones.
Found here: http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java#278

Offhand, it feels like this should just get logged rather than causing a fatal error. Unless this is a symptom of a more serious problem.
Assignee: nobody → dminor
Rank: 15
Priority: -- → P1
I did a little testing on the emulator and my phone and did not see any problems with calling stop twice.
Attachment #8889913 - Flags: review?(rjesup)
Status: NEW → ASSIGNED
Attachment #8889913 - Flags: review?(rjesup) → review+
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad37214e0d8f
Remove java.lang.RuntimeException in VideoCaptureAndroid; r=jesup
https://hg.mozilla.org/mozilla-central/rev/ad37214e0d8f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Looks pretty high-frequency. Please nominate this for Beta approval when you get a chance so we can hopefully get it into Monday's b14 build.
Flags: needinfo?(dminor)
Comment on attachment 8889913 [details] [diff] [review]
Replace exception with log statement

Approval Request Comment
[Feature/Bug causing the regression]:
This code was introduced when we updated to release 57 of webrtc.org: Bug 1341285.
[User impact if declined]:
This is a frequent crash on Android.
[Is this code covered by automated tests?]:
We definitely shutdown the camera in the automated tests; it is hard to say whether the situation which causes shutdown to occur twice is in the tests. I haven't seen an intermittent failure like this.
[Has the fix been verified in Nightly?]:
Just merged to nightly, we won't see the updated crashstats until Monday.
[Needs manual test from QE? If yes, steps to reproduce]:
No. 
[List of other uplifts needed for the feature/fix]:
None.
[Is the change risky?]:
No.
[Why is the change risky/not risky?]:
This simply replaces the thrown exception with a statement to log the error.
[String changes made/needed]:
None.
Flags: needinfo?(dminor)
Attachment #8889913 - Flags: approval-mozilla-beta?
(In reply to Dan Minor [:dminor] from comment #6)
> [Feature/Bug causing the regression]:
> This code was introduced when we updated to release 57 of webrtc.org: Bug
> 1341285.

That seems rather unlikely.  Bug 1341285 is only on 56, this crash is present on 53 already.
Comment on attachment 8889913 [details] [diff] [review]
Replace exception with log statement

log instead of crashing, for fennec 55.0b14
Attachment #8889913 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Julien Cristau [:jcristau] (away until Aug 21) from comment #7)
> (In reply to Dan Minor [:dminor] from comment #6)
> > [Feature/Bug causing the regression]:
> > This code was introduced when we updated to release 57 of webrtc.org: Bug
> > 1341285.
> 
> That seems rather unlikely.  Bug 1341285 is only on 56, this crash is
> present on 53 already.

The code showed up as newly added when I looked at the history, presumably there was equivalent code in earlier versions.
You need to log in before you can comment on or make changes to this bug.