The International Simutrans Forum

 

Author Topic: Liveries: crash on exit  (Read 1001 times)

0 Members and 1 Guest are viewing this topic.

Offline Carl

  • Devotee
  • *
  • Posts: 1602
    • Website
  • Languages: EN
Liveries: crash on exit
« on: August 23, 2011, 08:32:34 AM »
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.

Code: [Select]
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

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Liveries: crash on exit
« Reply #1 on: August 23, 2011, 09:07:41 PM »
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.

Offline Carl

  • Devotee
  • *
  • Posts: 1602
    • Website
  • Languages: EN
Re: Liveries: crash on exit
« Reply #2 on: August 24, 2011, 11:00:08 PM »
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.