Help for Vst on OSX

Started by Salvo,

Chris

#25
Quote from: Salvodsp := BASS_VST_ChannelSetDSP(0, pChar(Filename), BASS_UNICODE, 0);

The first Variable must be a Valid HSTREAM and not Zero.




Salvo

#27
Unfortunately I have to give you bad news: the file you gave me corrected does not work on OSX.
entering this crashes:
dsp := BASS_VST_ChannelSetDSP(0, pChar(Filename), BASS_UNICODE, 0);


Apple's response is this:
Application Specific Information:
*** CFRelease() called with NULL ***


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   CoreFoundation                          0x1859e75f4 CFRelease.cold.1 + 16
1   CoreFoundation                          0x185806d44 CFRelease + 132
2   libbass_vst.dylib                       0x106df8890 0x106df4000 + 18576
3   CoreFoundation                          0x185893e28 __CFRunLoopDoTimer + 1012
4   CoreFoundation                          0x185893938 __CFRunLoopDoTimers + 356
5   CoreFoundation                          0x1858790f0 __CFRunLoopRun + 1856
6   CoreFoundation                          0x185878334 CFRunLoopRunSpecific + 572
7   HIToolbox                               0x190cb10cc RunCurrentEventLoopInMode + 292
8   HIToolbox                               0x190cb6ebc ReceiveNextEventCommon + 636
9   HIToolbox                               0x190cb7020 _BlockUntilNextEventMatchingListInModeWithFilter + 76
10  AppKit                                  0x1893bca70 _DPSNextEvent + 660
11  AppKit                                  0x189ce27b8 -[NSApplication(NSEventRouting)

Salvo

#28
I put a message before it crashed (normally it takes 3 seconds before it crashes)
showmessage(Bass_ErrorGetCode)
and it always gives me 41.
I can't understand why compiling and running the program under IDE delphi instead does not give me the error.
Outside IDE DELPHI instead crashes.

 

Salvo

#29
From many tests done I am 100% sure that there is an error on the libbass_vst.dylib library on the call
dsp := BASS_VST_ChannelSetDSP(ch, pChar(Filename), BASS_UNICODE, 0);

compiling in debug mode, it works without Apple's signature.
compiling in release mode with Apple signature the program crashes.
Library that cannot be used for OSX.
Ian only you can get rid of this bug. >:(

Ian @ un4seen

I guess the BASS_VST_ChannelSetDSP call failed, ie. returned 0? It looks like BASS_VST will still try to unload the VST (with NULL handle) then. Here's an update that should stop doing that:

   www.un4seen.com/stuff/bass_vst-osx.zip

Salvo

#31
returns BASS_VST_ChannelSetDSP -> 0.


Salvo

Compiling in debug mode, it works without Apple's signature.
compiling in release mode with Apple signature, returns BASS_VST_ChannelSetDSP -> 0.

Salvo

Nothing to do gives me :
BASS_VST_ChannelSetDSP -> 0.
Bass_ErrorGetCode -> 41

and it always crashes.

Ian @ un4seen

Is it actually crashing now or just failing to load the VST? And are all VST affected? You could try loading the VST bundle in your own code using CFBundleCreate and CFBundleLoadExecutableAndReturnError, and seeing whether that also fails in your release/signed build. If it does, you can check the error from CFBundleLoadExecutableAndReturnError to hopefully find out why.

Salvo

It doesn't crash but it always comes back
BASS_VST_ChannelSetDSP -> 0.
Bass_ErrorGetCode -> 41

implement CFBundleCreate and CFBundleLoadExecutableAndReturnError, from delphi I don't know how to do it.

"""""And are all VST affected? """"
Yes

Salvo

CFBundleCreate ??
I didn't understand whether to load the vst like "limeter.svt" or the "bass_vst.dylib" library ?

Salvo

#37
BundleURL := CFURLCreateWithFileSystemPath(kCFAllocatorDefault, CFSTR('/Library/Audio/plug-Ins/VST/TDR Nova.vst'), kCFURLPOSIXPathStyle, True);

          // Create the CFBundle
          Bundle := CFBundleCreate(kCFAllocatorDefault, BundleURL);

I loaded the bundle "TDR Nova.vst" and it gives me : Unable to load the package "TDR Nova".
If I run the program by launching it from the Delphi IDE with debug instead it loads it perfectly.

So the problem is delphi ???

Ian @ un4seen

To find the cause, perhaps you could compare Delphi's "release" and "debug" build settings, and change the "release" settings to be more like the "debug" settings. The linker (and signing) settings would probably be a good place to start.

Salvo

Thanks Ian for the suggestion but I already did it to no avail,, I put the linker settings the same as the debug, but nothing to do.
Maybe there is a problem on Delphi 12.
However, I won't give up, I'll let you know when I've found the cause.

Salvo

#40
Going through the Apple logs I found this:
2024-10-09 13:40:17.617246+0200 0x2478e    Error       0x0                  0      0    kernel: (AppleMobileFileIntegrity) Library Validation failed: Rejecting '/Users/salvo/Music/Karaoke5/TDR Nova.vst/Contents/MacOS/TDR Nova' (Team ID: xxxxxxxxxxxxT, platform: no) for process 'KaraokeFive(2692)' (Team ID: xxxxxxxxx, platform: no), reason: mapping process and mapped file (non-platform) have different Team IDs


Salvo

Ok Chris and so you can't upload the signed VST files?

Salvo

Problem solved :)

It was enough to put a flag on Delphi - > Disable Library validation

Thank you all for your help.