Page 1 of 1

crashes caused by FloatingOrigin script

Posted: Sun Aug 02, 2015 10:25 pm
by Nystul
I think I found the reason for the crashes I experience occasionally when fast-travelling around like a pro ;)
It took me quite some time to localize the source for the crash but now I am pretty confident that I have found it and how others should be able to reproduce it... I was able to reproduce it with just the core tools without any mods installed.
how I mangage to reproduce it:
-) load the scene Legacy/WorkshopDemo_StreamingWorld
-) add to PlayerAdvanced the scripts FloatingOrigin.cs and PositionUpdate.cs
-) you do not need to manually attach StreamingWorld gameobject and PlayerAdvanced gameobject (if you do make sure you do not accidentally select the PlayerAdvanced prefab)
-) press start and random-teleport several times by pressing key 'r' (I usually get a crash after 20+ teleports - if I have mods enabled I get the crash much earlier after 8-12 teleports - but the important point is it crashes even without them - it is just a bit more unlikely)

without these scripts I can not produce any crashes

Re: crashes caused by FloatingOrigin script

Posted: Sun Aug 02, 2015 11:16 pm
by Interkarma
Good to know thanks. The FloatingOrigin scripts could do with another pass anyway.

Re: crashes caused by FloatingOrigin script

Posted: Thu Oct 08, 2015 2:10 pm
by Nystul
the crash seems to be related to the update of the particles in function void UpdateParticles(Vector3 offset):
it does no longer happen on my system when commenting out these lines

Code: Select all

	int n = ps.GetParticles(particles);                
        for (int j = 0; j < n; j++)
	{
		particles[j].position += offset;
	}
	ps.SetParticles(particles, n);

Re: crashes caused by FloatingOrigin script

Posted: Thu Oct 08, 2015 11:11 pm
by Interkarma
Thank you Nystul. :)