Skip to content
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

64-bit Mac/gfx_sdl: Random crash in SDL_SoftStretch #1140

Closed
rversteegen opened this issue Jul 30, 2020 · 4 comments
Closed

64-bit Mac/gfx_sdl: Random crash in SDL_SoftStretch #1140

rversteegen opened this issue Jul 30, 2020 · 4 comments
Labels
bug Yeah... that's broken crash Bugs causing a crash, freeze/hang, abort(), or FB fatal error gfx_sdl Specific to the SDL 1.2 graphics/IO backend os: mac Specific to Macs rel: nightlies Present in nightly builds (after a release, replace with the release tag) resolved: obsolete Unfixed, but only affects obsolete systems or backends

Comments

@rversteegen
Copy link
Contributor

Kylekrack sent me a crash report that shows abort() called from an invalid free(), ie memory corruption (64-bit, gfx_sdl, Mac OS X 10.11.6, 20200722 nightly).

crashreport.txt

kylekrack: Not sure what triggered it, but game.app crashed while someone was playing Katja's Abyss. I had them send me the crash report, which looked familiar to another crash I was getting before, but I'm not fluent in this.
kylekrack: The crash happened again, which is bad.

@rversteegen rversteegen added bug Yeah... that's broken os: mac Specific to Macs crash Bugs causing a crash, freeze/hang, abort(), or FB fatal error memory corruption Probably caused by memory corruption rel: nightlies Present in nightly builds (after a release, replace with the release tag) labels Jul 30, 2020
@rversteegen
Copy link
Contributor Author

rversteegen commented Aug 28, 2020

Note that the crash report shows obsolete SDL 1.2.14 and SDL_mixer 1.2.11 in use, which is what was installed on the nightly build machine at that time.

Although the memory corruption could be happening anywhere, the crash is inside SDL_Flip->SDL_SoftStretch, specifically in CoreGraphic's color space conversion.

In the SDL 1.2.15 changelog:

  • Fixed memory stomp when using stretch blit on large images.

I assume this refers to SDL_Flip, since SDL 1.2 doesn't have any functions for stretch blits between SDL_Surfaces.

In the changelog for SDL 1.2.16 (unreleased in compiled form, and never will be)

  • Mac OS X: fix crash on any input in Quartz code (bug 2560.)
  • Mac OS X: fix crash in Quartz gamma ramp code.

SDL and SDL_mixer have a large number of unreleased fixes in hg. Although we're switching to SDL2, assuming some users will still use gfx_sdl/music_sdl we should upgrade all our Windows and Mac SDL/SDL_mixer builds to latest hg versions. Even though I compiled SDL_mixer.dll myself, I did so using the 8-year-old 1.2.12 release.

@rversteegen
Copy link
Contributor Author

rversteegen commented Sep 13, 2020

U-Knighted has just reported the same crash.

crash_report.txt

The stack trace is identical to before! Also, both are 64-bit gfx_sdl builds on Mac OS X 10.11.6 with SDL 1.2.14. Therefore I don't think this is a memory corruption crash with random crash point, and it sounds even more likely that it's one of those bugs fixed in SDL 1.2.15 or 1.2.16.

@rversteegen rversteegen changed the title Memory corruption crash on Mac 64-bit Mac/gfx_sdl: Random crash in SDL_SoftStretch Sep 13, 2020
@rversteegen rversteegen added gfx_sdl Specific to the SDL 1.2 graphics/IO backend and removed memory corruption Probably caused by memory corruption labels Sep 13, 2020
@rversteegen
Copy link
Contributor Author

Oh yeah, and U-Knighted said it started happening this year, which must be because we made 64-bit (gfx_sdl) Mac builds the default.

rversteegen added a commit that referenced this issue Jan 20, 2021
…sdl nightlies.

64-bit gfx_sdl2 Mac builds now have the suffix -x86_64 instead of -x86_64-sdl2,
while the -x86 builds continue to use gfx_sdl.

SDL 1.2 on 64-bit Mac turned out to be affected by some nasty bugs (#1140,
doesn't support custom menubar menus on Mac yet.

git-svn-id: https://rpg.hamsterrepublic.com/source/wip@12188 7d344553-34f0-0310-a9b1-970ce8f1c3a2
@rversteegen rversteegen added the resolved: obsolete Unfixed, but only affects obsolete systems or backends label Jan 20, 2021
@rversteegen
Copy link
Contributor Author

Closing resolved: obsolete, as we're ditching Mac 64-bit gfx_sdl builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Yeah... that's broken crash Bugs causing a crash, freeze/hang, abort(), or FB fatal error gfx_sdl Specific to the SDL 1.2 graphics/IO backend os: mac Specific to Macs rel: nightlies Present in nightly builds (after a release, replace with the release tag) resolved: obsolete Unfixed, but only affects obsolete systems or backends
Projects
None yet
Development

No branches or pull requests

1 participant