Closed Bug 1063547 Opened 10 years ago Closed 10 years ago

crash in webrtc::ViEInputManager::NumberOfCaptureDevices()

Categories

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

All
Android
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla35
Tracking Status
firefox32 --- unaffected
firefox33 + verified
firefox34 + verified
firefox35 + verified
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed
fennec 33+ ---

People

(Reporter: u421692, Assigned: gcp)

References

Details

(Keywords: crash, regression, reproducible)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-5d594fe3-19cc-4aff-b136-0334d2140905.
=============================================================
Steps to reproduce:
1. Go to http://mozilla.github.io/webrtc-landing/gum_test.html
2. Tap on "Screen" button or "Window" button

Expected result:
Video permission is requested and video from camera is displayed.

Actual result:
Firefox crashes

Note:
Issue is reproducing also on Firefox Beta if "media.getusermedia.screensharing.enabled" is true and "mozilla.github.io" is added to "media.getusermedia.screensharing.allowed_domains"
Component: General → WebRTC: Audio/Video
Product: Firefox for Android → Core
tracking-fennec: --- → ?
Flags: needinfo?(mihai.g.pop)
2014-07-16 good build (media.getusermedia.screensharing.enabled WAS NOT present in about:config)
2014-07-17 bad build (media.getusermedia.screensharing.enabled WAS present in about:config)
when media.getusermedia.screensharing.enabled is FALSE, user can not share video, when TRUE Firefox crashes)

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=869971ad9fd6&tochange=a74600665875

Bug 983504 - Make GUM able to pull screen into a MediaStream might have caused the regression
Depends on: 983504
Flags: needinfo?(mihai.g.pop)
Blocks: 983504
No longer depends on: 983504
[Tracking Requested - why for this release]: regression from Fx32
Reproducible on my Galaxy S5.
Assignee: nobody → gpascutto
rogram received signal SIGSEGV, Segmentation fault.
[Switching to Thread 12316]
0x40088348 in ?? () from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
(gdb) bt
#0  0x40088348 in ?? () from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
#1  0x40086514 in abort () from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
#2  0x4007c1d4 in ?? () from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
#3  0x4007b6e4 in __assert2 ()
   from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
#4  0x7d96c432 in webrtc::ViEInputManager::NumberOfCaptureDevices (this=
    0x7ec9aaa8 <webrtc::ViEInputManager::NumberOfCaptureDevices()::__PRETTY_FUNCTION__>)
    at /home/morbo/hg/mozilla-central/media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc:68
#5  0x7d953468 in webrtc::ViECaptureImpl::NumberOfCaptureDevices (this=0x88950850)
    at /home/morbo/hg/mozilla-central/media/webrtc/trunk/webrtc/video_engine/vie_capture_impl.cc:77
#6  0x7d497f8e in mozilla::MediaEngineWebRTC::EnumerateVideoDevices (this=0x89d38600, aMediaSource=
    mozilla::Screen, aVSources=0x7ff20bf8)
    at /home/morbo/hg/mozilla-central/content/media/webrtc/MediaEngineWebRTC.cpp:222
#7  0x7cff3882 in mozilla::GetSources<mozilla::MediaEngineVideoSource, mozilla::VideoTrackConstraintsN> (
    engine=engine@entry=0x89d38600, aConstraints=..., aEnumerate=
    &virtual mozilla::MediaEngine::EnumerateVideoDevices(mozilla::MediaSourceType, nsTArray<nsRefPtr<mozilla::MediaEngineVideoSource> >*), media_device_name=0x7e6662cc <gNullChar> "")
    at /home/morbo/hg/mozilla-central/dom/media/MediaManager.cpp:915
#8  0x7cff9432 in mozilla::GetUserMediaDevicesRunnable::Run (this=0x887f94f0)
    at /home/morbo/hg/mozilla-central/dom/media/MediaManager.cpp:1343
#9  0x7c11ce22 in nsThread::ProcessNextEvent (this=0x89761c10, aMayWait=<optimized out>, 
    aResult=<optimized out>) at /home/morbo/hg/mozilla-central/xpcom/threads/nsThread.cpp:823
#10 0x7c13eca2 in NS_ProcessNextEvent (aThread=<optimized out>, aMayWait=<optimized out>)
    at /home/morbo/hg/mozilla-central/xpcom/glue/nsThreadUtils.cpp:265
#11 0x7c3b6254 in mozilla::ipc::MessagePumpForNonMainThreads::Run (this=0x89f14250, aDelegate=0x89d38280)
    at /home/morbo/hg/mozilla-central/ipc/glue/MessagePump.cpp:355
#12 0x7c394cd4 in MessageLoop::RunInternal (this=this@entry=0x89d38280)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:229
#13 0x7c394ce2 in MessageLoop::RunHandler (this=this@entry=0x89d38280)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:222
#14 0x7c394d20 in MessageLoop::Run (this=0x89d38280)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:196
#15 0x7c11e466 in nsThread::ThreadFunc (aArg=0x89761c10)
    at /home/morbo/hg/mozilla-central/xpcom/threads/nsThread.cpp:350
#16 0x78866dcc in _pt_root (arg=0x89543e00)
    at /home/morbo/hg/mozilla-central/nsprpub/pr/src/pthreads/ptthread.c:212
#17 0x40076a5c in __thread_entry ()
   from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
#18 0x40076bd8 in pthread_create ()
   from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
#19 0x00000000 in ?? ()
(gdb) up
#1  0x40086514 in abort () from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
(gdb) up
#2  0x4007c1d4 in ?? () from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
(gdb) up
#3  0x4007b6e4 in __assert2 ()
   from /home/morbo/git/android-gdb/moz-gdb/lib/00658c727e962a43/system/lib/libc.so
(gdb) up
#4  0x7d96c432 in webrtc::ViEInputManager::NumberOfCaptureDevices (this=
    0x7ec9aaa8 <webrtc::ViEInputManager::NumberOfCaptureDevices()::__PRETTY_FUNCTION__>)
    at /home/morbo/hg/mozilla-central/media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc:68
68        assert(capture_device_info_);
This disables the pref on Android (and removes a duplicate gUM enable),
and also protects against the actual crash, so if you enable it anyway
we'll just return that there are no appropriate devices instead of
crashing.
Attachment #8486502 - Flags: review?(rjesup)
Attachment #8486502 - Flags: review?(rjesup) → review+
https://hg.mozilla.org/mozilla-central/rev/55046777491a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Comment on attachment 8486502 [details] [diff] [review]
Return no available devices where not supported, disable on Android

Approval Request Comment
[Feature/regressing bug #]: Bug 983504 - Basic WebRTC screensharing support
[User impact if declined]: Android devices crash when trying to screenshare.
[Describe test coverage new/current, TBPL]: Just landed on m-c.
[Risks and why]: Very low, just returns failure instead of crashing, disabled pref.
[String/UUID change made/needed]: NA
Attachment #8486502 - Flags: approval-mozilla-beta?
Attachment #8486502 - Flags: approval-mozilla-aurora?
tracking-fennec: ? → 33+
Attachment #8486502 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment on attachment 8486502 [details] [diff] [review]
Return no available devices where not supported, disable on Android

Looks like a straightforward fix that will prevent a crash. Beta+
Attachment #8486502 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on Firefox 33 Beta 6, latest Aurora, latest Nightly on Samsung Galaxy Nexus (Android 4.2.1)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: