While porting my game to windows, I came across a problem when switching
between window modes. I am using SDL from hg, compiled with mingw64. Here’s
the stacktrace
Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000006c7b170b in D3D_RecreateTextureRep (device=0xd82220, texture=0x0,
format=390076419, w=96, h=24) at
src/render/direct3d/SDL_render_d3d.c:886
886 if (texture->texture) {
(gdb) bt
#0 0x000000006c7b170b in D3D_RecreateTextureRep (device=0xd82220,
texture=0x0, format=390076419, w=96, h=24)
at src/render/direct3d/SDL_render_d3d.c:886
#1 0x000000006c7b1bff in D3D_RecreateTexture (renderer=0x2c220,
texture=0x58be7e0) at src/render/direct3d/SDL_render_d3d.c:1007
#2 0x000000006c7b0773 in D3D_Reset (renderer=0x2c220)
at src/render/direct3d/SDL_render_d3d.c:425
#3 0x000000006c7b098b in D3D_ActivateRenderer (renderer=0x2c220)
at src/render/direct3d/SDL_render_d3d.c:486
#4 0x000000006c7b2adf in D3D_RenderClear (renderer=0x2c220)
at src/render/direct3d/SDL_render_d3d.c:1296
#5 0x000000006c7aa470 in SDL_RenderClear_REAL (renderer=0x2c220)
at src/render/SDL_render.c:1403
#6 0x000000006c7901a1 in SDL_RenderClear (a=0x2c220)
From looking at the code, it appears that
((D3D_TextureData *)texture->driverdata)->texture is NULL for some reason.
I have not looked further yet, as I wanted to hear if somebody has any
insight into this issue first. This time, I also did not find any suitable
SDL test program to reproduce the crash. So I don’t want to rule out that
this is a fault on my side, though the program runs fine on both Linux and
OSX (using the OpenGL renderer).
Please let me know if more information is required.
Regards,
Kai