A caught exception occured on thread

Hi guys,
I got the following error message running my sketch. Tried both 4.01 and 3.5.4 versions.
What is wrong?

RunnableTask.run(): A caught exception occured on thread main-Display-.windows_nil-1-EDT-1: RunnableTask[enqueued true[executed false, flushed false], tTotal 0 ms, tExec 0 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <77af58bf, 377e5081>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>]
java.lang.RuntimeException: Waited 5000ms for: <77af58bf, 377e5081>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>
	at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
	at jogamp.newt.WindowImpl$ResizableAction.run(WindowImpl.java:2118)
	at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:450)
	at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2782)
	at jogamp.newt.WindowImpl.setResizable(WindowImpl.java:2154)
	at com.jogamp.newt.opengl.GLWindow.setResizable(GLWindow.java:370)
	at processing.opengl.PSurfaceJOGL$5.run(PSurfaceJOGL.java:452)
	at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
	at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
DefaultEDT.run(): Caught exception occured on thread main-Display-.windows_nil-1-EDT-1: RunnableTask[enqueued false[executed true, flushed false], tTotal 5002 ms, tExec 5002 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <77af58bf, 377e5081>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>]
java.lang.RuntimeException: Waited 5000ms for: <77af58bf, 377e5081>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>
	at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
	at jogamp.newt.WindowImpl$ResizableAction.run(WindowImpl.java:2118)
	at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:450)
	at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2782)
	at jogamp.newt.WindowImpl.setResizable(WindowImpl.java:2154)
	at com.jogamp.newt.opengl.GLWindow.setResizable(GLWindow.java:370)
	at processing.opengl.PSurfaceJOGL$5.run(PSurfaceJOGL.java:452)
	at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
	at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)

hi

post your code …

hi,
the code is too big to post it here, but I think it gets stuck somewhere over here

  void calculateFlow() {
    for (int i=0; i<basin.size(); i++) {
      Triangle t = basin.get(i);
      while (t.flowto!=null) {
        t.water++;
        t = t.flowto;
      }
    }
  }

I’m not sure this would be any helpful either.
but, is it even legal to reassign variables like that within a loop?

and to get an idea of what is going on there, please read Blobs in Games: Mapgen4: river representation (if you haven’t already), I’m kinda trying to do something similar.

As jafal says (and as stated in the guideline) please post the code that reproduces the issue :slight_smile:

But I think I have seen this issue before, and it’s hard to spot exactly which part of the code causes this error. In my case, this happens when the draw call is blocked for a certain amount of time, and I don’t know how to fix (there may be a way to tell Processing to wait a bit longer). Isn’t the setup too long to load - are you loading a huge file, or running calculation that takes too long to process? What happens if you reduce the complexity of the simulation model - would that make the code run?

1 Like