HomeHome  SearchSearch  RegisterRegister  Log inLog in  


 crash and leaks or bugs? :).

Go down 

Messages : 2
Date d'inscription : 2010-02-22

crash and leaks or bugs? :). Empty
PostSubject: crash and leaks or bugs? :).   crash and leaks or bugs? :). Icon_minitimeThu Feb 25, 2010 6:23 pm

i want now remove from scene in 'irrlicht' IRRSystem-particles.
when i use:

SPK_Destroy( (IRRSystem *)myparticles );
my app gonna crash!

i was tried another call with:
"scenemanager->addToDeletionQueue((IRRSystem *)myparticles);"
"myparticles->remove(); myparticles->drop();"

this lasts two methods works, but i see alot of memory leaks there :/.
im now not sure, this is again bug, or i doing something wrong? Smile


Another thing, when i code something like this:

person_hand = findHandSceneNode();
((IRRSystem *)myparticles)->setParent(person_hand);

then myparticles are not visible. Im not sure, this is allowed by sparkengine or bug?


PS.: sorry to bother Smile.
Back to top Go down

Messages : 539
Date d'inscription : 2009-07-14
Age : 37

crash and leaks or bugs? :). Empty
PostSubject: Re: crash and leaks or bugs? :).   crash and leaks or bugs? :). Icon_minitimeFri Feb 26, 2010 10:08 am


you dont bother at all. Having a return about the irrlicht module is a good thing as it wasnt tested much and apparently needs further improvements.

However the SPK_Destroy macro works and was tested. The real problem is that the spark's memory management shortcuts the Irrlicht one. This is due to the fact that the Irrlicht module came after the design of spark was made. This will be addressed in the version 2 of spark which will let the rendering engine handles the memory management of the particle systems.

So to me if the SPK_Destroy causes a crash it is because the particle system is still reference and used somewhere else after being destroyed. When you try to destroy a system with a call to this macro, the system is removed from the scene before being deleted. Can you check the number of references of the system with a call to getReferenceCount() just before the deletion of the system. Normally it must be 2 (one for the SPKFactory which grabs the system when it is created to prevent it from being deleted by Irrlicht and one for the Irrlicht scene manager).

If you use Irrlicht to delete your system (your 2 other solution), the elements of your system wont be deleted. This will not be a real memeory leak as they are still referenced within the SPKFactory but there are not deleted immediatly.

Concerning your second issue, that s strange, it should work normally. Can you check if the system is updated ? By checking if the number of particles evolve at each frames.

Thanks again for your post which allow me to debug the irrlicht module.

Once again, the version 2 will address a lot of problems.
Back to top Go down
crash and leaks or bugs? :).
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Evolution (en)-
Jump to: