The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: neroden on May 02, 2013, 12:57:53 AM

Title: Subtle crash, only on fast foward and at high speeds.
Post by: neroden on May 02, 2013, 12:57:53 AM
I've reproduced this crash only when running on fast forward or at very high speeds (10.00x).  It only happens sometimes.  You can probably reproduce it on any map if you run at a high enough speed for long enough.

Something causes a segmentation fault in "neuer_monat".  Sometimes when checking the seasons; sometimes something else.  I think it has to do with checking what month it is -- it thinks it's month 11292 (or something equally nutty) and then runs outside array bounds trying to use that as an index.

I can't quickly figure out what causes it, so I'm throwing it open for consideration.  I'm thinking there's some subtle overflow bug in the calculations which are performed for time passing at high speeds.  Perhaps one of those signed-unsigned comparison warnings which are all over the simutrans code.
Title: Re: Subtle crash, only on fast foward and at high speeds.
Post by: neroden on May 25, 2013, 05:17:02 PM
Can anyone else reproduce this?
Title: Re: Subtle crash, only on fast foward and at high speeds.
Post by: jamespetts on May 25, 2013, 05:40:57 PM
I don't think that I've seen it.