Crash [@ libdvm.so@0x50e96 ]

RESOLVED FIXED in Firefox 28

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Flaviu Cos, Assigned: gcp)

Tracking

({crash, reproducible})

Trunk
Firefox 28
All
Android
crash, reproducible
Points:
---

Firefox Tracking Flags

(fennec+)

Details

(crash signature)

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
This bug was filed from the Socorro interface and is 
report bp-3820efd6-ca2f-445f-bffd-f8e3c2131030.
=============================================================

Stack trace:
0 	libc.so 	libc.so@0xd590 	
1 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x10f6ce 	
2 	libdvm.so 	libdvm.so@0x7c975 	
3 	libdvm.so 	libdvm.so@0x2867e 	
4 	libdvm.so 	libdvm.so@0x82371 	
5 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x661016 	
6 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x661016 	
7 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xa5a296 	
8 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xa5a296 	
9 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x661016 	
10 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xa5a296 	
11 	libdvm.so 	libdvm.so@0x7b735 	
12 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xa5a296 	
13 	libdvm.so 	libdvm.so@0xb7c56 	
14 	libdvm.so 	libdvm.so@0x33a8a 	
15 	libdvm.so 	libdvm.so@0xb7c56 	
16 	libdvm.so 	libdvm.so@0xb2f8e 	
17 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x10f326 	
18 	libdvm.so 	libdvm.so@0x2867e 	
19 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x2bce16 	
20 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xd8756 	
21 	libdvm.so 	libdvm.so@0x34692 	
22 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x10f326 	
23 	libdvm.so 	libdvm.so@0x2867e 	
24 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xd8756 	
25 	libdvm.so 	libdvm.so@0x2093e 	
26 	libdvm.so 	libdvm.so@0x74beb 	
27 	libdvm.so 	libdvm.so@0xb2f8e 	
28 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0xa0a7e 	
29 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x6693c2 	
30 	libdvm.so 	libdvm.so@0x342e6 	
31 	libdvm.so 	libdvm.so@0x74beb 	
32 	libdvm.so 	libdvm.so@0xb7c56 	
33 	libdvm.so 	libdvm.so@0xb7c56 	
34 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x661016 	
35 	framework.odex 	framework.odex@0x49ac36 	
36 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0xc2a6 	
37 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x669406 	
38 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0xa0a7e 	
39 	libdvm.so 	libdvm.so@0xb2f8e 	
40 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x6694b2 	
41 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x6693c2 	
42 	libdvm.so 	libdvm.so@0x6cb63 	
43 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x661016 	
44 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x2a6 	
45 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x66949e 	
46 	libdvm.so 	libdvm.so@0x7b735 	
47 	libdvm.so 	libdvm.so@0xb7c56 	
48 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x66949e 	
49 	libdvm.so 	libdvm.so@0xb7c56 	
50 	libdvm.so 	libdvm.so@0x33a8a 	
51 	libdvm.so 	libdvm.so@0x4fda3 	
52 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x936 	
53 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xe8e 	
54 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x5681e 	
55 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x6693ae 	
56 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0xa0a7e 	
57 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x66949e 	
58 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x2a6 	
59 	libdvm.so 	libdvm.so@0x73fc1 	
60 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x2a6 	
61 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0xbe3e 	
62 	core.odex 	core.odex@0xacbc4 	
63 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x42de 	
64 	libdvm.so 	libdvm.so@0x1edbe 	
65 	libdvm.so 	libdvm.so@0x30a8e 	
66 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x2fa6 	
67 	libdvm.so 	libdvm.so@0xb2f8e 	
68 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x8bad6 	
69 	libdvm.so 	libdvm.so@0x342e6
(Reporter)

Comment 1

4 years ago
Steps to reproduce:
1. Visit http://mozilla.github.com/webrtc-landing/gum_test.html;
2. Tap on Audio & Video button;
3. From the pop-up select front facing camera and microphone and tap Share;
4. Tap Stop button.
5. Tap on Audio & Video button;
6. From the pop-up select back facing camera and microphone and tap Share;
7. Repeat steps 2 to 6 a few times;

Expected results:
The build in camera and microphone are working correctly.

Actual results:
After step 7 the application crashes.

Note:
The crash is reproducible only 2 out of 5 times.
tracking-fennec: --- → ?
Keywords: reproducible

Comment 2

