Closed Bug 1058944 Opened 10 years ago Closed 10 years ago

Crash in webrtc::ViEInputManager::CreateCaptureDevice

Categories

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

x86
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla34

People

(Reporter: Gijs, Assigned: m_and_m)

References

Details

(Keywords: crash, reproducible)

Attachments

(1 file)

With the following STR, I can reproducibly crash with patches from bug 1057006 + bug 1036653's applied:

1) open nightly on a clean profile
2) open http://queze.net/goinfre/ff_gum_test.html
3) share app #1 (let's say terminal.app)
4) open http://queze.net/goinfre/ff_gum_test.html in a new tab, while keeping the other one open
5) share app #2 (let's say thunderbird.app)

as soon as I click "Share Selected Application" in the doorhanger, things go pear-shaped:


Stack trace:

#0	0x00007fff8b4c8732 in strlen ()
#1	0x00000001029f5bc1 in webrtc::ViEInputManager::CreateCaptureDevice(char const*, unsigned int, int&) at /Users/gkruitbosch/dev/fx-team/media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc:190
#2	0x00000001029e1334 in webrtc::ViECaptureImpl::AllocateCaptureDevice(char const*, unsigned int, int&) at /Users/gkruitbosch/dev/fx-team/media/webrtc/trunk/webrtc/video_engine/vie_capture_impl.cc:101
#3	0x0000000102545a3e in mozilla::MediaEngineWebRTCVideoSource::Allocate(mozilla::VideoTrackConstraintsN const&, mozilla::MediaEnginePrefs const&) at /Users/gkruitbosch/dev/fx-team/content/media/webrtc/MediaEngineWebRTCVideo.cpp:453
#4	0x0000000102090dae in mozilla::GetUserMediaRunnable::ProcessGetUserMedia(mozilla::MediaEngineAudioSource*, mozilla::MediaEngineVideoSource*) at /Users/gkruitbosch/dev/fx-team/dom/media/MediaManager.cpp:1175
#5	0x00000001020905f7 in mozilla::GetUserMediaRunnable::Run() at /Users/gkruitbosch/dev/fx-team/dom/media/MediaManager.cpp:1056
#6	0x00000001010807c4 in nsThread::ProcessNextEvent(bool, bool*) at /Users/gkruitbosch/dev/fx-team/xpcom/threads/nsThread.cpp:769
#7	0x000000010109df13 in NS_ProcessNextEvent(nsIThread*, bool) at /Users/gkruitbosch/dev/fx-team/xpcom/glue/nsThreadUtils.cpp:265
#8	0x00000001012e78aa in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) at /Users/gkruitbosch/dev/fx-team/ipc/glue/MessagePump.cpp:355
#9	0x00000001012cd0ed in MessageLoop::RunInternal() [inlined] at /Users/gkruitbosch/dev/fx-team/ipc/chromium/src/base/message_loop.cc:229
#10	0x00000001012cd0dd in MessageLoop::RunHandler() [inlined] at /Users/gkruitbosch/dev/fx-team/ipc/chromium/src/base/message_loop.cc:222
#11	0x00000001012cd0dd in MessageLoop::Run() at /Users/gkruitbosch/dev/fx-team/ipc/chromium/src/base/message_loop.cc:196
#12	0x000000010107f678 in nsThread::ThreadFunc(void*) at /Users/gkruitbosch/dev/fx-team/xpcom/threads/nsThread.cpp:345
#13	0x00000001006465b1 in _pt_root at /Users/gkruitbosch/dev/fx-team/nsprpub/pr/src/pthreads/ptthread.c:212
#14	0x00007fff883b2899 in _pthread_body ()
#15	0x00007fff883b272a in _pthread_start ()


From looking in XCode, vie_capture is null and/or returns null for device_name (opt build, hard to be sure).
Blocks: appsharing
Assignee: nobody → linuxwolf
Status: NEW → ASSIGNED
Comment on attachment 8479435 [details] [diff] [review]
Crash in webrtc::ViEInputManager::CreateCaptureDevice

This crash should impact all platforms, but I've only verified one myself.

Fix is to remember the device id when setting up a capturer.
Attachment #8479435 - Flags: review?(rjesup)
Attachment #8479435 - Flags: review?(rjesup) → review+
sorry had to backout this change since this or the other changeset for bug 1036653 caused a build bustage like https://tbpl.mozilla.org/php/getParsedLog.php?id=46833334&tree=Mozilla-Inbound on windows
https://hg.mozilla.org/mozilla-central/rev/ae45bd114347
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
During our exploratory testing from bug 1036653 comment 77 this issue was no longer reproducible using Firefox 34 beta 11 (Build ID: 20141120192249) and Nightly 36.0a1 (Build ID: 20141120030202) across all platforms. Closing this issue as verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: