Skip to content

Freezing on window resize on Windows #507

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

Closed
processing-bot opened this issue Jun 26, 2022 · 6 comments
Closed

Freezing on window resize on Windows #507

processing-bot opened this issue Jun 26, 2022 · 6 comments
Labels
help wanted Extra attention is needed windows

Comments

@processing-bot
Copy link
Collaborator

Created by: Galbi3000

I was going through the changelog for the version 4 betas and decided to quickly try the windowRatio example:

void setup() {
  windowResizable(true);
  windowRatio(1280, 720);

  cursor(CROSS);
  strokeWeight(10);
}

void draw() {
  background(240);
  fill(255);
  rect(0, 0, rwidth, rheight);

  fill(0);
  textAlign(CENTER, CENTER);
  textSize(200);
  text(rmouseX + ", " + rmouseY, rwidth/2, rheight/2);
}

When I run it I get a small window showing the mouse co-ordinates scaled to 1280, 720 as expected. However, when I resize the window it freezes completely, it will not even respond to the X button to close the window. I have to use Task Manager to kill the process after which I get the following error in the IDE:

Could not run the sketch (Target VM failed to initialize).
For more information, read Help ? Troubleshooting.
  • Processing version: 4.0b8
  • Operating System and version: Windows 11 Pro Version 22H2 Build 22621.160
  • Other info: I do use Window FX 6 by Stardock that on a very slim chance might cause an issue but I have never encountered any as of yet. Its window management features are turned off anyway, just a few features are on with nothing enabled to do with resizing.
@processing-bot
Copy link
Collaborator Author

Created by: SableRaf

I can reproduce the issue on Microsoft Windows 10 Home N, Version 10.0.19044 Build 19044 (no WindowsFX installed).

Then I tried to make the smallest sketch that reproduces the error.

This runs fine:

void setup(){
  windowResizable(true);
}

This crashes when resizing:

void setup(){
  windowResizable(true);
}

void draw(){
}

Note: The sketch can be closed with the stop button.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Yeah, I've been seeing it consistently on Windows, though I'm also confused because I thought I had it working properly at some point during the alpha/beta process for 4.

@processing-bot
Copy link
Collaborator Author

Created by: marcelmauel

Seems like there is a check for sketch.isLooping() missing in the resize listener of SurfaceAWT's frame.
This fixes the resizing issue, not crashing the app anymore. But the sketch itself won't resize, like it is doing with P2D or P3D.

@processing-bot
Copy link
Collaborator Author

Created by: retiutut

#629 (comment)

@processing-bot
Copy link
Collaborator Author

Created by: grimtin10

the main problem for me is that P2D fixes it, but the P2D renderer is very unstable for me for some reason, causing issues that i don't have with Java2D
i hope this gets fixed soon because this is one of the biggest issues with Java2D for me right now

@Stefterv
Copy link
Collaborator

Fixed by #932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed windows
Projects
None yet
Development

No branches or pull requests

2 participants