Closed Bug 1648123 Opened 3 months ago Closed 3 months ago

Crash in webrtc::videocapturemodule::DeviceInfoAndroid::BuildDeviceList()

Categories

(Core :: WebRTC: Audio/Video, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- fixed

People

(Reporter: agi, Assigned: dminor)

Details

(Keywords: crash, Whiteboard: [geckoview:p1][fenix:p1])

Crash Data

Attachments

(1 file)

This bug is for crash report bp-25a40724-bfcd-49ee-b244-2c62a0200624.

Top 10 frames of crashing thread:

0 libc.so libc.so@0x832a8 
1 libc.so libc.so@0x83278 
2 libart.so libart.so@0x4b9f90 
3 libbase.so libbase.so@0xb458 
4 libart.so libart.so@0x4ff530 
5 libart.so libart.so@0x166a48 
6 libart.so libart.so@0x153a48 
7 libart.so libart.so@0x52701c 
8 libart.so libart.so@0x52ab90 
9 libart.so libart.so@0x40f640 
...
21 	libxul.so 	webrtc::videocapturemodule::DeviceInfoAndroid::BuildDeviceList() 	dom/media/systemservices/android_video_capture/device_info_android.cc:125 	frame_pointer
22 	libxul.so 	mozilla::camera::VideoEngine::SetAndroidObjects() 	dom/media/systemservices/VideoEngine.cpp:34 	cfi
23 	libxul.so 	mozilla::camera::VideoEngine::GetOrCreateVideoCaptureDeviceInfo() 	dom/media/systemservices/VideoEngine.cpp:177 	cfi
24 	libxul.so 	mozilla::camera::CamerasParent::SetupEngine(mozilla::camera::CaptureEngine) 	dom/media/systemservices/CamerasParent.cpp:366 	cfi
25 	libxul.so 	mozilla::camera::CamerasParent::EnsureInitialized(int) 	dom/media/systemservices/CamerasParent.cpp:423 	cfi
26 	libxul.so 	mozilla::media::LambdaRunnable<mozilla::camera::CamerasParent::RecvEnsureInitialized(mozilla::camera::CaptureEngine const&)::$_4>::Run() 	dom/media/systemservices/MediaUtils.h:73 	cfi
27 	libxul.so 	nsThread::ProcessNextEvent(bool, bool*) 	xpcom/threads/nsThread.cpp:1234 	cfi
28 	libxul.so 	mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) 	ipc/glue/MessagePump.cpp:302 	cfi
29 	libxul.so 	MessageLoop::Run() 	ipc/chromium/src/base/message_loop.cc:290 	cfi
30 	libxul.so 	base::Thread::ThreadMain() 	ipc/chromium/src/base/thread.cc:192 	cfi
31 	libxul.so 	ThreadFunc(void*) 	ipc/chromium/src/base/platform_thread_posix.cc:40 	cfi

There's probably more crashes related to this. I can find them later.

Component: General → WebRTC
Product: GeckoView → Core
Whiteboard: [geckoview]

Looking at crash stats for related crashes, there's also crashes with stacks like: https://crash-stats.mozilla.org/report/index/0f2be001-e784-42bd-9782-b53f00200622, which hit: https://hg.mozilla.org/mozilla-central/file/3155ffead6aefd99f4cef141b19163b881c0e288/widget/android/nsWindow.cpp#l1225. Both stacks involve code that uses JNI, not sure if that indicates the same underlying cause or two separate problems.

Severity: -- → S3
Component: WebRTC → WebRTC: Audio/Video

(In reply to Dan Minor [:dminor] from comment #2)

Looking at crash stats for related crashes, there's also crashes with stacks like: https://crash-stats.mozilla.org/report/index/0f2be001-e784-42bd-9782-b53f00200622, which hit: https://hg.mozilla.org/mozilla-central/file/3155ffead6aefd99f4cef141b19163b881c0e288/widget/android/nsWindow.cpp#l1225. Both stacks involve code that uses JNI, not sure if that indicates the same underlying cause or two separate problems.

Yeah that one is a separate bug that's mixed up with this one for some reason (already landed a fix for that)

Whiteboard: [geckoview] → [geckoview:p1][fenix:p1]

(In reply to Agi Sferro | :agi | ⏰ PST | he/him from comment #3)

(In reply to Dan Minor [:dminor] from comment #2)

Looking at crash stats for related crashes, there's also crashes with stacks like: https://crash-stats.mozilla.org/report/index/0f2be001-e784-42bd-9782-b53f00200622, which hit: https://hg.mozilla.org/mozilla-central/file/3155ffead6aefd99f4cef141b19163b881c0e288/widget/android/nsWindow.cpp#l1225. Both stacks involve code that uses JNI, not sure if that indicates the same underlying cause or two separate problems.

Yeah that one is a separate bug that's mixed up with this one for some reason (already landed a fix for that)

What was the bug number for the other bug?

Flags: needinfo?(agi)

Bug 1644561 (sorry it's restricted). A fix to disambiguate these kind of crashes is landing in Bug 1644234, so we should have better numbers soon.

Flags: needinfo?(agi)

Thanks, I'm going to add exception and nullptr checks after the jni call. Looking through the code, it's not obvious what would cause this to throw or return null, but that's my best guess for what is going wrong here. If something goes wrong, we won't return any cameras, but that is better than crashing.

Assignee: nobody → dminor
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1150d73f382c
Add exception and nullptr checks after calling getDeviceInfo; r=ng
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.