I am running a Windows 7 OS, lsnes-wxwidgets.exe, version rr1 delta17. There appears to be some sort of bad interaction between bitmap objects and the Reset Lua VM menu item.
I have duplicated the crash several times:
* I open lsnes.
* I run a script.
* Reset Lua VM.
* Execute gui.repaint() twice.
Either one of the following scripts is enough to trigger the crash:
Language: lua
local bmp= gui.bitmap_new(1,1,false)
local pal= gui.palette_new()
function on_paint() gui.bitmap_draw(1,1,bmp, pal) end
gui.repaint()
Language: lua
local bmp= gui.bitmap_new(1,1,true)
function on_paint() gui.bitmap_draw(1,1,bmp) end
gui.repaint()
I haven't been able to trigger a crash without creating a bitmap object, displaying it (
even if invisible), then resetting the Lua VM, followed by further on_paint() requests even if it's now nil.
No need to run a ROM. Having lsnes sit there with the NO SIGNAL display doesn't stop the crash. I've tried a much more complicated script than the above two that doesn't use bitmaps and was unable to trigger a crash. I've isolated the lua functions the best I can, and this is what I've spotted.