[sldev] Particle System Overflow / VWR-418
Nicholaz Beresford
nicholaz at blueflash.cc
Sun May 20 09:05:13 PDT 2007
I just spent a Sunday with the particle system, as it seems to have
generated particles constantly, filling particle buffer to the brim,
because (at least that's what I think) incorrect handling of mMaxAge
with a value of 0 kept particle sources from being deleted.
Please see my comments on https://jira.secondlife.com/browse/VWR-418
There is a patch, but I'm not sure if it's the right thing. It does keep
the particle flood at bay here, but I'm not sure if it will keep some
particle
sources from doing what they are supposed to do (I'm limiting sources
with mMaxAge==0 to one burst loop only).
-------------- next part --------------
# XP [W:\sl1.15.1.3]c:/cygwin/bin/udiff -u linden-orig/indra/newview/llviewerpartsource.cpp linden/indra/newview/llviewerpartsource.cpp
--- linden-orig/indra/newview/llviewerpartsource.cpp 2007-05-14 16:47:28.000000000 +0200
+++ linden/indra/newview/llviewerpartsource.cpp 2007-05-20 17:49:12.296875000 +0200
@@ -307,6 +307,12 @@
mLastPartTime = mLastUpdateTime;
dt_update -= mPartSysData.mBurstRate;
}
+
+ if (mPartSysData.mMaxAge == 0)
+ {
+ // Kill particle source because it has had mMaxAge==0 (one burst only??)
+ setDead();
+ }
}
// static
@@ -322,6 +328,7 @@
LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpackBlock(block_num))
{
+ delete new_pssp; // !!! potential memory leak fixed (loss of new_pssp) [Nicholaz Beresford]
return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
@@ -360,6 +367,7 @@
LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpack(dp))
{
+ delete new_pssp; // !!! potential memory leak fixed (loss of new_pssp) [Nicholaz Beresford]
return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
More information about the SLDev
mailing list