-
Notifications
You must be signed in to change notification settings - Fork 196
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
WebP loading segfaults when built with 32 bit MSVC #403
Comments
Assuming that you are using the webp dlls provided in the 2.8.0 release distribution: |
I was using the ones in VisualC/external/optional, which I think are the same as the 2.8.0 release distribution. OMG THOSE WORK!! 🙏 |
The attached new rebuild of dlls work: Can you confirm? |
Yes, sorry for the imprecise language. Tested the attached DLLs from webp-dlls.zip (x86) with my build of SDL_image, and WEBP loading is now successful 100% of the time. |
Thanks for such a quick fix! What did you change in the webp builds? |
Nothing in the source, only a different toolchain. (Don't know why, but the old builds seem to had been made using an old compiler toolchain -- I had possibly forgotten updating them.) |
@slouken: This warrants a patch release? P.S.: I will update our libavif from 1.0.2 to 1.0.3 today or tomorrow in SDL2 and SDL3. Should I do that in release branch too? |
Yes, go for it. I have a fix for PNG loading that I want to get in as well, so we'll probably do a 2.8.1 release in a couple weeks. |
Hello,
I normally use the prebuilt binaries provided on releases, which have been great, but I was hoping to customize my SDL_image build (for pygame-ce distribution w/ libpng and libjpeg rather than stbimage).
How I compiled:
Visual Studio 2022
Built SDL from the SDL2 branch in a sibling directory as the Visual Studio project include paths expect
Built SDL_image from the SDL2 branch with no changes in Visual Studio
Tested using the showimage program
Results:
x64: Works great
Win32: showimage program can load other formats, but segfaults intermittently (75% of the time) on webp
I also tested the 32 bit prebuilt from the 2.8.0 release, which did not have this problem.
I tested several images from this page https://developers.google.com/speed/webp/gallery1 to make sure this wasn't isolated to a specific image.
I tried to debug further by putting printfs into IMG_Webp, and these modified builds actually started working when tested in pygame-ce (they still didn't work in showimage, because printf can't be used in an all SDL environment because it doesn't have the library?)
I made sure WebP reports successfully initialization using IMG_Init, and I tried to fix it also by turning off optimizations on IMG_LoadWebp_RW using
#pragma optimize( "", off )
.I would like to get this resolved but I'm all out of debugging ideas, I'd appreciate any help from here. Thanks.
The text was updated successfully, but these errors were encountered: