I’m not sure if this a simple coding issue, or a bug, but I’ve recently when experimenting with textSize();, my Processing IDE froze, was unable to start any new program, and couldn’t even quit properly on my Macbook.
When I’ve run the program, an Exception was thrown: java.util.EmptyStackExceptionException in thread "Thread-1Exception in thread ".
What is the while loop meant to do?! You’ve created an infinite loop which is taking up most of the CPU time on your machine. In general, never use while (true)
-1.0
textSize(0.0) ignored: the text size must be larger than zero
-2.0
textSize(-1.0) ignored: the text size must be larger than zero
i don’t know what you want to achieve with a negative textSize, probably something like a 180° rotation i guess, but who knows. i tested your code in a windows computer
I don’t want to achieve anything with a negative text size, but the Processing compiler should still be able to handle it. I’m not using the above code for anything, it’s just the shortest way I could find to create the error.
My Processing freezes on that code, so it must just be my laptop.
That sounds terrible. Thanks for debugging rather than running away screaming.
You are right that almost anything with that behavior should be considered a bug – a Processing user should, ideally, not be able to take down their operating system by making a simple syntax error or logical error – for example passing textSize(mouseX -10) can make sense to someone who isn’t thinking specifically about the textSize(-1) case.
That said, glad that textSize wasn’t the issue.
Re:error spam locking up the sketch. Processing used to have severe problems with repeated println locking up the console – I believe this was mitigated with throttling, but your problem might be related. Did you open an issue?