-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dispose handlers not called when stop button pressed #631
Comments
In GitLab by @hamoid on May 9, 2016, 11:07 Related dispose() issue: processing/processing#4381 |
In GitLab by @hamoid on May 26, 2016, 11:34 I just wanted to point out why this might be important. With a library I wrote (the Video Export Library), there's issues like this:
The reason is that the library can not properly shut down when closing the sketch because dispose() is not called in many cases. I'll look at the related source when I get a moment, but I can imagine this is not a trivial thing to fix (I hope I'm wrong :). |
Created by: codeanticode This happens with all other renderers, not only OpenGL. If you follow the stop handler in the Java editor, you will reach the following line in Runner.close():
which makes me think that something is missing to properly dispose the running sketch when stopping it from the editor. I guess that once vm.exit(0) is called, there is nothing you can do inside the sketch to catch the VM exit event (sigkill signal?). @benfry should be able to answer this question better. |
Created by: haschdl like @jdf I have a custom library that is being affected by this issue. I have an open issue that Processing is freezing, because the it is not possible to capture that the sketch is being terminated when user presses Stop button in the PDE. @jdf I took a look at your source code for @benfry this is quite old, but still affecting Processing 4.1. What would be the advice, should a new issue be created in processing4 repo? |
Created by: benfry I'll move it to the 4.x repo… |
Created by: haschdl Looking forward to receiving updates on this. I will update my own library to make sure resources get disposed on |
Created by: jdf
In the following sketch, the dispose handler is called when the escape key is pressed, but not when the stop button is pressed.
dispose_bug
SampleLibrary.java
The text was updated successfully, but these errors were encountered: