minolin / acplugins

R&D about the upcoming server plugin infrastrucure of Assetto Corsa, driving simulator by Kunos simulazioni
Apache License 2.0
18 stars 4 forks source link

Mother of a bug: Environment.TickCount #26

Closed minolin closed 8 years ago

minolin commented 8 years ago

Today I really learnt something. DriverInfo.UpdatePosition() uses

int currTime lastTime = Environment.TickCount; this.lastTime = currTime;

and

if (this.lastTime > 0

What I didn't know: TickCount is negative for 25days (in server time). https://msdn.microsoft.com/de-de/library/system.environment.tickcount%28v=vs.110%29.aspx

Thomas, you can close this after reading, is already fixed like described in the link. Just wanted to let you know. The resulting bugs could have been very, very difficult to find - had luck and a direct RDP session to the failing server today. Maybe this saves you a lot of time one day :+1:

flitzi commented 8 years ago

good find