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

terminate after 'std::runtime_error'

Open 3ale2 opened this issue 9 years ago • 21 comments

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 ?

3ale2 avatar Apr 17 '16 17:04 3ale2

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.

kaoskorobase avatar Apr 20 '16 10:04 kaoskorobase

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

REAS avatar May 06 '16 20:05 REAS

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

ghost avatar Jun 29 '16 07:06 ghost

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.

toliaferrode avatar Jul 03 '16 02:07 toliaferrode

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

ghost avatar Jul 03 '16 18:07 ghost

Same issue here under Xubuntu 16.04

Lonami avatar Aug 04 '16 13:08 Lonami

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

Lonami avatar Aug 06 '16 16:08 Lonami

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

REAS avatar Aug 06 '16 20:08 REAS

@REAS

  • Testing Minim under Windows 7 (x64, virtual machine) ... works
  • Testing Sound under Windows 7 (x64, virtual machine) ... works
  • Testing Minim under Xubuntu 16.04 (x64) ... works
  • Testing Sound under Xubuntu 16.04 (x64) ... failed (same as @3ale2). No applications open, only system sounds

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"

Lonami avatar Aug 07 '16 15:08 Lonami

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

REAS avatar Aug 07 '16 16:08 REAS

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

JamesHagerman avatar Aug 13 '16 19:08 JamesHagerman

I got same problem in this environment.

  • OS: Ubuntu16.04 64bit
  • Processing: 3.2.1
  • Sound: 1.3.2

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

asukiaaa avatar Aug 28 '16 06:08 asukiaaa

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".

Lonami avatar Aug 28 '16 07:08 Lonami

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::runtime_error' 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 :/

r-sede avatar Nov 01 '16 03:11 r-sede

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.

maxfarrell avatar Jan 10 '17 19:01 maxfarrell

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

dcuartielles avatar Jan 30 '17 16:01 dcuartielles

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

toliaferrode avatar Feb 24 '17 10:02 toliaferrode

Same problem here. Under Linux Mint.

lerabot avatar Mar 30 '17 02:03 lerabot

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

remy-luisant avatar Apr 13 '17 05:04 remy-luisant

~~@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!

Xplouder avatar Apr 29 '17 18:04 Xplouder

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

Will try asukiaaa's fix tonight.

donniesteubins avatar May 30 '17 19:05 donniesteubins