Joined
·
3 Posts
Hi,
I am new to this forum, though I have been using VisualBoy Advance SDL version for developing games for a year now.
I have always had a crash problem when either entering or exiting the emulator (version 1.7.2). I have searched forums but never found info on this. So I decided to download the 1.7.2-source and find the problem myself.
Turns out there's a memory leak in the 'pix' buffer when running in 32-bit display mode. I corrected the buffer size and the crash has gone.
The only change was in line 2265 of SDL.cpp :
pix = (u8 *)calloc(1, 4 * 241 * 162);
This cures the problem. Thought others might be interested.
Regards
Anders Emil
I am new to this forum, though I have been using VisualBoy Advance SDL version for developing games for a year now.
I have always had a crash problem when either entering or exiting the emulator (version 1.7.2). I have searched forums but never found info on this. So I decided to download the 1.7.2-source and find the problem myself.
Turns out there's a memory leak in the 'pix' buffer when running in 32-bit display mode. I corrected the buffer size and the crash has gone.
The only change was in line 2265 of SDL.cpp :
pix = (u8 *)calloc(1, 4 * 241 * 162);
This cures the problem. Thought others might be interested.
Regards
Anders Emil