Code: Select all
if (Owner != none) {
Log(0@Owner);
SetLocation(Owner.Location);
SetRotation(Owner.Rotation);
Log(1@Owner);
Code: Select all
ScriptLog: 0 Autoplay.TMale0
ScriptWarning: ...Timer:003B) Accessed None
ScriptLog: 1 None
Code: Select all
if (Owner != none) {
Log(0@Owner);
SetLocation(Owner.Location);
SetRotation(Owner.Rotation);
Log(1@Owner);
Code: Select all
ScriptLog: 0 Autoplay.TMale0
ScriptWarning: ...Timer:003B) Accessed None
ScriptLog: 1 None
And then this thing will lose owner (I'm guessing) and then it might be going in destruction being NONE itself and without owner. And error is probably similar to GuidedWarshell problem when it's still rendering in Deletion process... Keep in mind that I have solved DynAI mod crash by adding a stupid check like this <If (Something != None && !Something.bDeleteMe)> and was the only way to not crash by trying to setup a thing which did not lived any longer (for some reason of that map).PrinceOfFunky wrote:These are the logs when a pawn dies and becomes None:
So it is a prevention, well, thanks for the explanationHigor wrote:In UT's native c++ the game would insta-GPF, yes, you do need sanity checks when there's uncertainty that a reference will remain the same.
Code: Select all
Dt = Spawn( class'DecoTest',Pn,,Pn.Location+Vect(0,0,1) );
if ( Dt != None )
{
// log ( Self@"spawned"@Dt@"addressing to check"@Pn );
if ( Dt.Location.X == Pn.Location.X
&& Dt.Location.Y == Pn.Location.Y
&& ( Dt.Location.Z - Pn.Location.Z == 1)
&& !Dt.bDeleteMe ) //02-16-2016 #1 #2 - Now is no longer crashing
{
// log (Dt@"is good...");
Dt.bHaveAGood = True; //#1 Accessed None - it is just in deletion process right after spawn for some reason, hell knows...
Dt.Tag = 'MeMoving'; //#2 The same crap
NumOps++;
}
That particular Timer code actually calls that other code indirectly through SetLocation. Changing the location of an actor can immediately cause multiple events to happen, which in this case either just changed the Owner or even destroyed it. The following call to SetRotation then attempted to access a property of the now-empty Owner variable, causing the Accessed None error.Barbie wrote:Does this mean that during Timer() execution other code is running that might change the references? AFAIK this can happen only in latent functions or multi threaded code.
To me, it occurred using:Wormbo wrote:That particular Timer code actually calls that other code indirectly through SetLocation.
The same code used into "Tick()" function, gave the same Accessed None's.Higor wrote:The game automatically deallocates actors after you pile up at least 256 (i think) destroyed actors and this only happens between ticks, not in the middle of it.