News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Subtle crash, only on fast foward and at high speeds.

Started by neroden, May 02, 2013, 12:57:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

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.

neroden


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.