xxandyy / gamekit

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

destroyInstance fail on entity with skeleton #283

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.calling OgreKit.createGroupInstance (mesh + skeleton grouped)
2.calling destroyInstance() to remove both mesh and the skeleton
3.the program crash

What is the expected output? What do you see instead?
i expect both removed from the scene, the result if i remove armature only, the 
mesh still exist in the scene and animating as well. if i destroy the mesh, the 
application crash

What version of the product are you using? On what operating system?
OgreKit ( lua editor and lua runtime

Please provide any additional information below.

i eddited gkEntity.cpp add some lines to stop the animation and remove the 
skeleton controler. i'm not sure this is the right way. to be honest i'm super 
confused. however this fixed my problem temporarily. i attach a svn patch, a 
lua project, lua file, and a blend file to test the case.

Original issue reported on code.google.com by kornwar...@gmail.com on 3 Nov 2012 at 1:11

Attachments:

GoogleCodeExporter commented 9 years ago
The cleanest way to destory a group-instance to destroy the group rather than 
each single object. 

groupInst:destroyInstance()

But I agree that it should work the way you wanted it work...I will fix that...

Original comment by thomas.t...@googlemail.com on 5 Nov 2012 at 6:57

GoogleCodeExporter commented 9 years ago
Ok, I have to admit that it also crashed if using the method I told. The reason 
was that if you add start an animation the object is added to the scene's 
animation-updater which lead to the crash. 
I fixed this one and added that entities destroy their corresponding skeleton 
if the get destroyed. 

Thx for reporting and thx for your test-case. That helped a lot for fixing the 
issue.
http://code.google.com/p/gamekit/source/detail?r=1209

Original comment by thomas.t...@googlemail.com on 5 Nov 2012 at 8:23