4 years ago
FWIW, this was reported on an ASUS Transformer TF101 - the exact signature only exists on that and very similar (TF101G, SL101) tablets - but the address might vary with different devices/manufacturers.
Assignee: nobody → gpascutto
tracking-fennec: ? → +
(Assignee)

Comment 3

4 years ago
I can't reproduce this crash on: Nexus 7 (4.2), Galaxy Tab 10.0 (3.2), Motorola RAZR i (4.1.2), Nexus 4 (4.3). Galaxy S2 (2.3.6) didn't work due to bug 933284.

Looks device-specific to me.
(Assignee)

Comment 4

4 years ago
If someone who can go in with jimdb and get a real stacktrace has one of these ASUS tablets, it might be worth a shot, else not much hope of fixing this.
> #0  0x40779e88 in dvmAbort () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libdvm.so
> #1  0x4077dfda in dvmDecodeIndirectRef(Thread*, _jobject*) ()
>    from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libdvm.so
> #2  0x40780cda in ?? () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libdvm.so
> #3  0x63db5a06 in NewGlobalRef (obj=<optimized out>, this=0x5a0f3760)
>     at /home/nchen/ndk/platforms/android-14/arch-arm/usr/include/jni.h:563
> #4  webrtc::videocapturemodule::VideoCaptureAndroid::Init (this=0x6c4b7800, id=4098,
>     deviceUniqueIdUTF8=<optimized out>)
>     at /home/nchen/central/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc:342
> #5  0x63db616a in webrtc::videocapturemodule::VideoCaptureImpl::Create (id=4098,
>     deviceUniqueIdUTF8=0x6d3ffd70 "Camera 0, Facing back, Orientation 0")
>     at /home/nchen/central/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc:44
> #6  0x63deb350 in webrtc::ViECapturer::Init (this=this@entry=0x5da5e580,
>     device_unique_idUTF8=device_unique_idUTF8@entry=0x6d3ffd70 "Camera 0, Facing back, Orientation 0", device_unique_idUTF8Length=device_unique_idUTF8Length@entry=256)
>     at /home/nchen/central/media/webrtc/trunk/webrtc/video_engine/vie_capturer.cc:166
> #7  0x63deb3bc in webrtc::ViECapturer::CreateViECapture (capture_id=4098, engine_id=0, config=...,
>     device_unique_idUTF8=0x6d3ffd70 "Camera 0, Facing back, Orientation 0",
>     device_unique_idUTF8Length=256, module_process_thread=...)
>     at /home/nchen/central/media/webrtc/trunk/webrtc/video_engine/vie_capturer.cc:151
> #8  0x63df592c in webrtc::ViEInputManager::CreateCaptureDevice (this=0x6a16f800,
>     device_unique_idUTF8=0x6d3ffd70 "Camera 0, Facing back, Orientation 0",
>     device_unique_idUTF8Length=256, capture_id=@0x6d0dfa1c: 0)
>     at /home/nchen/central/media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc:265
> #9  0x63de5522 in webrtc::ViECaptureImpl::AllocateCaptureDevice (this=0x6a1f71f4,
>     unique_idUTF8=0x6d3ffd70 "Camera 0, Facing back, Orientation 0", unique_idUTF8Length=256,
>     capture_id=@0x6d0dfa1c: 0)
>     at /home/nchen/central/media/webrtc/trunk/webrtc/video_engine/vie_capture_impl.cc:100
> #10 0x63336a32 in mozilla::MediaEngineWebRTCVideoSource::Allocate (this=0x6d0df9d0, aPrefs=...)
>     at /home/nchen/central/content/media/webrtc/MediaEngineWebRTCVideo.cpp:247
> #11 0x63435e66 in mozilla::GetUserMediaRunnable::ProcessGetUserMedia (this=this@entry=0x6cf67530,
>     aAudioSource=aAudioSource@entry=0x69ed1a10, aVideoSource=0x6d0df9d0)
>     at /home/nchen/central/dom/media/MediaManager.cpp:982
> #12 0x63436bb8 in mozilla::GetUserMediaRunnable::Run (this=0x6cf67530)
>     at /home/nchen/central/dom/media/MediaManager.cpp:881
> #13 0x63bdbee4 in nsThread::ProcessNextEvent (this=0x6afb7b00, mayWait=<optimized out>,
>     result=0x6d3ffe8f) at /home/nchen/central/xpcom/threads/nsThread.cpp:622
> #14 0x63baa83c in NS_ProcessNextEvent (thread=0x6afb7b00, mayWait=<optimized out>)
>     at /home/nchen/central/xpcom/glue/nsThreadUtils.cpp:251
> #15 0x63bdc4f6 in nsThread::ThreadFunc (arg=0x6afb7b00)
>     at /home/nchen/central/xpcom/threads/nsThread.cpp:250
> #16 0x603ba874 in _pt_root (arg=0x6b618d00)
>     at /home/nchen/central/nsprpub/pr/src/pthreads/ptthread.c:204
> #17 0x400f8dd4 in __thread_entry ()
>    from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
> #18 0x400f852c in pthread_create ()
>    from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
(Assignee)

