Can't load audio file in Mojave

Hi there,

I have received a few reports from users not being able to load an audio file through the native file chooser in Mojave.

I updated the OS and could reproduce it, however it just happens with O3 + LTO enabled, which is not particularly helpful in trying to debug the issue (O0 + LTO does work, as does O3 without LTO).

The only thing I’ve noticed is that the macOS console is spitting out stuff like this:

problem	21:51:52.448664 +0200	HISE	Faild to get owner UUID for url: <private> error: Error Domain=NSCocoaErrorDomain Code=260 UserInfo={NSURL=<private>, NSFilePath=<private>, NSUnderlyingError=0x6000027d06c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

(they really spelled failed wrong, lol). Joke’s aside, Google doesn’t help either and I suspect it has something to do with a random new security regulation.

I haven’t enabled Sandbox (and also can’t do it or everything goes crazy), and the app is not signed, although signing doesn’t fix the problem.

Has anybody else encountered this? It’s rather annoying, because the build I compiled with Xcode 8.3.2 on macOS 10.12 does work on Mojave.

If compiling with Xcode 8.3.2 works, have you tried using an older SDK with a more modern Xcode?

Can I use the Projucer’s Base SDK Version property to select an older one or do I really have to download these from Github?

image

You’ll need to do both.

Apple doesn’t make it easy.

Alright, thanks, I’ll try this.

Alright, I found the cause of this:

if (x && !y)
{
    // remove the file	
}

if (x && y)
{
	// add the file
	// will not be executed with O3 LTO
}


// => refactored with mad C++ skillz to:

if (!x)
   return;

if(!y)
{
	// remove the file
}
else
{
	// add the file
	// will be executed with O3 LTO
}

I have no clue why clang would optimise the second branch away in the first version, but at least I don’t have to mess with the SDKs (let alone make this a requirement for using my project, which would be a total disaster).

1 Like