processing-sound-archive icon indicating copy to clipboard operation
processing-sound-archive copied to clipboard

Processing 3.03a Mac OSX crashing Sound File lib part

Open REAS opened this issue 10 years ago • 14 comments

"Processing 3.03a on Mac OSX 10.9 crashes the JVM when using the sndfile library part of the new sound lib. All other parts like IO , FX and Synth work OK. Tested it on other Mac's as well. Previous version 3.02a also crashes on same part."

See more discussion at processing/processing#2838

REAS avatar Nov 12 '14 20:11 REAS

If you have a pre-2011 Mac (or any that has a CPU older than Sandy Bridge), it appears that the native libraries are compiled with AVX instructions which are not available on those older CPUs.

I recompiled the libraries manually and used install_name_tool to rewrite the names for them to work. A set of compiled libraries is linked below. Note that you will need a patch to compile libsndfile with newer libvorbis — grab it from Homebrew or such.

These should work on all Macs running OS X 10.7 or newer, but I have only tested on 10.10.

https://github.com/processing/processing-sound/files/1208844/processing-sound-libs-20141203-10.7-x86_64.zip

d235j avatar Dec 04 '14 01:12 d235j

Just in case anyone lands here. I get the following error when I have an external logitech USB camera/microphone plugged in. Unplug it and Bob's your uncle.

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: RtApiCore::probeDeviceOpen: system error (kAudioDeviceUnsupportedFormatError) setting sample rate for device (2). Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.

sjernigan avatar Nov 24 '15 17:11 sjernigan

I had the same problem to run the Sample example, but I replace the files in the sound library with this ones from d235j :

https://files.app.net/wn129oO5M.zip

and now works!!!! Thanks!!!!

almoka avatar Jul 06 '16 13:07 almoka

I'm just posting to say that I had the same issue running on my 2009 Mac Pro and the builds from @d235j fixed it for me too. Thanks @d235j!

briankendall avatar Jan 23 '17 18:01 briankendall

The https://files.app.net/wn129oO5M.zip link is dead.

Can someone ( @d235j! @briankendall, @almoka ) repost it so others can fix this problem? And for those new to processing and development, some instructions would be nice, unless it is a simple file swap.

willcapellaro avatar Aug 08 '17 15:08 willcapellaro

Here ya go. This really needs to be fixed upstream though. Any Processing developers out there?

processing-sound-libs-20141203-10.7-x86_64.zip

d235j avatar Aug 08 '17 16:08 d235j

Many thanks @d235j — very much agreed on the need for a fix, as Processing's users include folks who are new to code. Very surprised that hasn't happened yet. Perhaps the basic library functions for the MacBook crowd and the urgency waned?

Your instrux above are somewhat out of reach for my skills/comprehension. Would it work for you to zip your entire sound library and post that?

willcapellaro avatar Aug 08 '17 17:08 willcapellaro

@willcapellaro just copy the libraries over the ones that came with Processing-Sound.

d235j avatar Aug 08 '17 17:08 d235j

@d235j @willcapellaro thanks for investigating and posting the fix, we're working on a fix and will hopefully be able to push updates soon!

wirsing avatar Aug 09 '17 15:08 wirsing

@wirsing awesome! Feel free to reach out if you need assistance. Note that this probably won't help with the channels/sample rate issue that some people have reported.

d235j avatar Aug 09 '17 15:08 d235j

@d235j great, thanks! Help is always greatly appreciated, feel free to submit pull requests for fixes!

wirsing avatar Aug 09 '17 15:08 wirsing

@wirsing While I could easily submit a pull request with the libraries themselves, the issue there is that means my binaries must be trusted. I'd rather there be a set of build scripts to build the libraries, but that's a bit beyond the scope of what I have time for at the moment.

d235j avatar Aug 09 '17 15:08 d235j

@d235j Of course, I understand :) No problem if you don't want to go into fixing the build scripts, I'll work on that.

wirsing avatar Aug 09 '17 16:08 wirsing

Are there even build scripts for the native libraries at this point?

d235j avatar Aug 09 '17 16:08 d235j