Comment 6

4 years ago
Interesting bits from jchen's adb logcat:

    D/*WEBRTC-VCA( 5034): SetAndroidObjects: running
    D/*WEBRTC-VCA( 5034): SetAndroidObjects: Registered native functions
    D/*WEBRTC-VCA( 5034): VideoCaptureDeviceInfoAndroid get method id
    D/*WEBRTC-VCA( 5034): SetAndroidObjects: construct static java device object
    D/WEBRTC  ( 5034): VideoCaptureDeviceInfoAndroid
    D/WEBRTC  ( 5034): Camera 0, Facing back, Orientation 0
    V/WEBRTC  ( 5034): VideoCaptureDeviceInfo , maxFPS: 30, width: 176, height: 144
    D/WEBRTC  ( 5034): Camera 1, Facing front, Orientation 0
    V/WEBRTC  ( 5034): VideoCaptureDeviceInfo , maxFPS: 30, width: 176, height: 144
    D/*WEBRTC-VCA( 5034): SetAndroidObjects: success
    D/WEBRTC  ( 5034): AllocateCamera Camera 1, Facing front, Orientation 0
    V/WEBRTC  ( 5034): AllocateCamera - creating VideoCaptureAndroid
    D/WEBRTC-JC( 5034): VideoCaptureAndroid::onSurfaceTextureAvailable
    D/WEBRTC-JC( 5034): tryStartCapture -1 height -1 frame rate -1 isCaptureRunning false isSurfaceReady true isCaptureStarted false
    D/WEBRTC-JC( 5034): StartCapture width 640 height 480 frame rate 30
    D/WEBRTC-JC( 5034): tryStartCapture 640 height 480 frame rate 30 isCaptureRunning false isSurfaceReady true isCaptureStarted true
    D/*WEBRTC-VCA( 5034): SetAndroidObjects: running
    D/*WEBRTC-VCA( 5034): SetAndroidObjects: early exit
    D/dalvikvm( 5034): Attempt to remove stale global reference 0x1fc002fe
    W/dalvikvm( 5034): JNI: DeleteGlobalRef(0x1fc002fe) failed to find entry
    D/WEBRTC  ( 5034): AllocateCamera Camera 0, Facing back, Orientation 0
    W/dalvikvm( 5034): Invalid indirect reference 0x4216a0a8 in decodeIndirectRef
    E/dalvikvm( 5034): VM aborting
    I/Process (  421): Sending signal. PID: 5034 SIG: 3
    I/ActivityManager(  421): Process org.mozilla.fennec_nchen (pid 5034) has died.
(Assignee)

Comment 7

4 years ago
>    D/dalvikvm( 5034): Attempt to remove stale global reference 0x1fc002fe
>    W/dalvikvm( 5034): JNI: DeleteGlobalRef(0x1fc002fe) failed to find entry

This looks scary but it could be bug 933705.

http://hg.mozilla.org/mozilla-central/file/48dbd532a004/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc#l342

javaCameraObjLocal is checked. Could this be an exception being thrown in CreateVideoCaptureDeviceInfoAndroid which doesn't trigger the error check just before we bomb out?
Patch from bug 933705 doesn't appear to help. Still crashing :(
(Assignee)

Comment 9

4 years ago
Problem still occurs after uplifting 3.43:

#0  0x4076be88 in dvmAbort () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libdvm.so
#1  0x4076ffda in dvmDecodeIndirectRef(Thread*, _jobject*) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libdvm.so
#2  0x40772cda in ?? () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libdvm.so
#3  0x63f260c0 in webrtc::videocapturemodule::VideoCaptureAndroid::Init(int, char const*) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#4  0x63f265e2 in webrtc::videocapturemodule::VideoCaptureImpl::Create(int, char const*) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#5  0x63f52e0c in webrtc::ViECapturer::Init(char const*, unsigned int) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#6  0x63f52e6a in webrtc::ViECapturer::CreateViECapture(int, int, webrtc::Config const&, char const*, unsigned int, webrtc::ProcessThread&) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#7  0x63f5a8fe in webrtc::ViEInputManager::CreateCaptureDevice(char const*, unsigned int, int&) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#8  0x63f4d3ec in webrtc::ViECaptureImpl::AllocateCaptureDevice(char const*, unsigned int, int&) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#9  0x6386c50c in mozilla::MediaEngineWebRTCVideoSource::Allocate(mozilla::MediaEnginePrefs const&)
    () from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#10 0x6390477c in mozilla::GetUserMediaRunnable::ProcessGetUserMedia(mozilla::MediaEngineSource*, mozilla::MediaEngineSource*) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#11 0x639048e2 in mozilla::GetUserMediaRunnable::Run() ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#12 0x63de2674 in nsThread::ProcessNextEvent(bool, bool*) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#13 0x63dc4ece in NS_ProcessNextEvent(nsIThread*, bool) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#14 0x63de2d1e in nsThread::ThreadFunc(void*) ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libxul.so
#15 0x6030f4be in _pt_root ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/app/org.mozilla.fennec/assets/libnss3.so
#16 0x40050dd4 in __thread_entry ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
#17 0x4005052c in pthread_create ()
   from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
#18 0x00000000 in ?? ()

logcat:
https://pastebin.mozilla.org/3596701
(Assignee)

Comment 10

4 years ago
I can reproduce this if I make AllocateCamera throw an unexpected Error. There is some attempt to catch specific Exceptions in that function, but any random unchecked exception can still make it through and throw off the rest of the function.
(Assignee)

Comment 11

4 years ago
Created attachment 8336199 [details] [diff] [review]
Patch 1. Check for uncaught JNI exceptions

Catch all cases (in WebRTC) where we're doing multiple JNI->Java calls in a single AutoLocalJNIFrame, and handle that single function where we couldn't use the latter.
Attachment #8336199 - Flags: review?(blassey.bugs)
(Assignee)

Comment 12

4 years ago
Created attachment 8336201 [details] [diff] [review]
Patch 2. Remove unused rotation var.

Because why not.
Attachment #8336201 - Flags: review?(blassey.bugs)
(Assignee)

Updated

4 years ago
Attachment #8336201 - Attachment is patch: true
(Assignee)

Comment 13

4 years ago
jchen, does this fix the crash for you? I presume WebRTC will still be broken on those devices, but what error/trace do you see in logcat now?
Flags: needinfo?(nchen)
Attachment #8336201 - Flags: review?(blassey.bugs) → review+
Attachment #8336199 - Flags: review?(blassey.bugs) → review+
It no longer crashes, but the gUM page displays "HARDWARE_UNAVAILABLE"

Logcat, https://pastebin.mozilla.org/3648955
Flags: needinfo?(nchen)
But after I get "HARDWARE_UNAVAILABLE", if I refresh the page and try again, I get a different crash,

> #0  0x400502ce in ?? () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
> #1  0x40045bd8 in abort () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
> #2  0x400570ba in __assert2 () from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
> #3  0x641e19a0 in webrtc::OpenSlesInput::InitRecording (this=0x64e836cb)
> at /home/nchen/central/media/webrtc/trunk/webrtc/modules/audio_device/opensl/../android/opensles_input.cc:158
> #4  0x641ddf16 in webrtc::AudioDeviceModuleImpl::InitRecording (this=0x6a6fe000)
> at /home/nchen/central/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc:1610
> #5  0x641b2d0c in webrtc::VoEBaseImpl::StartSend (this=this@entry=0x67c440cc)
> at /home/nchen/central/media/webrtc/trunk/webrtc/voice_engine/voe_base_impl.cc:1037
> #6  0x641b2dd8 in webrtc::VoEBaseImpl::StartSend (this=0x67c440cc, channel=<optimized out>)
> at /home/nchen/central/media/webrtc/trunk/webrtc/voice_engine/voe_base_impl.cc:745
> #7  0x63e33fec in mozilla::MediaEngineWebRTCAudioSource::Start (this=0x6a620080, aStream=
> 0x6509e93a <webrtc::OpenSlesInput::InitRecording()::__PRETTY_FUNCTION__>, aID=2)
> at /home/nchen/central/content/media/webrtc/MediaEngineWebRTCAudio.cpp:183
> #8  0x63bc0b66 in mozilla::MediaOperationRunnable::Run (this=0x6a4051c0)
> at /home/nchen/central/dom/media/MediaManager.h:289
> #9  0x633e7e8a in nsThread::ProcessNextEvent (this=0x6c7adc10, mayWait=<optimized out>,
> result=0x6d6ffe8f) at /home/nchen/central/xpcom/threads/nsThread.cpp:613
> #10 0x633a50b4 in NS_ProcessNextEvent (thread=0x6c7adc10, mayWait=<optimized out>)
> at /home/nchen/central/xpcom/glue/nsThreadUtils.cpp:251
> #11 0x633eabe6 in nsThread::ThreadFunc (arg=0x6c7adc10)
> at /home/nchen/central/xpcom/threads/nsThread.cpp:251
> #12 0x60a80ac8 in _pt_root (arg=0x6d4d0e00)
> at /home/nchen/central/nsprpub/pr/src/pthreads/ptthread.c:204
> #13 0x4004add4 in __thread_entry ()
> from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
> #14 0x4004a52c in pthread_create ()
> from /home/nchen/android-gdb/lib/C3OKAS023419/system/lib/libc.so
> #15 0x00000000 in ?? ()

Logcat, https://pastebin.mozilla.org/3648991
(Assignee)

Comment 16

4 years ago
Okay, the error message is expected as Android is giving us this:
D/WEBRTC  ( 4780): AllocateCamera Camera 0, Facing back, Orientation 0
W/System.err( 4780): java.lang.RuntimeException: Fail to connect to camera service
W/System.err( 4780):    at android.hardware.Camera.native_setup(Native Method)
W/System.err( 4780):    at android.hardware.Camera.<init>(Camera.java:306)
W/System.err( 4780):    at android.hardware.Camera.open(Camera.java:268)
W/System.err( 4780):    at org.webrtc.videoengine.VideoCaptureDeviceInfoAndroid.AllocateCamera(VideoCaptureDeviceInfoAndroid.java:272)
W/System.err( 4780):    at dalvik.system.NativeStart.run(Native Method)
W/System.err( 4780):    at dalvik.system.NativeStart.run(Native Method)

The crash you get a bit later seems to be the webrtc.org code not handling the error well and tripping a debug assertion on not initializing twice. This might be harmless (in release mode) so I'm not going to bother diving into that for now.

The question is why we can't open the camera. What's strange is that the log is showing that the front Camera is already started and running when this happens!

D/WEBRTC  ( 4780): AllocateCamera Camera 1, Facing front, Orientation 0
V/WEBRTC  ( 4780): AllocateCamera - creating VideoCaptureAndroid
D/WEBRTC-JC( 4780): VideoCaptureAndroid::onSurfaceTextureAvailable
D/WEBRTC-JC( 4780): tryStartCapture -1 height -1 frame rate -1 isCaptureRunning false isSurfaceReady true isCaptureStarted false
D/WEBRTC-JC( 4780): StartCapture width 640 height 480 frame rate 30
D/WEBRTC-JC( 4780): tryStartCapture 640 height 480 frame rate 30 isCaptureRunning false isSurfaceReady true isCaptureStarted true
V/WEBRTC-JC( 4780): preview frame length 460800 context1576044544
V/WEBRTC-JC( 4780): preview frame length 460800 context1576044544
etc...
D/WEBRTC  ( 4780): AllocateCamera Camera 0, Facing back, Orientation 0
..boom!...

And we fail because of bug 881153, i.e.  Android can't open two cameras.

This gives me some idea what the underlying bug might be: If I start the gum page, start that test, and press stop, I never see a message that the camera driver is stopped. I will file a follow-up to debug this.

I also managed to reproduce it on my Nexus 4 a few times now.
(Assignee)

Comment 17

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/03ece8541cd1
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa0d790596e9
https://hg.mozilla.org/mozilla-central/rev/03ece8541cd1
https://hg.mozilla.org/mozilla-central/rev/fa0d790596e9
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.