-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Crash on Windows calling Texture.Destroy() #340
Comments
Hi @nrich, I'll look into this when I get on my Windows computer! |
Apparently caused by sdl.SetError(nil) but it doesn't always happen. See #340 Signed-off-by: Lilis Iskandar <[email protected]>
I tried to reproduce it on my Windows computer but I can't seem to do it. If possible, could you please add a minimal example that would reproduce the crash? Some info on your C/C++/Go compilers, Windows, and SDL2 would help. In the meantime, I applied your fix to the master branch :) Thanks! |
Hi @veeableful, I'll put together a minimal example when I get back to my dev PC. A complication to trigger this bug may be the fact I'm cross compiling from Linux to Windows. In the meantime, here are my env details: Windows: 10 I'm building my app with the following command: env CGO_CFLAGS="-I$(pwd)/win32/SDL2-2.0.5/i686-w64-mingw32/include/ -I$(pwd)/win32/libjpeg/32/include/" CGO_LDFLAGS="-L$(pwd)/win32/SDL2-2.0.5/i686-w64-mingw32/bin/ -L $(pwd)/win32/libjpeg/32/lib -ljpeg" CC=i686-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=386 go build |
Hi @veeableful, Here is a minimal example that triggers the bug:
Same build env as above. |
Exception thrown:
|
Apparently caused by sdl.SetError(nil) but it doesn't always happen. See veandco#340 Signed-off-by: Lilis Iskandar <[email protected]>
Installed today from latest github head, my code does this:
Which throws
signal arrived during external code execution
The stack traces is as follows:
Changing go-sdl2/sdl/error.go:52 from:
C.GoSetError(nil)
to:
C.GoSetError(C.CString(""))
seems to stop the crash.
The text was updated successfully, but these errors were encountered: