The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: dantedarkstar on May 16, 2009, 12:46:48 pm

Title: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: dantedarkstar on May 16, 2009, 12:46:48 pm
As the topic says, I found the following bug.

After loading old save game (with large p****enger network) and running it for almost a month without touching anything I started adjusting the network to new balance that settled after this month. When working, I suddenly get this:

FATAL ERROR: minivec_tpl<T>::resize()
new size 256 too large (>255)

The error is repeatable. Everytime I load the save and wait it happens on the very same day (10 Dec, the save is at 1 Dec).
The save is too large to upload here, but if it would help you to have it, should I use http://simutrans-germany.com/files/ to upload it (I don't have any p****word or anything there, just found it few moments ago) ? Or some other place ?
I'm running pak128-1.4.5--102.0. But generally it works. The crashing save was made after 1 month of fast forwarding after all and it worked correctly during this time.
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: knightly on May 16, 2009, 02:39:54 pm
Hi Dantedarkstar,

You don't need to register at http://simutrans-germany.com/files/ to upload files. You may use any user name and p****word -- they are just for identifying your uploaded files and for you to managed them later on (e.g. delete them before the file expires).
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: jamespetts on May 16, 2009, 02:43:57 pm
Dante,

thank you very much for the bug report! If you can upload your saved game, I should be able to track down and fix the bug, which, judging by the message, I suspect is caused by using a minivec where a full vector should be used. With the saved game, I can find out where I am using the wrong type of vector, and change it. Thank you for your feedback!
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: dantedarkstar on May 16, 2009, 02:54:11 pm
You replied as I was in the process of uploading the save (thanks Knightly for explaining) :)

Here it is:
http://simutrans-germany.com/files/upload/Q5exp_57.sve
(I set it to be valid for 7 days)

It always crashes for me on 10 Dec, although not always on the same hour. Just fast forward.
Maybe it's be something with the number of different p****engers (destination/origin) that are on the stop or something like that ? (since tracking origin/destination makes a lot more types than just destination as in standard simutrans, and I suspects the hub architecture of the transport network that I have there might result in many different p****engers being there)
It's just a thought. I don't know if minivec is even used for that :)
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: jamespetts on May 16, 2009, 05:04:38 pm
Thank you very much. Problem found and fixed for the next version :-)
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: dantedarkstar on May 16, 2009, 06:25:44 pm
So, where was this minivec used where you needed full vector ? Just out of curiosity :)
(I don't mean in what function or whatever, I'm not familiar with simutrans code, just was that p****enger list or something else)
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: jamespetts on May 16, 2009, 06:31:53 pm
It was the list of goods/p****enger packets on board a convoy.
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: dantedarkstar on May 16, 2009, 07:58:54 pm
Ahh, onboard. Then this was one of my express trains or p****enger liners. He was the culprit !  :police:
Or maybe a hero ? ;D
Title: Re: [Bug v3.8] minivec_tpl<T>::resize(), new size 256 too large (>255)
Post by: jamespetts on May 17, 2009, 03:11:03 pm
Fixed in version 3.9.