processing / processing/processing4
dispose handlers not called when stop button pressed
Open
Nobody has claimed this yet.
opengl
- Dominant language
- Java
- Stars
- 494
- Forks
- 183
- Avg merge
- 4h 39m
- Merged PRs (30d)
- 3
Description
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 s;
void setup() {
size(200, 200, P3D);
s = new SampleLibrary(this);
}
void draw() {
background(255);
fill(0);
text("" + millis(), 20, 20);
}
SampleLibrary.java
import processing.core.*;
public class SampleLibrary {
public SampleLibrary(PApplet parent) {
parent.registerMethod("dispose", this);
}
public void dispose() {
System.err.println("disposed!");
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided dispose_bug sketch in Processing and compare pressing Escape with pressing the stop button. Trace the stop-button shutdown path and the registered dispose handler shown in SampleLibrary.java; done means the handler is called for both ways of stopping the sketch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100