SDL2-devel-2.0.9-VC.zip is not OK: SDL2main.lib in there is outdated.
On 2018-10-30 09:09:56 +0000, Anthony @ POW Games wrote:
Still not working when trying the latest binaries. Custom free() fails when called from main_getcmdline(). The date-stamp for SDL2main.lib didn't update, which I assume is where the fix should be?
On 2018-10-30 13:56:11 +0000, Sam Lantinga wrote:
Right, updated now, thanks!
On 2018-10-30 15:00:08 +0000, Anthony @ POW Games wrote:
Ok, thanks. no crashes now.
But when I put a counter in, I'm left with memory blocks not freed.
I'm only incrementing the counter when realloc is passed a non-null.
The following code causes 2 blocks to not be freed:
And bizarrely the following code leaves 8 blocks not freed.
Is this anomalous? A different issue maybe?
On 2018-10-30 15:18:58 +0000, Sam Lantinga wrote:
Yes, this is a different issue. There are a couple places where we leak small amounts of memory because it's hard to tell when the application will actually be done with it. There might also be a legitimate bug in there as well.
On 2018-11-01 21:37:17 +0000, Ryan C. Gordon wrote:
(In reply to Sam Lantinga from comment # 8)
Yes, this is a different issue. There are a couple places where we leak
small amounts of memory because it's hard to tell when the application will
actually be done with it. There might also be a legitimate bug in there as
This is the only one I see in loopwave.c, fwiw ...
==31490== 776 bytes in 1 blocks are still reachable in loss record 160 of 178
==31490== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31490== by 0x4ED5874: SDL_malloc_REAL (SDL_malloc.c:5328)
==31490== by 0x4ED7273: SDL_GetErrBuf (SDL_thread.c:243)
==31490== by 0x4E590BC: SDL_ClearError_REAL (SDL_error.c:152)
==31490== by 0x4E571C2: SDL_InitSubSystem_REAL (SDL.c:114)
==31490== by 0x4E573C1: SDL_Init_REAL (SDL.c:256)
==31490== by 0x4E6F65D: SDL_Init (SDL_dynapi_procs.h:85)
==31490== by 0x108CA6: main (loopwave.c:123)
...the rest are all tiny leaks from PulseAudio, D-Bus, and dlopen() entirely beyond our control.
On 2018-11-02 23:26:44 +0000, Sam Lantinga wrote:
Yup, and this memory is intentionally left allocated after SDL_Quit()
The text was updated successfully, but these errors were encountered: