obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.63k stars 8.02k forks source link

OBS Crashes on Mac when switching Video Capture device #8022

Closed mattharrison closed 1 year ago

mattharrison commented 1 year ago

Operating System Info

Mac OS

Other OS

12.5.1 Monterey

OBS Studio Version

28.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/64dH7hkQNqOdCRdx

OBS Studio Crash Log URL

No response

Expected Behavior

(I'm trying to use my Mac in a similar way that I use a Windows machine for streaming with my camera.)

I have a Canon M50 digital camera. Canon has webcam software that turns this device into a webcam. Sometimes the camera stops providing an image. When I ran into this on Windows I would toggle the deactivate/activate buttons for the "Video Capture Device". These buttons don't exist on the Mac version, so I have tried switching the device properties to change the device from the M50 to the built-in webcam and then switching back to the M50. Sometimes this makes the camera work again.

But sometimes this toggling of devices cause a crash. There are no logs from the Help->Log Files.

Here is the Apple crash report:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               OBS [29129]
Path:                  /Applications/OBS.app/Contents/MacOS/OBS
Identifier:            com.obsproject.obs-studio
Version:               28.1.2 (3401132301)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-01-08 15:38:36.0027 -0700
OS Version:            macOS 12.5.1 (21G83)
Report Version:        12
Anonymous UUID:        998A1B98-A090-342B-92D7-01CD42A1EE28

Sleep/Wake UUID:       4DC4236E-9640-4216-A2BC-74B843B21C60

Time Awake Since Boot: 310000 seconds
Time Since Wake:       79409 seconds

System Integrity Protection: enabled

Crashed Thread:        9  libobs: graphics thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000068
Exception Codes:       0x0000000000000001, 0x0000000000000068
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [29129]

VM Region Info: 0x68 is not in any region.  Bytes before following region: 105553518919576
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x1b95ea8b0 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x1b95ead20 mach_msg + 76
2   CoreFoundation                         0x1b96f52c0 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                         0x1b96f3770 __CFRunLoopRun + 1180
4   CoreFoundation                         0x1b96f2b34 CFRunLoopRunSpecific + 600
5   HIToolbox                              0x1c2332338 RunCurrentEventLoopInMode + 292
6   HIToolbox                              0x1c23320b4 ReceiveNextEventCommon + 564
7   HIToolbox                              0x1c2331e68 _BlockUntilNextEventMatchingListInModeWithFilter + 72
8   AppKit                                 0x1bc25a51c _DPSNextEvent + 860
9   AppKit                                 0x1bc258e14 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
10  AppKit                                 0x1bc24afe0 -[NSApplication run] + 596
11  libqcocoa.dylib                        0x1082a06c4 0x10828c000 + 83652
12  QtCore                                 0x101fa1598 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 540
13  QtCore                                 0x101f981bc QCoreApplication::exec() + 128
14  OBS                                    0x100cfbae8 main + 4680
15  dyld                                   0x1015b508c start + 520

Thread 1::  Dispatch queue: com.apple.root.user-interactive-qos
0   libsystem_kernel.dylib                 0x1b95ec7b0 kevent_id + 8
1   libdispatch.dylib                      0x1b9486ec4 _dispatch_kq_poll + 228
2   libdispatch.dylib                      0x1b94878e8 _dispatch_event_loop_wait_for_ownership + 444
3   libdispatch.dylib                      0x1b94736d8 __DISPATCH_WAIT_FOR_QUEUE__ + 328
4   libdispatch.dylib                      0x1b94732ac _dispatch_sync_f_slow + 144
5   AppKit                                 0x1bc3bfa80 NSCGSDisableUpdates + 712
6   AppKit                                 0x1bc3bf6e0 NSCGSTransactionRunPreCommitActionsForOrder_ + 140
7   AppKit                                 0x1bc3bf624 NSCGSTransactionRunPreCommitActions_ + 28
8   AppKit                                 0x1bc3a50d0 __39+[_NSCGSTransaction currentTransaction]_block_invoke + 44
9   QuartzCore                             0x1c05703ec CA::Transaction::run_commit_handlers(CATransactionPhase) + 120
10  QuartzCore                             0x1c06db64c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 4592
11  QuartzCore                             0x1c056f4cc CA::Transaction::commit() + 704
12  AppKit                                 0x1bc2ab374 NSPerformVisuallyAtomicChange + 160
13  AppKit                                 0x1bc67cf74 -[NSAnimation _advanceTimeWithDisplayLink:] + 196
14  AppKit                                 0x1bc42262c -[NSScreenDisplayLink _fire] + 180
15  AppKit                                 0x1bcbd4a78 ___NSRunLoopTimerCreateWithHandler_block_invoke + 56
16  CoreFoundation                         0x1b970f964 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
17  CoreFoundation                         0x1b970f54c __CFRunLoopDoTimer + 1064
18  CoreFoundation                         0x1b970efd4 __CFRunLoopDoTimers + 392
19  CoreFoundation                         0x1b96f3a64 __CFRunLoopRun + 1936
20  CoreFoundation                         0x1b96f2b34 CFRunLoopRunSpecific + 600
21  Foundation                             0x1ba5d8100 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
22  AppKit                                 0x1bc67ca64 -[NSAnimation _runBlocking] + 444
23  AppKit                                 0x1bc67cdec __30-[NSAnimation _runInNewThread]_block_invoke + 132
24  libdispatch.dylib                      0x1b94625f0 _dispatch_call_block_and_release + 32
25  libdispatch.dylib                      0x1b94641b4 _dispatch_client_callout + 20
26  libdispatch.dylib                      0x1b9475a04 _dispatch_root_queue_drain + 680
27  libdispatch.dylib                      0x1b9476104 _dispatch_worker_thread2 + 164
28  libsystem_pthread.dylib                0x1b9624324 _pthread_wqthread + 228
29  libsystem_pthread.dylib                0x1b9623080 start_wqthread + 8

Thread 2::  Dispatch queue: com.apple.SkyLight.UpdateManager.SerialSema
0   libsystem_kernel.dylib                 0x1b95ea8ec semaphore_wait_trap + 8
1   SkyLight                               0x1be843e3c invocation function for block in (anonymous namespace)::InterprocessSerialSemaphore::asyncWait(void (int) block_pointer) + 40
2   libdispatch.dylib                      0x1b94625f0 _dispatch_call_block_and_release + 32
3   libdispatch.dylib                      0x1b94641b4 _dispatch_client_callout + 20
4   libdispatch.dylib                      0x1b946b8a8 _dispatch_lane_serial_drain + 668
5   libdispatch.dylib                      0x1b946c404 _dispatch_lane_invoke + 392
6   libdispatch.dylib                      0x1b9476c98 _dispatch_workloop_worker_thread + 648
7   libsystem_pthread.dylib                0x1b9624360 _pthread_wqthread + 288
8   libsystem_pthread.dylib                0x1b9623080 start_wqthread + 8

Thread 3:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 5:: libobs: hotkey thread
0   libsystem_kernel.dylib                 0x1b95ee270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1b962883c _pthread_cond_wait + 1236
2   libobs                                 0x101b6c1a4 os_event_timedwait + 128
3   libobs                                 0x101af799c obs_hotkey_thread + 160
4   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
5   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 6:: tiny_tubular_task_thread
0   libsystem_kernel.dylib                 0x1b95ea8ec semaphore_wait_trap + 8
1   libobs                                 0x101b6c428 os_sem_wait + 20
2   libobs                                 0x101b67420 tiny_tubular_task_thread + 220
3   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
4   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 7:: audio-io: audio thread
0   libsystem_kernel.dylib                 0x1b95ee06c __semwait_signal + 8
1   libsystem_c.dylib                      0x1b94f6fc8 nanosleep + 220
2   libsystem_c.dylib                      0x1b94f6ee0 usleep + 68
3   libobs                                 0x101b6b848 os_sleepto_ns_fast + 100
4   libobs                                 0x101b555b0 audio_thread + 1000
5   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 8:: video-io: video thread
0   libsystem_kernel.dylib                 0x1b95ea8ec semaphore_wait_trap + 8
1   libobs                                 0x101b6c428 os_sem_wait + 20
2   libobs                                 0x101b584ac video_thread + 84
3   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
4   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 9 Crashed:: libobs: graphics thread
0   CoreFoundation                         0x1b96cc3e4 CFRunLoopAddSource + 144
1   CoreFoundation                         0x1b96cc3dc CFRunLoopAddSource + 136
2   CMIOBaseUnits                          0x123c52d74 0x123c28000 + 175476
3   CMIOBaseUnits                          0x123cc62ec 0x123c28000 + 647916
4   CMIOBaseUnits                          0x123c7fa04 0x123c28000 + 358916
5   CMIOBaseUnits                          0x123c4d00c 0x123c28000 + 151564
6   CMIOBaseUnits                          0x123c55328 0x123c28000 + 185128
7   CMIOBaseUnits                          0x123c618ec 0x123c28000 + 235756
8   CoreMediaIO                            0x1c70f298c CMIOUnitNodeInfo::Initialize(CMIOGraph*) + 64
9   CoreMediaIO                            0x1c70e4958 CMIOGraph::Initialize() + 3012
10  AVFCapture                             0x1d307fe8c -[AVCaptureSession_Tundra _buildAndRunGraph] + 1524
11  AVFCapture                             0x1d307f864 -[AVCaptureSession_Tundra _doSessionUpdates] + 104
12  mac-avcapture                          0x116729ef4 av_capture_update(void*, obs_data*) + 356
13  libobs                                 0x101b1ec58 obs_source_video_tick + 228
14  libobs                                 0x101b2e714 obs_graphics_thread_loop + 572
15  libobs                                 0x101b6a648 obs_graphics_thread_loop_autorelease + 32
16  libobs                                 0x101b2fc5c obs_graphics_thread + 168
17  libobs                                 0x101b6a60c obs_graphics_thread_autorelease + 32
18  libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
19  libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 10:: scripting: defer
0   libsystem_kernel.dylib                 0x1b95ea8ec semaphore_wait_trap + 8
1   libobs                                 0x101b6c428 os_sem_wait + 20
2   libobs-scripting.28.dylib              0x11675a800 defer_thread + 56
3   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
4   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 11:
0   libsystem_kernel.dylib                 0x1b95ee06c __semwait_signal + 8
1   libsystem_c.dylib                      0x1b94f6fc8 nanosleep + 220
2   libc++.1.dylib                         0x1b9583af8 std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > const&) + 84
3   StreamDeckPlugin                       0x123116f58 streamdeck::server::run() + 628
4   StreamDeckPlugin                       0x12312cca8 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (streamdeck::server::*)(), streamdeck::server*> > >(void*) + 64
5   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 12:: AMCP Logging Spool
0   libsystem_kernel.dylib                 0x1b95ea8ec semaphore_wait_trap + 8
1   caulk                                  0x1c209da2c caulk::mach::semaphore::wait_or_error() + 28
2   caulk                                  0x1c20817ac caulk::concurrent::details::worker_thread::run() + 56
3   caulk                                  0x1c20813cc void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 96
4   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
5   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 13:
0   libsystem_kernel.dylib                 0x1b95ee270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1b962883c _pthread_cond_wait + 1236
2   libobs                                 0x101b6c0e4 os_event_wait + 48
3   mac-capture                            0x116d8efa8 capture_thread + 52
4   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
5   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 14:
0   libsystem_kernel.dylib                 0x1b95ee270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1b962883c _pthread_cond_wait + 1236
2   libobs                                 0x101b6c1a4 os_event_timedwait + 128
3   mac-capture                            0x116d8b7f4 reconnect_thread + 36
4   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
5   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 15:
0   libsystem_kernel.dylib                 0x1b95ee270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1b962883c _pthread_cond_wait + 1236
2   libobs                                 0x101b6c0e4 os_event_wait + 48
3   mac-capture                            0x116d8efa8 capture_thread + 52
4   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
5   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 16:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x1b95ea8b0 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x1b95ead20 mach_msg + 76
2   CoreFoundation                         0x1b96f52c0 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                         0x1b96f3770 __CFRunLoopRun + 1180
4   CoreFoundation                         0x1b96f2b34 CFRunLoopRunSpecific + 600
5   AppKit                                 0x1bc3c7100 _NSEventThread + 196
6   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
7   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 17:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 18:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 19:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 20:: video-io: video thread
0   libsystem_kernel.dylib                 0x1b95ea8ec semaphore_wait_trap + 8
1   libobs                                 0x101b6c428 os_sem_wait + 20
2   libobs                                 0x101b58528 video_thread + 208
3   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
4   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 21:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 22::  Dispatch queue: NSCGSDisableUpdates
0   libsystem_kernel.dylib                 0x1b95ea904 semaphore_timedwait_trap + 8
1   libdispatch.dylib                      0x1b94647cc _dispatch_sema4_timedwait + 64
2   libdispatch.dylib                      0x1b9464dc0 _dispatch_semaphore_wait_slow + 76
3   SkyLight                               0x1be843c6c CGSUpdateManager::enable_updates_common() + 948
4   SkyLight                               0x1be8447bc SLSReenableUpdateTokenWithSeed + 124
5   libdispatch.dylib                      0x1b94625f0 _dispatch_call_block_and_release + 32
6   libdispatch.dylib                      0x1b94641b4 _dispatch_client_callout + 20
7   libdispatch.dylib                      0x1b946b8a8 _dispatch_lane_serial_drain + 668
8   libdispatch.dylib                      0x1b946c404 _dispatch_lane_invoke + 392
9   libdispatch.dylib                      0x1b9476c98 _dispatch_workloop_worker_thread + 648
10  libsystem_pthread.dylib                0x1b9624360 _pthread_wqthread + 288
11  libsystem_pthread.dylib                0x1b9623080 start_wqthread + 8

Thread 23:
0   libsystem_kernel.dylib                 0x1b95ea8b0 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x1b95ead20 mach_msg + 76
2   CoreFoundation                         0x1b96f52c0 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                         0x1b96f3770 __CFRunLoopRun + 1180
4   CoreFoundation                         0x1b96f2b34 CFRunLoopRunSpecific + 600
5   CoreFoundation                         0x1b9763e14 CFMessagePortSendRequest + 1000
6   EOSWebcamUtility                       0x1216a07dc MessagePort::SendMsg(unsigned char*, int, unsigned char**, int*) + 188
7   EOSWebcamUtility                       0x1216a0ca8 EWCClient::SendCommand(ewcservice::common::protobuf::APICommand*, ewcservice::common::protobuf::APIResponse*) + 120
8   EOSWebcamUtility                       0x1216a20f4 StreamClient::LogMsg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 224
9   EOSWebcamUtility                       0x1216a1bb4 StreamClient::InitSFRs(int) + 132
10  EOSWebcamUtility                       0x1216a15d0 StreamClient::_StartStream() + 504
11  EOSWebcamUtility                       0x1216a12e8 StreamClient::StartStreamThread(void*) + 16
12  EOSWebcamUtility                       0x1216a2d04 0x121678000 + 175364
13  libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
14  libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 24:
0   libsystem_pthread.dylib                0x1b9623078 start_wqthread + 0

Thread 25:
0   libsystem_kernel.dylib                 0x1b95ea8b0 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x1b95ead20 mach_msg + 76
2   CoreFoundation                         0x1b96f52c0 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                         0x1b96f3770 __CFRunLoopRun + 1180
4   CoreFoundation                         0x1b96f2b34 CFRunLoopRunSpecific + 600
5   CoreFoundation                         0x1b977fcc8 CFRunLoopRun + 64
6   EOSWebcamUtility                       0x1216a09f0 MessagePort::Thread(void*) + 224
7   EOSWebcamUtility                       0x1216a0b54 0x121678000 + 166740
8   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
9   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 26:
0   libsystem_kernel.dylib                 0x1b95ed738 __psynch_mutexwait + 8
1   libsystem_pthread.dylib                0x1b9625384 _pthread_mutex_firstfit_lock_wait + 84
2   libsystem_pthread.dylib                0x1b9622cf8 _pthread_mutex_firstfit_lock_slow + 248
3   libc++.1.dylib                         0x1b95791a8 std::__1::mutex::lock() + 16
4   EOSWebcamUtility                       0x1216a16ec StreamClient::_StopStream() + 100
5   EOSWebcamUtility                       0x1216a1304 StreamClient::StopStreamThread(void*) + 16
6   EOSWebcamUtility                       0x1216a2d04 0x121678000 + 175364
7   libsystem_pthread.dylib                0x1b962826c _pthread_start + 148
8   libsystem_pthread.dylib                0x1b962308c thread_start + 8

Thread 9 crashed with ARM Thread State (64-bit):
    x0: 0x000000000000002b   x1: 0x0000000000000000   x2: 0x0000000212cc0b38   x3: 0x0000000101731fc0
    x4: 0x000000006dee2c64   x5: 0x000000000000000c   x6: 0x00ac000004210143   x7: 0x0000000000000001
    x8: 0x000000000000002b   x9: 0x5be45dfa6e4900cf  x10: 0x0000000200002480  x11: 0x007ffffffffffff8
   x12: 0x0000001000005ec0  x13: 0x0000000000000000  x14: 0x0000020000010f54  x15: 0x0000000100000000
   x16: 0x00000001b96cc354  x17: 0x0000000123d582f0  x18: 0x0000000000000000  x19: 0x0000600001f40300
   x20: 0x0000000000000000  x21: 0x0000000212cc0b38  x22: 0x0000000212088000  x23: 0x000000015986e0e8
   x24: 0x000000015986e0f0  x25: 0x000060000ab56e00  x26: 0x000000007673796e  x27: 0x0000000068616c20
   x28: 0x0000600000df1c58   fp: 0x000000016f616460   lr: 0xb6068001b96cc3dc
    sp: 0x000000016f6163d0   pc: 0x00000001b96cc3e4 cpsr: 0x60001000
   far: 0x0000000000000068  esr: 0x92000006 (Data Abort) byte read Translation fault

Binary Images:
       0x1b95e9000 -        0x1b9620fff libsystem_kernel.dylib (*) <d5cdde7e-7037-3a70-9ce4-9e3847da6ce0> /usr/lib/system/libsystem_kernel.dylib
       0x1b9670000 -        0x1b9bb6fff com.apple.CoreFoundation (6.9) <1643f3d9-7049-37e4-b844-c0c0a42bde3b> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1c2300000 -        0x1c2633fff com.apple.HIToolbox (2.1.1) <7112f6f2-a77e-39db-83c8-f627b8a49df8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x1bc219000 -        0x1bd0d1fff com.apple.AppKit (6.9) <07bc3607-552a-3eb9-a941-4911c589dbc5> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x10828c000 -        0x10831ffff libqcocoa.dylib (*) <c81e74b4-c07f-303d-a672-7ab09a9563ed> /Applications/OBS.app/Contents/PlugIns/platforms/libqcocoa.dylib
       0x101f30000 -        0x102393fff org.qt-project.QtCore (6.3) <d47afe19-ed74-3dfa-bdf7-8a7581ad6aa9> /Applications/OBS.app/Contents/Frameworks/QtCore.framework/Versions/A/QtCore
       0x100cd0000 -        0x101077fff com.obsproject.obs-studio (28.1.2) <ad222fdf-f235-3c7a-8d4f-1ec8d89123e0> /Applications/OBS.app/Contents/MacOS/OBS
       0x1015b0000 -        0x10160ffff dyld (*) <75627683-a780-32ad-ae34-cf86dd23a26b> /usr/lib/dyld
       0x1b9460000 -        0x1b94a6fff libdispatch.dylib (*) <035d23d9-4cb5-3759-9059-1f7878f89fee> /usr/lib/system/libdispatch.dylib
       0x1c056d000 -        0x1c0898fff com.apple.QuartzCore (1.11) <05d8e758-d3ea-3942-bbe3-668a95692658> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
       0x1ba574000 -        0x1ba965fff com.apple.Foundation (6.9) <59ff845a-05b2-3b64-ae06-6ef1d6aee83e> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x1b9621000 -        0x1b962dfff libsystem_pthread.dylib (*) <f32ff902-ba43-30b0-ad43-a2a8a9ff69fe> /usr/lib/system/libsystem_pthread.dylib
       0x1be7da000 -        0x1bebb5fff com.apple.SkyLight (1.600.0) <73d946b4-c187-3095-bc77-59ad2d0da9bc> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
       0x101ad4000 -        0x101b83fff com.obsproject.libobs (28.1.2) <8dd0d87d-a70b-359c-97f0-c83863f9f1c3> /Applications/OBS.app/Contents/Frameworks/libobs.framework/Versions/A/libobs
       0x1b94e8000 -        0x1b9569fff libsystem_c.dylib (*) <93fc2587-038e-31e1-b16b-369979e72cb1> /usr/lib/system/libsystem_c.dylib
       0x123c28000 -        0x123d57fff com.apple.CMIOBaseUnits (1000.0) <844567f2-0201-3f12-a3a8-0e1c01e6cd8a> /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/BaseUnits/CMIOBaseUnits.bundle/Contents/MacOS/CMIOBaseUnits
       0x1c70b6000 -        0x1c7198fff com.apple.CoreMediaIO (1000.0) <9e37ea7f-b5bd-3378-80e8-88ed989750e7> /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/CoreMediaIO
       0x1d305a000 -        0x1d31b3fff com.apple.AVFCapture (1.0) <301e66e7-cec5-3277-bb91-427cc85bbc19> /System/Library/PrivateFrameworks/AVFCapture.framework/Versions/A/AVFCapture
       0x116724000 -        0x116733fff com.obsproject.mac-avcapture (28.1.2) <81dcd077-eb11-38f8-aa6d-bbf1d9fd9094> /Applications/OBS.app/Contents/PlugIns/mac-avcapture.plugin/Contents/MacOS/mac-avcapture
       0x116754000 -        0x11676ffff libobs-scripting.28.dylib (*) <9acf7711-51d5-376a-bee6-4933f685ad92> /Applications/OBS.app/Contents/Frameworks/libobs-scripting.28.dylib
       0x1b956a000 -        0x1b95d0fff libc++.1.dylib (*) <ca366de6-c395-319a-b3ab-e22126d28394> /usr/lib/libc++.1.dylib
       0x1230d8000 -        0x123177fff com.elgato.ElgatoRemoteControlOBS (1) <762eeb45-90dc-362e-9020-9623c2223d4e> /Users/USER/Library/Application Support/obs-studio/*/StreamDeckPlugin.plugin/Contents/MacOS/StreamDeckPlugin
       0x1c207f000 -        0x1c20a5fff com.apple.audio.caulk (1.0) <99842553-96fc-378e-b39a-67294face1e3> /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
       0x116d84000 -        0x116d93fff com.obsproject.mac-capture (28.1.2) <5d2d9566-5a4e-32f2-98bc-966aa6aae711> /Applications/OBS.app/Contents/PlugIns/mac-capture.plugin/Contents/MacOS/mac-capture
       0x121678000 -        0x1217c3fff EOSWebcamUtility (1.1.23.0) <760c9a66-b106-38b6-9317-cd8cbbc27ab8> /Library/CoreMediaIO/*/EOSWebcamUtility.plugin/Contents/MacOS/EOSWebcamUtility
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.3G resident=0K(0%) swapped_out_or_unallocated=1.3G(100%)
Writable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework              1152K        9 
Activity Tracing                   256K        1 
CG backing stores                 5632K       12 
CG image                           368K       18 
ColorSync                          624K       27 
CoreAnimation                      880K       25 
CoreGraphics                        64K        4 
CoreUI image data                  768K       13 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           672.9M      252 
MALLOC guard page                  192K       10 
MALLOC_MEDIUM (reserved)         808.0M        8         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           256.0M        1         reserved VM address space (unallocated)
OpenGL GLSL                        256K        3 
STACK GUARD                       56.4M       27 
Stack                             21.8M       28 
VM_ALLOCATE                       19.2M       88 
__AUTH                            2789K      354 
__AUTH_CONST                      21.1M      556 
__CTF                               756        1 
__DATA                            45.1M      637 
__DATA_CONST                      30.8M      643 
__DATA_DIRTY                      1857K      235 
__FONT_DATA                          4K        1 
__GLSLBUILTINS                    5176K        1 
__LINKEDIT                       593.4M       86 
__OBJC_CONST                      4000K      323 
__OBJC_RO                         83.0M        1 
__OBJC_RW                         3168K        1 
__TEXT                           728.8M      661 
__UNICODE                          592K        1 
dyld private memory               1024K        1 
mapped file                      469.5M       41 
shared memory                    141.6M       24 
===========                     =======  ======= 
TOTAL                              3.9G     4095 
TOTAL, minus reserved VM space     2.8G     4095 

Current Behavior

Crashes periodically when changing the camera device.

Steps to Reproduce

  1. Create an EOS Webcam Utility Video capture device on Mac.
  2. Switch the device to the builtin webcam
  3. Switch the device back to EOS Webcam. ... built-in

Anything else we should know?

I used this camera and Canon's webcam software on my Windows machine since 2020 with OBS virtual cameras. I'm in the middle of migrating to Mac, but there is some instability with OBS and/or the Canon Webcam software. Because OBS is crashing, I'm filing a bug here, but also trying to work on the Canon side to see if their driver has issues.

https://community.usa.canon.com/t5/Camera-Software/EOS-Webcam-Utility-2-0-12-drops-stream-on-Mac-M1/td-p/401056

PatTheMav commented 1 year ago

My hunch is that the EOS webcam software exhibits the same mach port exhaustion bug that other applications experienced with our virtual camera plugin (given that most projects all derive from the same DAL plugin example project from GitHub).

Which means that this is on canon to implement the fixes we did to our plugin to reduce it's capability to crash OBS:

https://github.com/PatTheMav/obs-studio/commit/36a86f52176e317638c02deb17156cd5446c68b8

I mention this because the main way to reproduce the crash was to switch between capture devices a few times, but the culprit is always the plugin itself (not the host app, in your case OBS).

mattharrison commented 1 year ago

Thanks for sharing. I will try and relay it back to Canon. I never saw this behavior after a few years of using Windows OBS and Canon Webcam software.

PatTheMav commented 1 year ago

Thanks for sharing. I will try and relay it back to Canon. I never saw this behavior after a few years of using Windows OBS and Canon Webcam software.

That's no surprise given that Windows and macOS are entirely different beasts and especially this kind of functionality cannot be implemented the same way for both - the way it was done on macOS was akin to a "hack" that vendors used, which is why Apple deprecated it in macOS 12.4 (to be removed in macOS 14) anyway. So Canon and others have to create new/updated camera plugins anyway.

gxalpha commented 1 year ago

As outlined above, this is very likely an issue with the EOS software. Please report it to Canon.