Jump to content
Sign in to follow this  
Homer Johnston

drop command memory leak??

Recommended Posts

I've heard of ArmA's memory leak problem, but does anyone know if the drop command, or particles in general, trigger this leak as well? Obviously I'm hoping it doesn't, but if I run a few hundred particle effects in a loop then eventually the framerate takes a dive, models display their worst LOD, textures die... ArmA freezes. Bit of a nuisance. crazy_o.gif

Thanks.

Share this post


Link to post
Share on other sites

Why are you using the drop command in a loop anyway? Create a particle source instead, it will probably fix your problem too.

Share this post


Link to post
Share on other sites

Why? Because it was easier for me to use what I already knew wink_o.gif...And I get the impression it might be a nuisance to adapt all of my math to the particlesource system (it doesn't seem like it has any flexibility, compared to a loop running a raw drop command...). However I will see if particle sources cause the same crash-and-burn, and if not then I'll see if it's possible to adapt it to my math -- I admit to not having really learned the particle source method beyond looking at the code commands. And if that all works, then I'll shut up tounge2.gif

Share this post


Link to post
Share on other sites

Well if anyone uses more particles than me at the moment in my DMSmokeEffects addon I haven't heard of it biggrin_o.gif

I use the Drop command extensively and you're right about having more control, even if it means more code. I have up to 50-80 or so columns of dark billowing smoke, each stack is calculated to have 500 particles at any time, and then there's various grenade, building collapse and smoldering wreckage effects. I've not seen any evidence of any leak, although to be fair I haven't looked for one. I test several stressful missions to check out my addon, over several hours without restarting the game and have seen no ill effects.

In about 1 in every 100 tests suddenly every particle just disappears, but quickly they fill up the skies again. It's a minor bug that has no other effect and only lasts a few seconds while the particles build up again, but I've only ever seen it maybe 4 times in total.

Share this post


Link to post
Share on other sites

Yeah, if you were using my code you'd have crashed that's for sure  tounge2.gif

I've got 500 particles running each with a life of 10-20 seconds (randomized)... The game blows up after 10-20 mins. So if you have a few thousand going for a half hour, it's gotta just be my code. I'm not noticing "extra" particles visible though (my loops aren't running away into infinite particles). (amazing vid by the way, definitely going to keep an eye out your work from now on! ) I'm actually wondering if the random life parameter might be somehow causing it now, I don't think I noticed issues before I had it. I'll have to test that when I get home tonight (OFP forums @ work... sigh, I don't deserve my pay)

I've also noticed if I accidentally leave the Timer param as 0 then running the drop command automagically freezes my PC  xmas_o.gif which I guess isn't surprising, lol. But now I've got it set to a value greater than particle life so it can't be that either...

Share this post


Link to post
Share on other sites
I've also noticed if I accidentally leave the Timer param as 0 then running the drop command automagically freezes my PC xmas_o.gif which I guess isn't surprising, lol. But now I've got it set to a value greater than particle life so it can't be that either...

By Timer do you mean the TimerPeriod parameter? I have mine set to 1 and the OnTimer parameter at "" (unless I actually need the functionality of course) and I don't get any ill effects from it.

I can't imagine why you'd get a crash just by popping off particles, what sort of loop period have you set? I use 0.2 for the tall columns, but that can decrease if the wind is blowing (smoke blowing away at an angle need more particles to maintain the same look). Only time I do NOT have a loop period is for explosion effects when I need to have a sudden cloud appear, and then I have a tightly controlled loop of a precise number.

Share this post


Link to post
Share on other sites

yes; TimerPeriod, sorry... the bugging out is so friggin weird.

after another couple hours of testing I'm leaning more towards it being a generic memory leak which somehow builds up during normal gameplay but then only does bad things once theres a bunch of particles around.

If I start up my particle loop, look at the ground and leave my game idling, i have gotten a counter up to 200,000 new particles and still no issue. (maybe 20 mins)

If I start my particle loop up, and start driving around everywheres on the island, it will go boom after i've explored some amount of saharani.

If I drive around the whole island, and then start up my drop loop, by a few hundred iterations it turns into this and the game just goes haywire:

particlecrash.jpg

dangit BIS, lol, I wish we could pay them to clean up the engine banghead.gif I think I'll just give up...

Share this post


Link to post
Share on other sites

so its not just that your script is too heavy?

if not, file a bug report over at the community bugtracker

and provide a sample with easy reproduction and understanding

of the problem - cheers!

http://bugs.armed-assault.net/main_page.php

Share this post


Link to post
Share on other sites

I found something else; after I've run the drop command, the graphics settings page gets screwed and the UI has an error:

http://i92.photobucket.com/albums/l7/kylewilcox/particlecrash2.jpg

so what I'm experiencing must just be long term effects of it screwing things up like that...

could someone please do me a favor?

download this mission file and see if this happens to you, I'm hoping my install just got borked.

http://www.mooload.com/new....zip&s=t

Preview it in the editor. radio 1 to start particles, radio 2 to stop them. Just hit radio 1 and then go into your graphics settings page and see if that glitch happened to you... if it's not just me I'll head over to the Biki...

It seems to affect the old drop command but not the new particle system, so I'll have to just live with that apparently.

thanks.

Share this post


Link to post
Share on other sites

Same here biggrin_o.gif

bla.JPG

Quote[/b] ]so I'll have to just live with that apparently.

nah. you send a pm to Suma with the description and demo mission whistle.gif

Share this post


Link to post
Share on other sites

<s>lol, trying to figure out how to get a working account on the biki is proving to be a bigger task than it was to determine the drop command is screwed up!</s> got that figured out, heh

is it normal practice to PM Suma with new bugs? I'm scared to message the higher-ups like that tounge2.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×