Skip to content

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

Open

Description

@dantearaujo1

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.

Activity

  1. 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[/+] on Jun 28, 2022
  2. dantearaujo1 commented on Jul 1, 2022

    @dantearaujo1
    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.

  3. kevinstadler commented on Jul 23, 2022

    @kevinstadler
    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...

  4. dantearaujo1 commented on Jul 27, 2022

    @dantearaujo1
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions