News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

r5830 pak64 - limit error of the schedule

Started by yoyo, July 18, 2012, 04:35:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yoyo

HI!

an error occurred when added 253th train stop to a schedule.
"FATAL ERROR : minivec_tpl<T>::resize() new size 256 too large (>255)."

[fahrplan.cc]
bool schedule_t::append(const grund_t* gr, uint8 ladegrad, uint8 waiting_time_shift)
{
   // stored in minivec, so wie have to avoid adding too many
   if(eintrag.get_count()>=254) {
      create_win( new news_img("Maximum 254 stops\nin a schedule!\n"), w_time_delete, magic_none);
      return false;
   }

   if(ist_halt_erlaubt(gr)) {
      eintrag.append(linieneintrag_t(gr->get_pos(), ladegrad, waiting_time_shift), 4);
      return true;
   }
   ...
}

> append( ... , extend = 4);
maximum 254 stops in a schedule.
but 252(stops) + 4(extend) = 256 > 255(limit of minivec)

everyone can reproduce this error. please use my savefile(saveformat = bzip2)

thank you.

----------------------------------------------------------------
[ environment ]
os            : Windows7 x64
compiler   : Visual C/C++2010 express
simutrans : r5830 / GDI / Win32 Debug / compiled from source code.
pak          : pak64 111.3 / SVN / makeobj=53
libs          : zlib 1.2.7(debug) / bzip2 1.0.6(debug)
----------------------------------------------------------------

Dwachs

#1
thanks for reporting! will be fixed...

Edit: should be fixed in r5832.
Parsley, sage, rosemary, and maggikraut.