The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: sheldon_cooper on January 07, 2015, 02:30:27 AM

Title: Fatal Error: vector_tpl<T>::[]
Post by: sheldon_cooper on January 07, 2015, 02:30:27 AM
Hello !! was playing on pak128, 2.5.2, r7439, when I went increase the population of my city, this error appeared. What is ??
(http://i.imgur.com/ehBpyr7.jpg)
Title: Re: Fatal Error: vector_tpl<T>::[]
Post by: Ters on January 07, 2015, 06:30:01 AM
I hope that negative upper end of range is just an effect of the way the range is presented (that [0,0> is converted to [0,-1]).
Title: Re: Fatal Error: vector_tpl<T>::[]
Post by: Dwachs on January 08, 2015, 07:01:54 AM
I cannot think of any cause for this crahs. The only vector_tpl with stadt_t* pointers is within fabrik_t, but all accesses seem to be safe.

@Ters: the error message shows the closed interval of valid indexes, 0..-1 means empty vector.
Title: Re: Fatal Error: vector_tpl<T>::[]
Post by: Ters on January 08, 2015, 04:23:44 PM
What is guarding the access at line 1011 in fabrikbauer.cc?
Title: Re: Fatal Error: vector_tpl<T>::[]
Post by: Dwachs on January 08, 2015, 05:32:39 PM
Thanks for spotting! This should be fixed now with r7466.