Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Bug #493: Particle Keyframe Issue
Product:
TV3D SDK 6.5
Language:
C++
Current State:
New
Resolution:
Unconfirmed
Created On:
October 21st, 2005
Last Modified:
October 21st, 2005
Reported By:
Anti-Gremlin
Ok, I have a particle system in place which allows multiple executions of certain particle types (mainly for explosions/tracers in our game)

now we have noticed that if we use particle keyframes, after you play about 5 or so times I start getting access violation errors... I also notice some particles get left in limbo that I no longer get access too...

if i remove the particlekeyframes from the effect it runs perfectly and i can execute 100+ with 0 errors..

here is my debug file..

code09-29-2005 12:16:05 | Created Weapon Instance: ArtilleryExplosion
09-29-2005 12:16:05 | TEXTURE MANAGER : Couldn't find the texture '.\ParticleEffects\ArtilleryExplosion\eplosion.dds' in the texture list.
09-29-2005 12:16:05 | TEXTURE MANAGER : Loading of '.\ParticleEffects\ArtilleryExplosion\eplosion.dds' successful '.\ParticleEffects\ArtilleryExplosion\eplosion.dds'
09-29-2005 12:16:05 | index 0 key 0.000000 size : 16.000000 16.000000 16.000000
09-29-2005 12:16:05 | index 0 key 0.000000 color : 1.000000 1.000000 1.000000 1.000000
09-29-2005 12:16:05 | index 1 key 1.000000 size : 24.000000 24.000000 24.000000
09-29-2005 12:16:05 | index 1 key 1.000000 color : 1.000000 1.000000 1.000000 0.500000
09-29-2005 12:16:05 | index 2 key 2.000000 size : 32.000000 32.000000 32.000000
09-29-2005 12:16:05 | index 2 key 2.000000 color : 1.000000 1.000000 1.000000 0.000000
09-29-2005 12:16:05 | TEXTURE MANAGER : Couldn't find the texture '.\ParticleEffects\ArtilleryExplosion\smoke01.png' in the texture list.
09-29-2005 12:16:05 | TEXTURE MANAGER : Loading of '.\ParticleEffects\ArtilleryExplosion\smoke01.png' successful '.\ParticleEffects\ArtilleryExplosion\smoke01.png'
09-29-2005 12:16:07 | index 0 key 0.000000 size : 16.000000 16.000000 16.000000
09-29-2005 12:16:07 | index 0 key 0.000000 color : 1.000000 1.000000 1.000000 1.000000
09-29-2005 12:16:07 | index 1 key 1.000000 size : 24.000000 24.000000 24.000000
09-29-2005 12:16:07 | index 1 key 1.000000 color : 1.000000 1.000000 1.000000 0.500000
09-29-2005 12:16:07 | index 2 key 2.000000 size : 32.000000 32.000000 32.000000
09-29-2005 12:16:07 | index 2 key 2.000000 color : 1.000000 1.000000 1.000000 0.000000
09-29-2005 12:16:10 | index 0 key 0.000000 size : 16.000000 16.000000 16.000000
09-29-2005 12:16:10 | index 0 key 0.000000 color : 1.000000 1.000000 1.000000 1.000000
09-29-2005 12:16:10 | index 1 key 1.000000 size : 24.000000 24.000000 24.000000
09-29-2005 12:16:10 | index 1 key 1.000000 color : 1.000000 1.000000 1.000000 0.500000
09-29-2005 12:16:10 | index 2 key 2.000000 size : 32.000000 32.000000 32.000000
09-29-2005 12:16:10 | index 2 key 2.000000 color : 1.000000 1.000000 1.000000 0.000000
09-29-2005 12:16:12 | index 0 key 0.000000 size : 16.000000 16.000000 16.000000
09-29-2005 12:16:12 | index 0 key 0.000000 color : 1.000000 1.000000 1.000000 1.000000
09-29-2005 12:16:12 | index 1 key 1.000000 size : 24.000000 24.000000 24.000000
09-29-2005 12:16:12 | index 1 key 1.000000 color : 1.000000 1.000000 1.000000 0.500000
09-29-2005 12:16:12 | index 2 key 2.000000 size : 32.000000 32.000000 32.000000
09-29-2005 12:16:12 | index 2 key 2.000000 color : 1.000000 1.000000 1.000000 0.000000
First-chance exception at 0x0053d809 in ParticleManager.exe: 0xC0000005: Access violation reading location 0x01225018.
09-29-2005 12:16:13 | ding!
First-chance exception at 0x0053d809 in ParticleManager.exe: 0xC0000005: Access violation reading location 0x01225018.
09-29-2005 12:16:13 | ding!/code

here is my effect

codeparticle-system
emitter type="billboard" max-particles="30" id="0" size="16" location="0/25/0" direction="0/0/0" directional="True" randomdirectionfactor="0.01/0.01/0.01" power="10" lifetime="3" shape="0" texture="T:\Battlecore\Art Tools\Effects\eplosion.dds" color="1,1,1,1" speed="10" usegravity="False" gravity="0/-9.8/0" alphachange="1" alphablending="1" alphatest="False" alpharef="0" alphadepthwrite="False" boxsize="1/1/1" sphereradius="0" looping="False"
particle-keyframes
keyframe id="0" key="0" size="16/16/16" color="1,1,1,1" /
keyframe id="1" key="1" size="24/24/24" color="1,1,1,0.5" /
keyframe id="2" key="2" size="32/32/32" color="1,1,1,0" /
/particle-keyframes
/emitter
emitter type="billboard" max-particles="50" id="1" size="16" location="0/25/0" direction="0/0.5/0" directional="True" randomdirectionfactor="0.25/0.5/0.25" power="15" lifetime="1" shape="0" texture="T:\Battlecore\Art Tools\Effects\eplosion.dds" color="1,1,1,1" speed="10" usegravity="True" gravity="0/-100/0" alphachange="1" alphablending="1" alphatest="False" alpharef="0" alphadepthwrite="False" boxsize="1/1/1" sphereradius="0" looping="False" /
emitter type="billboard" max-particles="25" id="2" size="32" location="0/0/0" direction="0.5/0/0.5" directional="True" randomdirectionfactor="0.5/0.2/0.5" power="65" lifetime="1" shape="0" texture="C:\BC_PM\ParticleEffects\ArtilleryExplosion\smoke01.png" color="0.5,0.5,0.5,0.5" speed="10" usegravity="False" gravity="0/0/0" alphachange="1" alphablending="1" alphatest="False" alpharef="0" alphadepthwrite="False" boxsize="1/1/1" sphereradius="0" looping="False" /
/particle-system/code

here is where my code crashes...

codetry
{
if( lParticleID.empty() )
return -1; // Clean up!

for( lParticleListIT it = lParticleID.begin(); it != lParticleID.end(); it++ )
{
int iPID = (*it);

if( (pParticle-GetEmitterParticleCount( iPID ) 0) )
{
pParticle-UpdateEx( iPID, fTick * 0.001f ); // --- Errors on this line
}
else
{
pParticle-SetEmitterEnable( iPID, false );
pParticle-DestroyEmitter( iPID );

it = lParticleID.erase( it );
}
}

return 0;
}
catch( ... )
{
//
pEngine-AddToLog( "ding!" );
return 0;
}/code

I have tried both Update and UpdateEx and both create the same error.


Just an update... I also noticed that if I put a pause between each execution of the effect it works... but in the case where I need to call 20+ explosions at once that is when it stuffs up.. and with the ParticleKeyFrames removed, I can call the 20+ and have no problems.


Any Ideas?

Comments:

No comments available.