Open bilhox opened 10 months ago
Is this similar to https://github.com/pygame-community/pygame-ce/issues/2376?
Is this similar to https://github.com/pygame-community/pygame-ce/issues/2376?
No 🤔
Despite a little bit of stuttering at first, the test program works just fine for me (can manually resize it too) on both pygame-ce 2.3.2 (SDL 2.26.5, Python 3.12.0)
and pygame-ce 2.4.0.dev3 (SDL 2.26.5, Python 3.12.0)
(current main
). On Windows 10 though.
Does it just get stuck for you like in the screenshots?
Yup, I lose control of the window surface, I can resize the window, but the result looks just like in the screenshots
Sending this GIF file to illustrate the problem :
While tinkering with this in the current main I continually got a pygame.error:
Traceback (most recent call last):
File "C:\Users\dan\Programming\scrap\soundfont_testing.py", line 6, in <module>
pygame.display.set_mode([800, 600], flags=pygame.SCALED)
pygame.error: failed to create renderer
I boiled it down to this:
import pygame
pygame.init()
pygame.display.set_mode([800, 600])
pygame.display.set_mode([800, 600], flags=pygame.SCALED)
@MyreMylar It seems that something happened between 2.5.0
and 2.5.1
, because now it segfaults.
The debug infos :
pygame-ce 2.5.2.dev1 (SDL 2.30.7, Python 3.12.0)
Platform: Windows-11-10.0.22631-SP0
System: Windows
System Version: 10.0.22631
Processor: AMD64 Family 23 Model 104 Stepping 1, AuthenticAMD SSE2: Yes AVX2: Yes NEON: No
Architecture: Bits: 64bit Linkage: WindowsPE
Python: CPython 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)]
pygame version: 2.5.2.dev1
SDL versions: Linked: 2.30.7 Compiled: 2.30.7
SDL Mixer versions: Linked: 2.8.0 Compiled: 2.8.0
SDL Font versions: Linked: 2.22.0 Compiled: 2.22.0
SDL Image versions: Linked: 2.8.2 Compiled: 2.8.2
Freetype versions: Linked: 2.11.1 Compiled: 2.11.1
Display Driver: windows
Mixer Driver: wasapi
A minimal method of reproduction on windows to the new segfault (different to the old one):
import pygame
pygame.init()
pygame.display.set_mode([800, 600], flags=pygame.RESIZABLE | pygame.SCALED)
pygame.display.set_mode([800, 601], flags=pygame.RESIZABLE | pygame.SCALED)
All these elements seem necessary to trigger the segfault it has to be SCALED
and RESIZABLE
-> to SCALED
and RESIZABLE
and the windows has to change size.
Environment:
Current behavior:
If you call
pygame.display.set_mode
withvsync
enabled and then again withvsync
enabled, the screen is black (like you lost the hand on the screen) and when you resize, the rest of the window is transparent.Expected behavior:
You don't lost the hand on the screen, and it correctly resizes. Note : If you quit pygame between the two calls, the problem is fixed, could you tell me if it's what we should do ?
Screenshots
Test program: