News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Re: [patch] Allow convoys to follow their schedule in reverse automatically

Started by sdog, June 06, 2010, 11:43:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sdog

pulled your latest mesilliac/testing and merged it in my 8.x version. I changed the experimental version savegame check to =>8 to test with my saves.

binary crashed immediately after start however:

FATAL ERROR: loadsave_t::rdwr_str()
expected "<bool>", got "<i16>4"

Program received signal SIGABRT, Aborted.
0x00007ffff6c1fa75 in raise () from /lib/libc.so.6
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) bt
#0  0x00007ffff6c1fa75 in raise () from /lib/libc.so.6
#1  0x00007ffff6c235c0 in abort () from /lib/libc.so.6
#2  0x000000000063dd7c in log_t::fatal (this=0xa803c0,
   who=0x676c0b "loadsave_t::rdwr_str()",
   format=0x676bee "expected \"<bool>\", got \"<%s\"") at utils/log.cc:242
#3  0x0000000000465c2c in loadsave_t::rdwr_bool (this=0x7fffffffd0e0,
   i=@0x93d483) at dataobj/loadsave.cc:570
#4  0x000000000045b666 in einstellungen_t::rdwr (this=0x93cd60,
   file=0x7fffffffd0e0) at dataobj/einstellungen.cc:799
#5  0x00000000005e5028 in simu_main (argc=1, argv=0x7fffffffe2d8)
   at simmain.cc:510
#6  0x000000000066c78d in main (argc=1, argv=0x7fffffffe2d8) at simsys_s.cc:748
(gdb)



einstellungen.cc

                     if(file->get_experimental_version() >= 8) {
//                              file->rdwr_bool( randomise_circular_routes, "" );
                     }


commenting out this line made it run again.


edit: forgot to mention file name of code snippet

jamespetts

Sdog,

it looks as if your problem is the fact that you have changed

if(file->get_experimental_version() >= 9) { to if(file->get_experimental_version() >= 8) {, which means that it thinks that all saved games with version 8 have this datum, whereas, in fact, many don't. A more reliable way of testing this would be to look in simversion.h and change the version of Simutrans-Experimental for your local version to 9.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

sdog

i don't quite understand this james, the crash happened before the pak was selected, so there shouldn't have been a savegame loaded?
Of course you were right, changing it to 9 prevents the crash.

jamespetts

Quote from: sdog on June 07, 2010, 12:32:29 AM
i don't quite understand this james, the crash happened before the pak was selected, so there shouldn't have been a savegame loaded?
Of course you were right, changing it to 9 prevents the crash.

If that code was in einstellungen.cc, it would crash on loading settings.xml, which is before any pakset is loaded.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

sdog

thanks james for explaining this.
a look at settings-experimental.xml answered a load of open questions i had before!