Skip to content

Fix crash of Mac on 4K display #17496

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

Merged
merged 1 commit into from
Dec 7, 2024
Merged

Conversation

jecisc
Copy link
Member

@jecisc jecisc commented Dec 4, 2024

Fixes #17439

I'm just applying the fix proposed in the issue

Fixes pharo-project#17439

I'm just applying the fix proposed in the issue
@Ducasse Ducasse merged commit 12f3052 into pharo-project:Pharo13 Dec 7, 2024
1 check failed
@astares
Copy link
Member

astares commented Dec 13, 2024

For the records:

This PR as a solution for this issue #17439 solves the problem of @riuttner on Mac but introduces a new issue on Windows, specifically Windows 11 with two monitors where Pharo freezes when the image is moved to a second screen.

This new issue now on Windows is described also with a video in #17512 (comment)

Best will be another new PR setting "SDL_RENDERER_PRESENTVSYNC" for Mac and 0 for Windows/Linux (as before) within SDL_Window >> createDefaultRenderer

@tinchodias
Copy link
Contributor

As far as I know, we do not want SDL_RENDERER_PRESENTVSYNC flag because it deprives the VM of execution time. We'd waste CPU time that VM could use. With VSYNC enabled, SDL_RenderPresent doesn't return immediately; it does a wait to synchronize with the refresh rate. SDL_RenderPresent is FFI-called by OSWindow-SDL2 each time a new frame is ready to be shown on screen, e.g. on every mouse move or text cursor blinking. @tesonep

@Rinzwind
Copy link
Contributor

I guess the problem on Windows then could be due to SDL_RenderPresent waiting forever when the window is moved to the other screen. That should maybe be checked and, if needed, reported as an issue with SDL. The test code in SDL issue #11384 might be useful (again, I used it for SDL issue #11569).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting Pharo on M2 MacBook makes external 4K display unreadable
5 participants