The International Simutrans Forum

 

Author Topic: [bug 5.1] index of bounds in vector  (Read 1883 times)

0 Members and 1 Guest are viewing this topic.

Offline Hanczar

  • *
  • Posts: 28
[bug 5.1] index of bounds in vector
« on: July 19, 2009, 10:37:20 PM »
When I started new games in 5.1 version, they works quite stable by six hours ( my previous game started with 5.0 crashes often as I wrote in thread about Valgrind reports ).
But after playing about 2 hours in new game, a message window appear with 'FATAL ERROR: vector_tpl<T>::[] index out of bounds: 0 not in 0..-1, press any key' and abort was called.

Screenshot with error attached.

backtrace:
#0  0xb80c1430 in __kernel_vsyscall ()
#1  0xb7da16d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7da3098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x081dfb8e in log_t::fatal (this=0x84ba130, who=0x820082d "vector_tpl<T>::[]", format=0x8200984 "index out of bounds: %i not in 0..%d") at utils/log.cc:244
#4  0x08133243 in vector_tpl<quickstone_tpl<convoi_t> >::operator[] (this=0x4f54, i=6) at dataobj/../dataobj/../tpl/vector_tpl.h:233
#5  0x08133271 in simline_t::get_convoy (this=0xbf911f8, i=0) at simline.h:115
#6  0x081dcc65 in path_explorer_t::compartment_t::step (this=0xbb8b48c) at path_explorer.cc:612
#7  0x081dd292 in path_explorer_t::step () at path_explorer.cc:82
#8  0x081cda75 in karte_t::step (this=0x8587a50) at simworld.cc:3002
#9  0x081ce4f8 in karte_t::interactive (this=0x8587a50) at simworld.cc:4743
#10 0x081a27c4 in simu_main (argc=704, argv=0xbec6d10) at simmain.cc:957
#11 0x081ff718 in main (argc=1, argv=0xbfbdd044) at simsys_s.cc:737

Version 5.1 built from sources, with using pak128 with modified config files.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [bug 5.1] index of bounds in vector
« Reply #1 on: July 19, 2009, 10:47:17 PM »
Hanczar,

thank you very much for the report. Can you post a saved game? Also, are you using a 32- or 64-bit version?

knightly

  • Guest
Re: [bug 5.1] index of bounds in vector
« Reply #2 on: July 20, 2009, 08:01:27 AM »
Hi Hanczar :)

Thanks a lot for your bug report. I have found the bug and will upload the fix later.

Knightly

Offline Hanczar

  • *
  • Posts: 28
Re: [bug 5.1] index of bounds in vector
« Reply #3 on: July 20, 2009, 12:28:07 PM »
Good to know that it helps :-)
I use 32-bit version, I can put only autosave from a several minutes before problem occurs, but as it seems that fix for problem exist save game is not need any more I think :-)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [bug 5.1] index of bounds in vector
« Reply #4 on: July 26, 2009, 01:22:14 PM »
This fix has been incorporated as of version 6.0 and later. Thank you Hanczar for the report and Knightly for the fix :-)