We are about to switch to a new forum software. Until then we have removed the registration on this forum.
My sketch is a little complicated, so it is spread in several .PDE files. I do use the semi-documented surface.setSize(), but otherwise pure Processing Java without any libraries.
The code has a class "Button". It is used quite a lot, even arrays of it. Sometimes, even after a clean restart of Processing, it confuses which button does what, or omits drawing a button. This is in the "first" loop, so it has not done anything fancy. It fails on both 3.0.2 and the latest 3.1.1, both 32bit XP, 32 bit Win7 and 64bit Win7.
The code has worked fine for a while, as I am still developing it. The natural thing is to presume the last change broke it, but that is too difficult to roll back.
I also have had an issue with the debugger ignoring some breakpoints which make me believe I have somehow corrupted memory - or found a bug.
So the question is - am I doing something "subtly" wrong?
Answers
(The full version of the program is taken offline)
I have now shortened the program (so now the logic makes little sense) and still have the error.
Just run the sketch. You do not need to do anything, but can verify the function of the Quit and Filechoice button. Sometimes the quit button has moved on top of the filechoice button. Why?!
(NB: I swapped the order of .display() of the buttons. This made the quit button visible, and thus explains why the filechoice button acted as a quit.)
There is no code that moves the Quit button. The initialisation is fixed.