Error: java.lang.RuntimeException

Hello,

can anybody read this error? I have no idea what does it mean but as I have to fix this for a project in time I would appreciate help. It occurs a few sec after starting. (the same code did yesterday not produce such error?! I changed today the position of the computer and cabling. The code is quite huge and I doubt if the error has something to do with it.

java.lang.RuntimeException: Waited 5000ms for: <28b8866a, 267f6d0d>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-FPSAWTAnimator#00-Timer0-FPSAWTAnimator#00-Timer1>
at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:410) at java.lang.Thread.run(Thread.java:748)

Are you doing a lot of loading resources in setup()? JOGL has a 5 second hard limit in the animator, which means if your setup() method takes longer than 5 seconds to complete, that error is thrown. You may have to look at background loading resources on another thread.

Thank you for your reply. There are many computations in setup for both threads I execute in parallel and I wait more than 1 second. So yes it could be something like this.

But the error now does not any more appear. I dont know why. (I did not change the code.) I only commented one class init in setup out to try your idea. then I functioned but even when I undo this it functions as well.

Best wishes

It sounds like you’re borderline. Maybe another program or OS process kicked in that tied up the disk, or CPU, or something else that caused a delay.

Yes probably but not with ram and cpu which are far away from even half capacity. suppose it is more the 5000 ms time which is sometimes exceeded.

Best

That’s exactly what I mean. If something else starts using a resource like the disk, CPU or memory it would explain why sometimes it doesn’t finish in the time limit. Overall capacity is not the only factor there.

Yes right. I did not see this possibility. any process consuming ram, cpu at start time of the program can delay the computation and so causing to exceed the time limit for JOGL. Thanks for the hint.