After some resource modification (an image), my program has been getting random crash (0xC0000005). I know these come from bad memory management, but I can't find where it comes from, because of two reasons: first, I don't use alot of pointers or dynamicaly allocated variables manually (I mean I use the standard library which does it for me), and second, the bug doesn't happen when I'm debugging with gdb (but it does appear when running the debug build, without gdb).
I tried to pinpoint the bug with sd::cout
, but I still can't find it due to the way my program is written. I double, triple-checked the pointers and dynamic arrays I use, still can't find it. For info, debug is compiled with "-g -std=c++14"
, but no "-O2"
. I use Code::Block
with a 64bit MingW with GCC 5.1.0 and gdb 7.9.
So, I read alot of things of those type of bug (0xC0000005) and Heisenbug, but I don't know understand how to deal with it, I don't know what to try now.
I'd show you the code, but it's spread across 30 files. If you really want to see, it's here on github though.
Also, you won't be able to test it out because I didn't upload the resource files (I don't own them).
So do you have any suggestion for me to be able to find where the bug comes from ?