processing / processing-sound-archive

Archived Sound Library for Processing
125 stars 62 forks source link

terminate after 'std::runtime_error' #81

Open 3ale2 opened 8 years ago

3ale2 commented 8 years ago

Hello, i'm a new processing user. I'm using it for a project. I am using the sound library, testing it out with examples found on processing.org

i got this error : terminate called after throwing an instance of 'std::runtime_error' what(): RtApiAlsa::probeDeviceOpen: pcm device (hw:0,3) won't open for input. Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.

Any help please ?

kaoskorobase commented 8 years ago

Possibly a configuration issue, maybe this SO question helps: http://stackoverflow.com/questions/6400950/how-can-i-solve-a-conflict-between-openframeworks-and-other-audio-applications

In general, the RtAudio driver backend isn't able to share the audio device with other applications on Linux.

REAS commented 8 years ago

What hardware and OS are you using? And which version of the Sound library?

ghost commented 8 years ago

Same issue. Ubuntu 14.04, Processing 3.0.2, Sound library 1.3.2. Any ideas?

toliaferrode commented 8 years ago

Same issue, Ubuntu 15.10, Processing 3.1.1., Sound Library 1.3.2. I actually opened a new issue not realizing that it's already here.

ghost commented 8 years ago

If someone can change title of this issue, it will be easier to realize that there is an issue about sound library.

Lonami commented 8 years ago

Same issue here under Xubuntu 16.04

Lonami commented 8 years ago

I'm using Minim and that is working, but it's no longer supported :(

REAS commented 8 years ago

Is anyone seeing this error on Windows or OS X systems?

Lonami commented 8 years ago

@REAS

If is there anything I can do to help please let me know, I'd really like this to work!

Also, sometimes the error differs a bit as follows:

RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,3), Dispositivo o recurso ocupado.

terminate called after throwing an instance of 'std::runtime_error' what(): RtApi::openStream: a non-NULL output StreamParameters structure cannot have an nChannels value less than one. Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.

When trying to run example_20_01_playback from Examples > Learning Processing 2nd Edition

Edit: P.S.: "Dispositivo o recurso ocupado" stands for "Device or resource busy"

REAS commented 8 years ago

I've reached out to the main dev @wirsing for clarification. Thank you for the clear testing.

JamesHagerman commented 8 years ago

I'm also having this issue. It looks like it's trying to use the default playback device as an input?

asukiaaa commented 8 years ago

I got same problem in this environment.

I solved by adding the following line to /etc/modprobe.d/alsa-base.conf

options snd-hda-intel index=-2

http://stackoverflow.com/questions/6400950/how-can-i-solve-a-conflict-between-openframeworks-and-other-audio-applications

Lonami commented 8 years ago

I was there, @asukiaaa, but it doesn't work for me. Perhaps I just don't understand aplay -l's output, but I don't think it would be a good idea to force other people using my applications to do the same kind of "trick".

r-sede commented 7 years ago

same issue on win 7 32b processing v 3.1.1 sound v1 .3.2

I've got this error every time i try to use the library even with the examples from the tutorial.

_terminate called after throwing an instance of 'std::runtimeerror' what(): RtApiWasapi::probeDeviceOpen: Render device selected as input device. Could not run the sketch (Target VM failed to initialize).

i'm sad, i wish i could give a try to fft analysis with custom visual please fix that :/

maxfarrell commented 7 years ago

Hi, I'm having the same issue on Ubuntu 16.04, Processing 3.0.1, sound 1.3.2

Running the FTTSpectrum example I get the following error:

terminate called after throwing an instance of 'std::runtime_error' what(): RtApiAlsa::probeDeviceOpen: pcm device (hw:0,3) won't open for input. Could not run the sketch (Target VM failed to initialize). Make sure that you haven't set the maximum available memory too high. For more information, read revisions.txt and Help → Troubleshooting.

I also tried the alsa-base.conf edit suggested by asukiaaa but this didn't help.

dcuartielles commented 7 years ago

I can confirm that on Ubuntu 16.04, Processing 3.2.4, Sound 1.3.2 I had the same problem but @asukiaaa's solution made it happen.

FYI after modifying the alsa.conf file, you should run sudo alsa force-reload

toliaferrode commented 7 years ago

The solution from asukiaaa doesn't work for me, either. Please fix, I'd looooove to dig into this library.

lerabot commented 7 years ago

Same problem here. Under Linux Mint.

remy-luisant commented 7 years ago

Same problem, the current Arch Linux. It impacted a few of my students this term as well.

Xplouder commented 7 years ago

@asukiaaa solution worked for me. Working with Linux Mint 18.1 which is based of Ubuntu 16.04 Edit: Apparently worked once, but somehow it is not working anymore. The problem persist!

donniesteubins commented 7 years ago

Same with Ubuntu 16.04 64bit Processing 3.3.3 Latest sound library as of May 29, 2017.

Will try asukiaaa's fix tonight.