News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Fatal Error: vector_tpl<T>::[]

Started by sheldon_cooper, January 07, 2015, 02:30:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sheldon_cooper

Hello !! was playing on pak128, 2.5.2, r7439, when I went increase the population of my city, this error appeared. What is ??

Ters

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]).

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

Ters

What is guarding the access at line 1011 in fabrikbauer.cc?

Dwachs

Thanks for spotting! This should be fixed now with r7466.
Parsley, sage, rosemary, and maggikraut.