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
crashes caused by FloatingOrigin script
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: crashes caused by FloatingOrigin script
Good to know thanks. The FloatingOrigin scripts could do with another pass anyway.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: crashes caused by FloatingOrigin script
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
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);
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: crashes caused by FloatingOrigin script
Thank you Nystul.