sasikalar / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

CppDemo double free on linux at exit #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
GameLevel: Instanced -> zRot/UID{5}
GameLevel: Instanced -> xRot/UID{6}
GameLevel: Instanced -> MeshMomo/UID{4}
CppDemo: enter main loop.
CppDemo: exit main loop.
*** glibc detected *** ./AppCppDemo: double free or corruption (fasttop): 
0x00007f356c3441a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x78a8f)[0x7f3581704a8f]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x73)[0x7f35817088e3]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSsD1Ev+0x39)[0x7f3581f58019]
./AppCppDemo(_ZN7gkSceneD1Ev+0x124)[0x7c5424]
./AppCppDemo(_ZN7gkSceneD0Ev+0x9)[0x7c5b59]
./AppCppDemo(_ZN17gkResourceManager10destroyAllEv+0xc9)[0x7bd149]
./AppCppDemo(_ZN8gkEngine8finalizeEv+0x47)[0x7a1b47]
./AppCppDemo(main+0x1e5)[0x798985]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7f35816aaeff]
./AppCppDemo[0x7986d9]

Original issue reported on code.google.com by lukasz.wychrystenko@gmail.com on 4 Sep 2011 at 8:36

GoogleCodeExporter commented 9 years ago
Can you try my patch at issue #207 (called DoubleFree_fix.patch) and let me 
know if it fixes it for you?

Original comment by vek...@gmail.com on 7 Jan 2012 at 10:37

GoogleCodeExporter commented 9 years ago
Now is fine - when it's came to double free however when i press 'w' it crash 
it probably unrelated but i don't have time to look at similar error in issues 
and do proper error report.

Original comment by lukasz.wychrystenko@gmail.com on 8 Jan 2012 at 1:22

GoogleCodeExporter commented 9 years ago
Yes that is due to another problem. When cloning the player object some of the 
sub-objects are not cloned, these seems to be used to handle the camera view 
for the player (which for enemies shouldn't be necessary) but other parts of 
the code assume for these objects to be non-null and thus the application 
crashes. 

I'll create a new issue for that and put the patch there.

Original comment by vek...@gmail.com on 8 Jan 2012 at 3:44

GoogleCodeExporter commented 9 years ago
The other problem was reported (with attached patch) in issue #208. Let me know 
if that patch works for you (put comment in the other issue).

Original comment by vek...@gmail.com on 8 Jan 2012 at 3:49

GoogleCodeExporter commented 9 years ago
Fixed in r1013. This was a duplicate of issue #142

Original comment by xavier.thomas.1980@gmail.com on 22 Jan 2012 at 5:02