Hello people. A novice here.My application hangs as soon as my mouse moves and I have to restart the application. Whereas I don’t have the function mouseMoved in my code anywhere. If I keep the mouse steady , application runs good (acquiring data and plotting) and I can click buttons further and keep the application running perfectly as it should.
Could you guys help me with what could be the reason.
Please suggest if I should post this under other categories as well.
I am using Processing 3 on Windows 7.
There could be millions of possible reasons for this, and we can’t tell which one it is without any code.
My suggestion is for you to put something like
rect(10,sin((float)millis()/1000*PI)*50+25,50,50); at the end of
void draw() to be able to always tell if it hangs or not, and then start deleting chunks of code until you get a “minimum viable example”, i.e. a set of code containing minimum lines of code that shows your problem, i.e. starts hanging on mouse movement. Make sure to back your project up first.
Thanks Architector for your prompt reply. I did put that line you suggested at the bottom of void draw() and it does get stuck as I move my mouse. Let me delete parts of code one by one and see which part is really causing the problem. If it still persists, I will share my code for you to have a look. Thanks again.
Thanks again Architector for taking my attention to reviewing the code. It was a simple mistake. I used mouseX and mouseY values in if () condition and used it in a loop. ofc it won’t work further as i move my mouse…
I shall be careful to avoid such simple mistakes…