-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Note: I've also posted this issue on jdf's processing.py issue tracker; I have a feeling that the root cause is a more general Processing issuue, but in case it get's resolved there, I'll update this post and close the issue here.
FullScreen(P2D) crashes in Python mode. I’ve included a short sketch (see below) that demonstrates the problem, although in my environment, any sketch that calls fullScreen(P2D) reliably crashes in Python mode.
There’s no error message in Processing’s console, but eventually I will get a dialog box from the OS that says, “Processing quit unexpectedly. Ignore / Report… / Reopen.”
I'm running Processing 3.53, MacOS Mojave 10.14.5, Java 8 update 211. I've tried this and seen the same results on various Mac machines, including both new & older MacBook Pros and Mac Pro / trashcan.
I’ve discovered an awkward workaround, and I’m hoping this may also be a clue to what’s causing the problem:
- Open the sketch in the Processing application
- Delete
P2Dfrom thefullScreen()function call insetup() - Run the sketch once using the default renderer, and exit by hitting 'esc'
- Restore
P2Dto the function call insetup():fullScreen(P2D) - Run the sketch again; it will now run using the P2D renderer.
This workaround allows me to reliably run a sketch at least once in P2D mode. However if I close the sketch and reopen it, or if I open another sketch, or make certain changes to the sketch, then the sketch will once again crash on startup -- same behavior -- and I will need to close it and repeat the procedure above.
Interestingly, the sketch does not always crash if I call size(h,w,P2D) the first time I run the sketch (instead of fullScreen(P2D)), although this is inconsistent. If size(h,w,P2D) does work for that initial run, then I can escape out of the sketch and after that, as with the default renderer workaround above, I can change that line to fullScreen(P2D), and then the sketch will run as expected.
Other information:
- The scenario is the same whether I call
fullScreen(P2D)insettings()or insetup(). - I’m using Processing 3.53, MacOS Mojave 10.14.5, Java 8 update 211
- This problem persists across all members of our team using different MacBook Pro and MacPro machines – although all are running the same OS and Processing versions.
- I have not collected details yet, but I’ve also tested this briefly under Windows 10 (also using Processing version 3.5.3) and it appears to behave similarly.
- A version of the same sketch runs correctly w/ P2D in Java mode, but it produces some unusual console output warning about AppKit issues -- more details here.
Here is a short processing.py sketch that reliably demonstrates the behavior I've described:
def setup():
global k
fullScreen(P2D)
fill(0,200,0,80)
stroke(0,255,0,127)
strokeWeight(4)
k = 0
def draw():
global k
background(0)
k += .06
if k > TWO_PI:
k = 0
arc(width/2, height/2, 200, 200, HALF_PI, k+HALF_PI)
I posted this to problem to the Processing Forum, but no one has responded with any solutions so far.