News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Vector out of bounds

Started by merry, October 21, 2011, 12:26:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

merry

HI,

I am also repeatedly experincing a similar "fatal error", in the latest stable Experimental (10.2) with PakBritain 0.8.2
The same error occurred repeatedly in Experimental 9.12

It seems to occur when amending a line such that the existing 'next stop' is no longer part of the revised schedule.
The error is "fatal error: Minvec out of bounds (4 not in 0..3). Press any key to continue" [or something similar, wasn't able to capture exactly it at the time - but the vector looked up is always larger than the array being indexed into]
The problem can occur when changing schedule via the vehicle window, or the line manager. But it may not always happen, it may be that certain other windows need to be open And of course, it'll only happen if the change requires lookup of a stop that is no longer in the schedule.
IIRC, the error also requires taht the change to the schedule reduces the number of stops in the line, so that the vector can exceed the list length

Looks like a bounds error check is required before making a lookup in the stop list to ensure the index exists. At this point my programming skills stop - I can do basic algorithm & suchlike, but C coding is not really in my skillset (respect to you coders!).

Thanks for a marvellously engrossing game, it'd be realy nice if this can be fixed as it always happens in the late stage of a major network change!!

Cheers,
merry

Brambo

Hi, got this error too, in 9.12 and later. The easiest way to reproduce is to have a route with many stops and vehicles running, and then deleting all the stops. The program will crash.

jamespetts

Thank you for the report - this is a separate issue from that described in the other topic, so I have split the topics. I think that I have fixed this error on the 10.x branch on Github - the fix should be available in the next release.
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.

merry

Cheers James,
Does the Github 10.x fix post-date general release version 10.2?
I ask because the issue remains in Experimental 10.2 as released, obviously if the relevant Github fixed version post-dates thjis then fine, otherwise not so good...
Afraid I'm not currently a Github user - I'll have to wait for another release & save regularly for now.
Regards,
Merry

jamespetts

Merry,

the 10.x fix does indeed postdate 10.2 - only yesterday did I push the 10.x fix. I shall release it in due course, probably to coincide approximately with the next main release of Standard, which I am told is forthcoming.
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.

Milko

Merry

If you want, you can use an unofficial version that I compiled and should have fixed the bug that will cause problems.

http://forum.simutrans.com/index.php?topic=8289.msg78435#msg78435

Giuseppe

jamespetts

Giuseppe,

thank you very much for your unofficial version. I have now released an official version with these fixes: see here for details.
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.

Brambo

Hi,

I still get this error in 10.3 :(

I did the following:
-I have a (bus) route with a number of vehicles and 2 stops, running normally
-I delete all the stops from the route, all vehicles show "no route"
-select one of the vehicles, and send to depot

Regards,
Bram

jamespetts

#8
Can you upload your saved game?

Edit: Found the problem - this is actually a different problem from the original one posted on this thread, and it happens only when a route has no stops in its schedule. It is fixed on the 10.x branch. Thank you for your report!
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.