Skip to content

Array index out of bounds error using java-processing in terminal #2152

Description

@hughrawlinson

Hi,

I keep getting the following error whenever I try and run any sketch:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at processing.app.Sketch.getCode(Sketch.java:1374)
    at processing.mode.java.Commander.statusError(Commander.java:319)
    at processing.mode.java.Commander.<init>(Commander.java:291)
    at processing.mode.java.Commander.main(Commander.java:97)
[Finished in 2.5s with exit code 1]
[cmd: ['processing-java', '--sketch=/Users/Hugh/Documents/Software Development/Processing/perception+multimedia+computing/week3lab/1', '--output=/Users/Hugh/Documents/Software Development/Processing/perception+multimedia+computing/week3lab/1/build-tmp', '--run', '--force']]
[dir: /Users/Hugh/Documents/Software Development/Processing/perception+multimedia+computing/week3lab/1]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

This happens when I'm not even using arrays with my code. I made sure it wasn't my code by testing with the following sketch:

void setup(){
  size(200,200);
}
void draw(){
  // do nothing
}

The weird thing is though, it works sporadically. When I was using it today in class, it worked fine. When I got home though, it started giving me this error.

Any help would be much appreciated. Thanks!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions