News:

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

Liveries: crash on exit

Started by Carl, August 23, 2011, 08:32:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carl

I've been experimenting with the liveries feature. I've managed to get it to work, but ever since I added livery information to simuconf.tab I find that Experimental will crash when I exit the program. No crash information -- just your standard Windows crash. I think the crash must be related to simuconf in some way, since it occurs even when there are no livery-enabled paks in the pakset folder. This occurs using the latest version of the 10.x branch.

Here's what I've got in simuconf, for information -- perhaps something I've written here is causing the crash.


livery_scheme[0] = MAV
retire_year[0] = 2090
retire_month[0] = 6
livery[0][0] = MAV
intro_year[0][0] = 1994
intro_month[0][0] = 1

livery_scheme[1] = CFR
retire_year[1] = 2090
retire_month[1] = 6
livery[1][0] = CFR
intro_year[1][0] = 1994
intro_month[1][0] = 1

jamespetts

Carl,

thank you for this report. I am aware of this error, but have not fixed it because: (1) I have had trouble in understanding its cause; and (2) it is of low priority, since, the crash occurring only on exit, it does not interfere with the running of the program. Ideally, it would be good to fix it, however, so any help in doing so would be appreciated.

What I know of the problem so far is that it occurs in line 45 of vector_tpl.h, which is the destructor for the vector template class. This is called by the automatic destructor in einstellungen_t, which deletes the "livery_schemes" object, which is a vector of the various livery schemes (which is why the crash only occurs if you have defined at least one livery scheme in simuconf.tab; otherwise, the vector is empty, and the crash does not seem to occur when deleting the contents of a vector, which line 45 does, when it is empty). I have checked, and it occurs only on exiting the game, and not on loading a new game, so this should not significantly affect players. Any suggestions as to how best to solve it would be gratefully received.
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.

Carl

Thanks James. Glad to hear that this has been noted already. I agree that since it doesn't adversely affect the running of the game, it shouldn't be considered a priority.