Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException: Index 0 out of bounds for length 0 - When loading any wav or mp3 file - Linux Ubuntu inside WSL2 #72

Open
dantearaujo1 opened this issue Jun 28, 2022 · 3 comments

Comments

@dantearaujo1
Copy link

Im writing an game for my essay, i already added controlP5 library and now i include processing sound library, but when i create an SoundFile passing my sketch as parameter and the audio name file as second parameter the program return this message

"IndexOutOfBoundsException: Index 0 out of bounds for length 0"

What should i do?

Im sure that i installed the library correct and im sure that my wav and mp3 file are inside my data directory inside sketch root.

Don't know what to do next. Teste with wav file in mono and stereo and with mp3 files as well.

@dantearaujo1 dantearaujo1 changed the title IndexOutOfBoundsException: Index 0 out of bounds for length 0 - When loading any wav or mp3 file - Linux Ubuntu IndexOutOfBoundsException: Index 0 out of bounds for length 0 - When loading any wav or mp3 file - Linux Ubuntu inside WSL2 Jun 28, 2022
@dantearaujo1
Copy link
Author

I tested the same folder using processing IDE inside Windows and not using processing-java inside wsl2 With Ubuntu, and it worked well, but i need to use it inside Linux... it seems like SoundFile(this,path) is not getting the right path inside WSL2.

@kevinstadler
Copy link
Collaborator

Thank you for the thorough testing! Could you please post the full code of your sketch (or at least the part where the mp3 file is loaded), and possibly the full stack trace of the error message you got under WSL2? I'd like to figure out if it's a Sound library-specific bug or just a general WSL2 path issue...

@dantearaujo1
Copy link
Author

The source code is available at https://github.com/dantearaujo1/MAMICrush make sure you uncomment SoundFile code inside CandyCrush.pde.

This is the stack trace ot the error message:

IndexOutOfBoundsException: Index 0 out of bounds for length 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants