losnoco / Cog

Cog - A Free and Open Source Audio Player for macOS 10.13+
https://cog.losno.co
GNU General Public License v2.0
676 stars 45 forks source link

[Cog 1661] New OpenMPT plugin not correctly gated by OS version number #190

Closed skabmedia closed 2 years ago

skabmedia commented 2 years ago

Crashes immediately when trying to play ProTracker MODs.

Apprarently regression, older versions (last I had at hand was 1638) work just fine.

kode54 commented 2 years ago

Please post a crash log.

skabmedia commented 2 years ago

Ah, there it is:

dyld: Symbol not found: ____chkstk_darwin Referenced from: /Applications/Cog.app/Contents/PlugIns/OpenMPT.bundle/Contents/MacOS/../Frameworks/libOpenMPT.framework/Versions/A/libOpenMPT (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib

I'm still on 10.13, so this library was built with the wrong (for 10.13) SDK. libopenmpt by itself still works fine on 10.13, so ideally the solution should be a flick of a switch.

EDIT: Copying the build 1638 OpenMPT.bundle to the latest build 1663 solved the problem, at least for MOD files, didn't check other files that might use other libs that don't support 10.13.

kode54 commented 2 years ago

Does this crash, or does it simply not load that plugin? It should be loading the OpenMPTOld plugin regardless.

skabmedia commented 2 years ago

I noticed that "old" Plugin, but no, it still tries to use the incompatible one (build 1664) and bombs:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin Referenced from: /Applications/Cog.app/Contents/PlugIns/OpenMPT.bundle/Contents/MacOS/../Frameworks/libOpenMPT.framework/Versions/A/libOpenMPT (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin Referenced from: /Applications/Cog.app/Contents/PlugIns/OpenMPT.bundle/Contents/MacOS/../Frameworks/libOpenMPT.framework/Versions/A/libOpenMPT (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib

kode54 commented 2 years ago

Yeah, sorry about that. I've now version gated the plugins completely now. They'll still both load, but only the correct one will be added to the loaded plugins class lists. Expect a fix in version 1666, when that's uploaded.

kode54 commented 2 years ago

@skabmedia Can you please verify this is fixed now?

kode54 commented 2 years ago

Can anyone verify this works properly now on 10.14.x down to 10.12? It should work fine now, albeit not supporting the newer stuff that libopenmpt 0.6 added.

skabmedia commented 2 years ago

Sorry for the delay, yes, it seems to work now (build 1748, you've been busy ;-)).

I just checked what the problem with libopenmpt 0.6 was and indeed it doesn't build on my 10.13 system anymore, so thanks for still supporting us old-Mac-users!

kode54 commented 2 years ago

Yeah, libopenmpt 0.6 requires libc++ features that weren't implemented in the OS until 10.15.

kode54 commented 2 years ago

Speaking of old-Mac-users, I just added libfdk-aac to the mix, so now there's USAC support on 10.14.x and older as well.