News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

[r4785] Frequent Fatal Errors re vector_tpl indexing using pak128open.r518

Started by infernalmachine, August 23, 2011, 02:42:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infernalmachine

I've been getting frequent Fatal Errors with r4785 (and earlier with r4778) which display a pop-up window with:

FATAL ERROR:
vector_tpl<T>::[]
index out of bounds: 8 not
in 0..-1
PRESS ANY KEY


The index is not always "8" but it is always an integer less than 10. These first appeared with r4778.

Here's the log file:

Simutrans version Nightly 110.0.2 from Aug 19 2011 r4785
FATAL ERROR: vector_tpl<T>::[]
index out of bounds: 8 not in 0..-1
Aborting program execution ...


These aren't reproducible in the sense that reverting to a recent save (I'm saving every few minutes) will not crash at the same point as previously.  They also don't appear to be tied to user input or to month-ends or autosave.

I'm running the Windows sdl nightlies under Win7-64bit.

ps The log file says to report fatal errors to team@64.simutrans.com, but that address does not appear to exist any more.

prissi

Please run simutrans using -log 1 -debug 5 which should create a very complete logfile and a divison by zero near the fatal error. If you are using a debugger, it could tell which empty array was accessed. Or post the last few line before the error message. Maybe this can help to get information on the vector_tpl in question.

And is this related to a certain pak-set?

infernalmachine

Thanks for the reply.

I don't currently have a debugger installed.  The pak used is pak128open.r518 (it was in the thread title).

When I started this game, I was using a nightly just prior to r4778 and pak128open.r517.  In fact, the first time I started to receive these errors was the day I switched both the program and the pak to r4778 and r518, respectively. (I don't know if that is relevant or not.)

I am using 2 addons (with both versions of pak128open), snfos.fences.pak (which I'm actually using in the game) and test.tram.pak (which I obtained here on the forums but haven't tested yet because no vehicles appear until 30 years beyond where my game has reached).

In case it's helpful, I also mention that I've changed max_transfers to 8 and bits_per_month to 21 in the pak128open simuconf.tab, and run the game at 3.0 speed at 1920x1080 resolution (so I am getting red readings in the display tab for fps and simloops, but it generally runs and displays well).

Here's my latest logfile (last 30 lines) with -debug 5.  It ran smoothly for 2 hours until the error appeared.  At that time, I was upgrading a truck cab + mail trailer line by adding 4 newer convoys and then individually withdrawing the 3 original ones.  It crashed a couple of seconds after I clicked withdraw on the first of the old convoys.

Message: gui_scrolled_list_t::show_selection(): sel=29, offset=242, groesse.y=146
Message: gui_textarea_t::recalc_size(): reset size to 298,583
Message: gui_textarea_t::recalc_size(): reset size to 298,550
Message: gui_textarea_t::recalc_size(): reset size to 11,0
Message: gui_textarea_t::recalc_size(): reset size to 257,33
Message: gui_textarea_t::recalc_size(): reset size to 241,33
Message: gui_textarea_t::recalc_size(): reset size to 298,616
Warning: convoi_t::go_alte_richtung(): convoy with wrong vehicle directions (id 186) found => fixing!
Message: gui_textarea_t::recalc_size(): reset size to 298,484
Message: gui_textarea_t::recalc_size(): reset size to 298,462
Message: gui_textarea_t::recalc_size(): reset size to 298,484
Message: gui_textarea_t::recalc_size(): reset size to 298,407
Message: gui_textarea_t::recalc_size(): reset size to 298,385
Message: gui_textarea_t::recalc_size(): reset size to 298,440
Message: gui_textarea_t::recalc_size(): reset size to 263,33
Message: gui_textarea_t::recalc_size(): reset size to 298,473
Warning: convoi_t::go_alte_richtung(): convoy with wrong vehicle directions (id 187) found => fixing!
Message: gui_textarea_t::recalc_size(): reset size to 298,605
Message: gui_textarea_t::recalc_size(): reset size to 241,33
Message: gui_textarea_t::recalc_size(): reset size to 298,605
Message: gui_textarea_t::recalc_size(): reset size to 298,616
Message: gui_textarea_t::recalc_size(): reset size to 146,22
Message: automobil_t::set_convoi(): 00000000
Message: convoi_t::unset_line(): removing old destinations from line=348, fpl=10F8B810
Message: convoi_t::~convoi_t(): destroying 564, 11028A18
Warning: convoi_t::go_alte_richtung(): convoy with wrong vehicle directions (id 1974) found => fixing!
Message: gui_textarea_t::recalc_size(): reset size to 11,0
Message: gui_textarea_t::recalc_size(): reset size to 250,33
FATAL ERROR: vector_tpl<T>::[]
index out of bounds: 7 not in 0..-1
Aborting program execution ...


Thanks.

infernalmachine

Sorry to double post, but reading another thread here reminded me of something that might possibly explain my problem here.

I'm assuming I'm the only one getting these errors with the most recent nightlies (and pak128open), because no-one else has mentioned encountering this particular type of crash, and I have never seen the problem before last week.

If that's so, then perhaps the problem resides in the particular game I'm playing.

With that in mind, I draw your attention to VaclavMacurek's new thread, http://forum.simutrans.com/index.php?topic=7894.0, which discusses a townhall appearing across two elevations.  Further down, http://forum.simutrans.com/index.php?topic=7894.msg75164#msg75164, I tell what happened to me with a grain mill that ended up on two levels after a weird occurrence with the "lower land" tool.

IIRC, this damage to the factory happened before I switched to r4778 and the tuple problem appeared.

I'm wondering now if my game file is now corrupted in such a way that it is causing the crash problem I presented in this thread.

The game save file is at: http://simutrans-germany.com/files/upload/problemgame.sve
and the factory is attached to the station, "Bagota Flour 1".

Fifty

I don't think this is a single save; I have had the same problem with r4781 and both openpak r518 and the r1150 that timothy's server runs on. Of course these were old savegames.

Could be pak 128 related, i am trying to reproduce with pak 64 & -log 1 -debug 5.

Here is a log file from the 128 r1150 crash. http://simutrans-germany.com/files/upload/logfile.zip.
Why do we park on the driveway and drive on the parkway?

Ashley

I think I found the same issue, using 110.0.1 stable version I get this error when loading the savegame linked to here:

http://forum.simutrans.com/index.php?topic=6809.msg74961#msg74961

Also log file with debug=5 attached...
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

The citynames are garbled before. You are sure that this is the right savegame version for your executable?

Ashley

Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi


An_dz

I corrected the problem, it was only working on nightly, but I've used the configuration window to change the save version to 110.0.

And the city names are ok now.

TurfIt

I've made a change in r4807 that *might* fix this. Unfortunately I'm still unable to experience this myself, but a backtrace provided by z9999+ was very illuminating.

Please report any further occurrences of 'index out of bounds'.

EDIT: and 30 seconds after posting I finally get my first crash. Massively overload the CPU, and I can crash repeatedly with r4806. r4807 keeps running.