Menu

#1483 software renderer crashes when loading savestate before any 3D drawing

SVN past 0.9.10
open
nobody
None
0.9.12
5
2015-07-05
2015-07-05
Jack Trout
No

I'm running r5214 on Ubuntu 14.04. DeSmuME crashes when I try to load a savestate in Pokemon W2 before reaching the main title screen. This is most immediately caused by a null fogDensityTable, as evidenced in the stack trace below. I did some digging and it looks like this is happening because gfx3d.renderState is uninitialized, which in turn happens because gfx3d_doFlush hasn't been called yet, since nothing before the title screen is 3D. Once the main title screen appears and starts drawing 3D stuff, gfx3d_doFlush starts being called, and so renderState is initialized and has a valid fogDensityTable from then on.

#0  0x00000000005911cf in SoftRasterizerRenderer::UpdateFogTable (this=0x7fffd8527010, fogDensityTable=0x0) at rasterize.cpp:1711
#1  0x000000000058e7f0 in SoftRasterizer_RunUpdateTables (arg=0x7fffd8527010) at rasterize.cpp:1113
#2  0x000000000056fe06 in taskProc (arg=0x2552c580) at utils/task.cpp:223
#3  0x00007ffff52f7182 in start_thread (arg=0x7fffce7d9700) at pthread_create.c:312
#4  0x00007ffff502447d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

After writing this, I realized that everything works if I use the OpenGL renderer instead of the software renderer. Oh well, still seems like a reasonable bug.

Discussion

Anonymous
Anonymous

Add attachments
Cancel