Closed syropian closed 3 years ago
Yeah that's a bug - thanks for letting us know. We'll look into it.
is this bug similar to that which happened about 4 years ago with macOS Yosemite Link to the OBS forum thread for the same here: https://obsproject.com/forum/threads/obs-quit-unexpectedly-mac-tried-everything%E2%80%A6need-help.42126/
This is introduced by Github Action runners having curl
installed via Homebrew now, which is picked up as the version used for OBS and linked against.
curl
from Homebrew uses OpenSSL by default, which is then linked and assembled into the package. It's also is incompatible with our license, so the fix is to change our CI workflow and re-build/re-release the macOS version.
Alright I was mistaken, but only by a bit. The main issue is this:
Homebrew merged the curl
and curl-openssl
packages that existed before, so now "there is only curl
" and this one has all those nasty dependencies that break OBS on macOS versions older than 10.15. The older curl
version did not, so that's why it was ok for us, but OBS should've never been linked against Homebrew's curl
in the first place.
Give that curl
is keg-only for that reason, it is weird how/why cmake
finds this version and prefers it over the system-provided curl
, so the actual fix requires futzing around with FindLibcurl.cmake
.
Thanks for looking into this @PatTheMav, if you need someone to test any release binaries I'll be around most of the day.
Another involved factor is this: https://gitlab.kitware.com/cmake/cmake/-/issues/20863
The system curl
libraries do not actually exist in the file system, instead you link against stub files provided by the Xcode SDK which are then resolved by dyld
using the new dynamic linker cache on Big Sur. At least that's what happens on Big Sur. Still cmake
seems to prefer libraries installed in /usr/local
which is the part we need to disable/work around.
@syropian Please check the macOS build found here: https://github.com/obsproject/obs-studio/actions/runs/423640705
I've found that the JACK plugin still uses OpenSSL (mainly because it requires berkeley-db
which requires OpenSSL on Homebrew) so maybe we'll need to fix this as well.
Hey @PatTheMav, just tried it but unfortunately it's still crashing for me, this time with a slightly different error:
Process: obs [12864]
Path: /Applications/OBS.app/Contents/MacOS/obs
Identifier: com.obsproject.obs-studio
Version: 26.1.0-da458d0e7 (26.1.0-da458d0e7)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: obs [12864]
User ID: 501
Date/Time: 2020-12-15 12:06:00.792 -0500
OS Version: Mac OS X 10.13.6 (17G7024)
Report Version: 12
Anonymous UUID: 53822BA7-5425-7DB6-C0B6-79FB1D0CAD06
Time Awake Since Boot: 8300 seconds
System Integrity Protection: disabled
Crashed Thread: 52 mp_media_thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x4] Symbol missing
Dyld Error Message:
Symbol not found: ____chkstk_darwin
Referenced from: /Applications/OBS.app/Contents/MacOS/../Frameworks/libavcodec.58.dylib
Expected in: /usr/lib/libSystem.B.dylib
That's ffmpeg
- all our dependencies should be built with macOS 10.13 as minimum target, so that's weird. I can check it out, but no promises yet.
Just to be sure, 26.0.2 works fine for you?
@PatTheMav Yep, just re-downloaded 26.0.2 and it seems to be running fine!
~Might be a long shot, but this makes me suspect x264:~
So after searching through the object dumps of all our dependencies I cam to the conclusion that mp3lame
which I added to macOS was the culprit - no other library had references to ____chkstk_darwin
.
Explicitly setting MACOSX_DEPLOYMENT_TARGET="10.13"
before compiling it seems to have fixed it (at least object dumps didn't show the symbol anymore), which is weird as that one is set to the build environments by default.
I'll update our dependency configuration tomorrow, after which I can create a PR updating the pre-built deps for macOS to fix this. I don't know when we'll release an actual fix version after that, but probably not this week.
Sounds good, thank you for your time and effort @PatTheMav! OBS 26.0.2 works perfectly fine in the meantime 😄
Hey @PatTheMav, just tried it but unfortunately it's still crashing for me, this time with a slightly different error:
Process: obs [12864] Path: /Applications/OBS.app/Contents/MacOS/obs Identifier: com.obsproject.obs-studio Version: 26.1.0-da458d0e7 (26.1.0-da458d0e7) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: obs [12864] User ID: 501 Date/Time: 2020-12-15 12:06:00.792 -0500 OS Version: Mac OS X 10.13.6 (17G7024) Report Version: 12 Anonymous UUID: 53822BA7-5425-7DB6-C0B6-79FB1D0CAD06 Time Awake Since Boot: 8300 seconds System Integrity Protection: disabled Crashed Thread: 52 mp_media_thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: DYLD, [0x4] Symbol missing Dyld Error Message: Symbol not found: ____chkstk_darwin Referenced from: /Applications/OBS.app/Contents/MacOS/../Frameworks/libavcodec.58.dylib Expected in: /usr/lib/libSystem.B.dylib
I don't think this is a crash @syropian. This looks more like an about due to an exception. Due to bad data (i suspect, could be 100% wrong).
@akionsight Well yes technically it is an exception, as a function called abort()
during execution, hence EXC_CRASH (SIGABRT)
. Nevertheless it is a crash induced by that and the core reason is that ____chkstk_darwin
doesn't exist in libSystem.B.dylib
shipped on macOS 10.13.
@akionsight Please check the macOS artifact available here: https://github.com/obsproject/obs-studio/actions/runs/426640862
@PatTheMav, I just tested the macOS artifact on MacOS Big Sur (version: 11.1). It works flawlessly and after some serious testing and recording some videos with a lot of inputs, I think it works fine.
@akionsight Thanks, but... The crashes happened on 10.13.6 right? That's where the artifact needs to be tested, because Big Sur of course has the ____chkstk_darwin
symbol in libSystem
so it wouldn't have crashed even without the fix.
But that's on me, I meant to mention @syropian. 😬
@PatTheMav Just tried it, still crashing 😢 . I'm attaching the longer version of the log in case it helps narrow things down:
Well I can confirm that the symbol exists in the libavcodec built on CI but I have no idea why. When I build the deps locally the symbol was there before but my recent fix for lame-mp3 solved it (cannot find the symbol in either object files or the final dylibs).
Feel free to fork the obs-deps repo and use something like https://github.com/marketplace/actions/debugging-with-tmate to break into the workflow and inspect the objects to find out where/why it's introduced there (I have too much on my desk right now).
@jp9000 I don't think this is ready to be closed yet, as the build from 20bb465 is still crashing on High Sierra.
That looks like an entirely different crash, not the crash that was reported in this issue.
@dodgepong The original issue I filed was titled 26.1 instantly crashes on macOS 10.13.6
, and @WizardCM added the last bit (perhaps assuming that was the only thing that would cause a crash). I doubt it would make sense to open a new issue for each reason it's crashing on High Sierra at this point.
Well it is more complex than that, let me explain:
____chkstk_darwin
symbol from the system libraries to compiled librariesI spent the last week investigating and we run into this issue in many ways:
curl
and curl-openssl
, which means a whole lot of libraries we didn't ship before were now shipped with OBS____chkstk_darwin
symbollibjack
fdk-aac
speex
libjack
includes libopus as dependency, so even though we statically compile it into ffmpeg on obs-deps it is shipped as a separate library once we include libjack
from Homebrew (and opus - being built for Catalina - contains ____chkstk_darwin
as well).2020-12-19
of the dependencies.After having fixed our pre-built dependencies the only way to make OBS work on macOS 10.13 again is to also compile libjack
, fdk-aac
and speex
as part of obs-deps
as well to ensure that they are compiled with a minimum deployment target of 10.13 (as Homebrew does not support it anymore).
Note that JACK depends on libopus
(we already build it on CI) and berkeley-db - the latter depends on libcrypto
and libssl
, which would require us to build both on CI as well, leading to OBS and ffmpeg
/srt
using mbedtls
and libjack
using libssl
via berkeley-db
.
This is a situation we needed to clean-up fix anyway, because it's a bit of a mess. But all that above needs to be fixed to get OBS working on 10.13 again.
@syropian Could you please check this build right here if it works for you: https://github.com/PatTheMav/obs-studio/releases/download/26.1.0-preview/obs-studio-26.1.0-tech-preview-cef-3770.dmg
@syropian Could you please check this build right here if it works for you: https://github.com/PatTheMav/obs-studio/releases/download/26.1.0-preview/obs-studio-26.1.0-tech-preview-cef-3770.dmg
Can confirm this test build is working on macOS 10.13.6, where the release of 26.1.0 did not.
@PatTheMav It kinda works but not really — if my scenes have a browser source it crashes right away with this error, but if the scene has no browser sources it seems to work fine.
Does that happen when you turn off audio monitoring as well?
@PatTheMav I don't think I have audio monitoring on in the first place:
Try with this build as well please: https://github.com/PatTheMav/obs-studio/releases/download/26.1.0-preview/obs-studio-26.1.0-tech-preview-cef-4183.dmg
@PatTheMav That one seems to work fine!
That is indeed weird, but thanks for conforming the more "modern" build works fine. I'll have to fix some issues with CI to get a new automatic build with these fixes ready, I'll ping you once more to test that one once it's ready.
Just noting that I am seeing the same issue on Mac OS 10.13.6. Tried the link above (very recent):
And looks like OBS now loads, but need to do some testing.
I suspect this is just repetition, but here is my crashlog on Mac 10.13.6 - which is the limit of upgradeability of my Mac.
[crashlog.txt](https://github.com/obsproject/obs-studio/files/5725796/crashlog.txt)
@syropian Could you please check with this build: https://github.com/obsproject/obs-studio/suites/1707712168/artifacts/32197015
It's automatically generated, so if that one works it means that our build-system fixes are all in place.
I've yet to use OBS, but the latest version above starts without crashing and presumably works. If you want me to try a specific test, let me know. @PatTheMav
@edwilliams16 Thank you. We have a report further above that adding a browser source to the scene setup will lead to a crash on macOS 10.13 nevertheless. Can you confirm?
I opened OBS, clicked + and added a browser source. It crashed... Log enclosed Crashlog_browser.txt
Could you please check with this build: https://github.com/obsproject/obs-studio/suites/1707712168/artifacts/32197015
@PatTheMav This build opens as long as there isn't a browser source present. If either one is present, or one is added manually, it crashes.
This seems to be the only one so far that hasn't crashed for me.
@syropian Thank you, we consider the original bug (OBS crashes on macOS 10.13 because of missing ____chkstk_darwin
symbol) to be fixed now.
As for the browser source crash, we haven't been able to find the reason for it, but it's good to know that our current efforts to upgrade CEF might also fix it.
I'm on 13.6. I just tried the 26.1.1 release which was supposed to fix the Mac crash on OBS startup. Still have the same issue.
"...please ensure all third party plugins such as obs-websocket or StreamFX are up to date."
I even pulled out all of my plugins. I do not use obs-websocket or StreamFX.
See log. obs26-1-1crash.txt
That crash log is from 26.1.0 The 26.1.1 update got pulled because of other issues.
So even though I went through a 26.1.1 update, it didn't actually update?? I updated via the "Check for Updates" option within OBS. So yeah, problems plural.
For now I've fallen back to 26.0.2, which continues to be the only stable version here.
Platform
Operating system and version: macOS High Sierra 10.13.6 OBS Studio version: 26.1
Expected Behavior
It shouldn't crash on launch.
Current Behavior
It crashes immediately on launch
Error:
Steps to Reproduce
Additional information
N/A