-
Notifications
You must be signed in to change notification settings - Fork 40
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
schismtracker crashes when resizing window #183
Comments
I can reproduce this here. It looks to be a problem with the 24-bpp formats (on my system, the colours are inverted after the first resize). Not 100% sure if it's a bug in SchismTracker, a bug in sdl12-compat, or both. (My bet is on both: schismtracker overwrites the end of the surface in 24-bit mode even on real SDL1.2. The blue colour is probably the In the meantime, it seems to work with the |
SchismTracker will write 32-bits at a time to a 24-bit display when scaling, which means it can overflow the end of the surface its writing into. This usually isn't a problem: many implementations will be tolerant of writing an extra byte or two past the end of the surface, but sdl12-compat, for instance, isn't. See: libsdl-org/sdl12-compat#183
We're currently using SDL_PIXELFORMAT_RGB24, which results in schismtracker being blue when resized (libsdl-org#183). While it's possible that RGB888 is wrong on big-endian systems, it at least matches what we do for 16-bit (RGB565) and 32-bit (XRGB8888) formats, so if we're wrong, we'll at least be consistently wrong.
We're currently using SDL_PIXELFORMAT_RGB24, which results in schismtracker being blue when resized (#183). While it's possible that RGB888 is wrong on big-endian systems, it at least matches what we do for 16-bit (RGB565) and 32-bit (XRGB8888) formats, so if we're wrong, we'll at least be consistently wrong.
This no longer crashes here with the RGB888 fixes, so I'm closing this. Please let me know if it's still an issue that I'm just dodging by luck, though! |
Yup — I think this is fixed on the sdl12-compat side. And schismtracker released a new SDL2-based version yesterday, too… |
terminal output:
sometimes i also get this:
malloc(): invalid next size (unsorted)
bt:
The text was updated successfully, but these errors were encountered: