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
58.88k stars 7.84k forks source link

OBS 26.1.2 crashes on startup (M1 Big sur) after upgrading from 26.1.0 due to virtualcam #4079

Closed wookayin closed 3 years ago

wookayin commented 3 years ago

Platform

Operating system and version: MacOS Big Sur 11.0 (M1) OBS Studio version: 26.1.2

Expected Behavior

The application should launch start without crashing.

Current Behavior

Segfault during application initialization.

Logs:

❯❯❯ /Applications/OBS.app/Contents/MacOS/obs
info: CPU Name: VirtualApple @ 2.50GHz processor
info: CPU Speed: 2400MHz
info: Physical Cores: 8, Logical Cores: 8
info: Physical Memory: 8192MB Total
info: OS Name: Mac OS X (NSMACHOperatingSystem)
info: OS Version: Version 11.0 (Build 20A2411)
info: Kernel Version: 20.1.0
error: hotkeys-cocoa: Getting keyboard keys failed
error: hotkeys-cocoa: Getting keyboard keys failed
error: hotkeys-cocoa: Getting keyboard keys failed
info: hotkeys-cocoa: Using layout 'com.apple.keylayout.US'
info: Current Date/Time: 2021-01-15, 19:58:50
info: Browser Hardware Acceleration: true
info: Portable mode: false
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_actionGridMode_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
QMetaObject::connectSlotsByName: No matching signal for on_transitionRemove_clicked()
info: OBS 26.1.2 (mac)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 48000
    speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Apple Apple M1
info: OpenGL loaded successfully, version 4.1 Metal - 70.12.7, shading language 4.10
info: ---------------------------------
info: video settings reset:
    base resolution:   1920x1080
    output resolution: 1920x1080
    downscale filter:  Bicubic
    fps:               30/1
    format:            NV12
    YUV mode:          709/Partial
info: NV12 texture support not available
info: Audio monitoring device:
    name: Default
    id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
[1]    84610 killed     /Applications/OBS.app/Contents/MacOS/obs

Stacktrace (excerpt):

Click to expand ``` Process: obs [84610] Path: /Applications/OBS.app/Contents/MacOS/obs Identifier: com.obsproject.obs-studio Version: 26.1.2 (26.1.2) Code Type: X86-64 (Translated) User ID: 501 Date/Time: 2021-01-15 19:58:50.743 -0500 OS Version: macOS 11.0 (20A2411) Report Version: 12 Anonymous UUID: F733DE96-EFF5-58D7-4F71-D876862839B6 Sleep/Wake UUID: B423DDA5-CDB8-4A30-8388-544F5D97CDBC Time Awake Since Boot: 1400000 seconds Time Since Wake: 420000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (Code Signature Invalid) Exception Codes: 0x0000000000000032, 0x000000002fd07000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace CODESIGNING, Code 0x2 kernel messages: VM Regions Near 0x2fd07000: VM_ALLOCATE 2fce3000-2fce4000 [ 4K] rw-/rwx SM=PRV --> mapped file 2fd07000-2fd08000 [ 4K] r--/r-x SM=ALI Object_id=55717a93 OpenGL GLSL 2fd1b000-2fd3b000 [ 128K] r--/rwx SM=PRV Application Specific Information: dyld: in dlopen() /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 dyld 0x0000000201240090 bcmp + 208 1 dyld 0x0000000201203294 ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) + 104 2 dyld 0x0000000201209826 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 310 3 dyld 0x0000000201202320 ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 158 4 dyld 0x00000002011ebeeb dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 781 5 dyld 0x00000002011f4a64 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector >*) + 1419 6 dyld 0x00000002011f4477 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector >*) + 185 7 dyld 0x00000002011f41f2 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector >*) + 1434 8 dyld 0x00000002011f3845 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector >*) + 186 9 dyld 0x00000002011eba4e dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector >*) + 487 10 dyld 0x00000002011eb5d2 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 185 11 dyld 0x00000002011f94ab dlopen_internal + 419 12 libdyld.dylib 0x00007fff2041bf30 dlopen_internal(char const*, int, void*) + 177 13 libdyld.dylib 0x00007fff2040a7de dlopen + 28 14 com.apple.CoreFoundation 0x00007fff2051d370 _CFBundleDlfcnLoadBundle + 145 15 com.apple.CoreFoundation 0x00007fff20595f32 _CFBundleLoadExecutableAndReturnError + 479 16 com.apple.CoreFoundation 0x00007fff2055da82 CFBundleGetFunctionPointerForName + 39 17 com.apple.CoreFoundation 0x00007fff2056eb3c CFPlugInInstanceCreate + 361 18 com.apple.CoreMediaIO 0x00007fff2d23060f CMIO::DAL::PlugInManagement::CreatePlugIn(CMIO::DAL::CFPlugIn const*, std::__1::vector >*) + 477 19 com.apple.CoreMediaIO 0x00007fff2d222ca2 CMIO::DAL::PlugInManagement::CreateOrLazyLoadPlugIns(std::__1::vector >*, std::__1::vector >*, std::__1::vector >*, void (*)(void*, unsigned int)) + 138 20 com.apple.CoreMediaIO 0x00007fff2d222944 CMIO::DAL::PlugInManagement::Initialize() + 388 21 com.apple.CoreMediaIO 0x00007fff2d2227af CMIO::DAL::System::InitializeDevices() + 9 22 com.apple.CoreMediaIO 0x00007fff2d220aa9 CMIO::DAL::System::CheckOutInstance() + 547 23 com.apple.CoreMediaIO 0x00007fff2d2545d1 CMIOObjectSetPropertyData + 133 24 mac-avcapture.so 0x00000000312316f3 obs_module_load + 67 25 libobs.0.dylib 0x00000000059a2e0e obs_init_module + 78 26 libobs.0.dylib 0x00000000059a3c80 load_all_callback + 64 27 libobs.0.dylib 0x00000000059a3b7e obs_find_modules + 2046 28 libobs.0.dylib 0x00000000059a3363 obs_load_all_modules + 35 29 com.obsproject.obs-studio 0x0000000100b157ce OBSBasic::OBSInit() + 734 30 com.obsproject.obs-studio 0x0000000100af1cd9 OBSApp::OBSInit() + 681 31 com.obsproject.obs-studio 0x0000000100af5d28 main + 5032 32 libdyld.dylib 0x00007fff2041a591 start + 1 ```

Steps to Reproduce

  1. Launch OBS 26.1.2.

Additional information

wookayin commented 3 years ago

Looking at stacktrace, it was crashing while initializing DAL plugins -- the OBS virtualcam itself. (I had installed a new one after the 26.1.2 upgrade). Removing the DAL plugin and OBS can now start without any crashes. Not sure why this happened.

asher-the-thrasher commented 3 years ago

that is the mac virtual plugin crash, Please try removing the virtual cam plugin like described here

https://github.com/johnboiles/obs-mac-virtualcam#uninstalling .

next time check on discord for support first

wookayin commented 3 years ago

@asher-the-thrasher Thanks. I checked discord before writing this but I believe this is a different, new issue. I'd like to note that the DAL plugin that was causing the problem was not the third-party plugin (obs-mac-virtualcam by johnboiles) but an official one that was shipped with the previous version, and that 26.1.0 was able to launch without any problems.

asher-the-thrasher commented 3 years ago

no, this was caused by the plugin as seen by this section /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam

it is pointing to the plugin and not anything built in

wookayin commented 3 years ago

My apologizes --- the previous version I was referring to was 26.1.0, not 26.0.2. sorry for the confusion.

asher-the-thrasher commented 3 years ago

it happens if the plugin is started from what happened to me, everything was fine until I started the plugin by mistake, and then it crashed obs and I couldn't open it until uninstalling.

wookayin commented 3 years ago

no, this was caused by the plugin as seen by this section /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam

it is pointing to the plugin and not anything built in

With all due respect, I don't think this is correct. /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin is the built-in DAL plugin that can be installed from OBS application itself, a built-in one (not a third-party). One can easily verify that by removing this directory and installing a new one from OBS, whose path is exactly the same.

It would be very strange if one needs to manually remove the official, built-in DAL plugin every time OBS gets upgraded.

WizardCM commented 3 years ago

@wookayin out of curiosity, had you at any point in the past either installed the third party virtual camera plugin, or used one of the OBS 26 release candidates?

wookayin commented 3 years ago

@WizardCM Yes I had both of them before. Before 26.1, I was using third-party virtual-cams. During the beta testing of OBS 26.1, I also used release candidates and my custom builds as well (I reported a few issues around virtualcams). But since the official release of 26.1, I have been using the official virtual cam plugin after the recommended uninstallation steps (i.e. rm -rf ...) which I was aware of.

asher-the-thrasher commented 3 years ago

no, this was caused by the plugin as seen by this section /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam it is pointing to the plugin and not anything built in

With all due respect, I don't think this is correct. /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin is the built-in DAL plugin that can be installed from OBS application itself, a built-in one (not a third-party). One can easily verify that by removing this directory and installing a new one from OBS, whose path is exactly the same.

It would be very strange if one needs to manually remove the official, built-in DAL plugin every time OBS gets upgraded.

i just downloaded obs on top of what I had and no new virtual camera got installed in that location so I still believe that this was caused by the plugin and not the built in one.

sorry if I'm getting in the way here, just trying to lend my eyes from another mac user and from seeing other people's reports with the same issue. please let me know if I'm just missing something here

wookayin commented 3 years ago

@asher-the-thrasher if that's the case, what do you have under /Library/CoreMediaIO/Plug-Ins/DAL/? What else than obs-mac-virtualcam.plugin? I'm pretty sure this is the official one that gets installed. Please make sure that you have clicked "Start Virtual Camera" at least once to have the plugin installed.

asher-the-thrasher commented 3 years ago

@wookayin all i have there is NDIVirtualCamera.plugin and plugins-info.txt which says Third party CoreMediaIO DAL Plug-Ins

wookayin commented 3 years ago

That is not an official one either. Did you click "start virtual camera" as I said? I doubt you did.

asher-the-thrasher commented 3 years ago

and to add on the installation of the virtual camera plugin is installed in that location and just caused a crash for me once i tried it to confirm that's where i installed it.

asher-the-thrasher commented 3 years ago

oops, it seems that you're correct, i didn't understand what you had meant by that, my bad, now the plug-in is listed in that location.

ramikalai commented 3 years ago

Any updates on this issue? Also, are people running this with a build that has ARC enabled or disabled?

crux commented 3 years ago

$ brew uninstall obs-virtualcam

did fix my crash after upgrading 26.1.2

Something which is also talked about here: https://github.com/johnboiles/obs-mac-virtualcam/releases

but teams is not longer showing the virtual cam source, but this could be totally unrealted. Checked in zoom and it works there.

klofrau commented 3 years ago

@wookayin Please try system_profiler SPCameraDataType on the console:

Looks like this for me:

~ % system_profiler SPCameraDataType
2021-02-16 09:26:58.182 system_profiler[47378:1203863] Error loading /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam:  dlopen(/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam, 0x0106): missing compatible arch in /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam
Camera:

    FaceTime HD Camera:

      Model ID: Apple Camera VendorID_0x106B ProductID_0x000B
      Unique ID: xxxxxx

I think this is an issue regarding the M1 processor. Sorry, don't know how to proceed here :/