-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
[Qt, Windows] Crash when switching from monitor to monitor with different DPI values #352
Comments
This also happens on the examples here, so I transferred the issue. |
Seems like we might be resizing our rendering pipelines and buffers 1 frame too late after becoming aware of the resize event? |
I can only reproduce this with Qt window, glfw window works fine |
I cannot reproduce it on MacOS with PySide 6.4.1. |
I can reproduce this bug on Windows. Exactly what you said: works fine on GLFW, but with Qt (PySide 6.6.0 in this case) it gives an error. The error is now a genuine Exception though, with a traceback, so I have more to go on. What I do observe with GLFW is that quickly moving the window back and forth between the two screens can make the window change size (it grew larger in my case). This may be related to the fact that when dragging near an edge, Windows may snap it to half-screen width. Anyway, not a big deal, but worth mentioning here. |
Investigating this further: There first is a warning, emitted by wgpu-core, that the Although this is only a warning, the surface becomes invalid because of the size mismatch, causing an exception in the call I've not managed to get much further on this, and am careful not to spent too much time on it, because the whole swap-chain stuff has been removed in wgpu-native What I did try is forcing obtaining a new swap chain in our I also tried |
Given what you observed in gfx-rs/wgpu-native#315 do you think it could be this line that needs a Line 495 in dbb991d
Or this one: |
Yeah. I think the equivalence would be something like |
The crashing was fixed, but we still got warnings that we could not prevent. Looks like these will be gone soon too: gfx-rs/wgpu#4796 |
When I drag the window from one monitor to another, with different DPI settings, pygfx crashes:
The text was updated successfully, but these errors were encountered: