We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am getting some strange freezing with my processing sketch. Everything runs fine, but then at random times the sketch suddenly freezes, then unfreezes and repeats until I try any user input, at which point it freezes for good. When this happens, the IDE stops working, it freezes and is completely unresponsive. This freeze does not occur when I export my sketch as an application and run it from there, only when using the run button on the IDE.
Whenever the crash happens, background music continues to play, but my code for making it reset does not work.
It seems that something is causing the thread to stop. When frozen, it barely uses any CPU, and the computer does not realize that it has stopped responding. It doesn't crash, but just suddenly stops.
Answers
@Ystem can you share a minimal complete example of your code that exhibits this freezing behavior when exported? This would help if forum members have debugging feedback or suggestions. Are you using
thead()
in your sketch? Are you loading things from disk in the draw loop? etc.are you using println at all? too much println can cause problems.
I am using thread and prinln. My code is 6000 lines long, and I have no idea what is causing the issue, so I can't post an example.
I do thing the println is causing the problem, though the crash has stopped happening as much.
The last time this happened, I was able to use the sketch, but the IDE became unresponsive.
I removed the printlns, so I will see if that stops the crash.