Seems that there is some problem with the max. allowed heightlevel setting.
This lead to the following assertion when opening the Construction node in the settings tree.
Code: Select all
openttd: /home/wol/openttd/_trunk_comb/src/strings_func.h:59: StringParameters::StringParameters(StringParameters&, uint): Assertion `size <= parent.num_param - parent.offset' failed.
Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fe1424 in __kernel_vsyscall ()
#1 0xb7b5a941 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0xb7b5dd72 in *__GI_abort () at abort.c:92
#3 0xb7b53b58 in *__GI___assert_fail (assertion=0x855dd6c "size <= parent.num_param - parent.offset", file=0x84bdc00 "/home/wol/openttd/_trunk_comb/src/strings_func.h", line=59,
function=0x855e5e0 "StringParameters::StringParameters(StringParameters&, uint)") at assert.c:81
#4 0x0842d136 in StringParameters (size=<optimized out>, parent=..., this=<optimized out>) at /home/wol/openttd/_trunk_comb/src/strings_func.h:59
#5 FormatString (buff=0xbfffc886 "\377\277", str_arg=str_arg@entry=0xb7fdd964 "", args=args@entry=0xbfffc320, last=last@entry=0xbfffd05f "\b\200}c\b#", case_index=case_index@entry=0, game_script=game_script@entry=false,
dry_run=dry_run@entry=true) at /home/wol/openttd/_trunk_comb/src/strings.cpp:1175
#6 0x0842c1cc in FormatString (buff=buff@entry=0xbfffc883 "\377\277", str_arg=0xb7fdd964 "", args=args@entry=0xbfffc320, last=last@entry=0xbfffd05f "\b\200}c\b#", case_index=case_index@entry=0,
game_script=game_script@entry=false, dry_run=dry_run@entry=false) at /home/wol/openttd/_trunk_comb/src/strings.cpp:905
#7 0x0842d6b6 in GetStringWithArgs (buffr=0xbfffc883 "\377\277", string=34916, args=args@entry=0xbfffc320, last=last@entry=0xbfffd05f "\b\200}c\b#", case_index=case_index@entry=0, game_script=game_script@entry=false)
at /home/wol/openttd/_trunk_comb/src/strings.cpp:269
#8 0x0842b032 in FormatString (buff=0x0, str_arg=str_arg@entry=0xb7fbfc93 "Maximal allowed heightlevel: ", args=args@entry=0x86f01e0, last=last@entry=0xbfffd05f "\b\200}c\b#", case_index=case_index@entry=0,
game_script=game_script@entry=false, dry_run=dry_run@entry=true) at /home/wol/openttd/_trunk_comb/src/strings.cpp:1176
#9 0x0842c1cc in FormatString (buff=buff@entry=0xbfffc860 "Maximal allowed heightlevel: \377\277", str_arg=0xb7fbfc93 "Maximal allowed heightlevel: ", args=args@entry=0x86f01e0,
last=last@entry=0xbfffd05f "\b\200}c\b#", case_index=case_index@entry=0, game_script=game_script@entry=false, dry_run=dry_run@entry=false) at /home/wol/openttd/_trunk_comb/src/strings.cpp:905
#10 0x0842d6b6 in GetStringWithArgs (buffr=buffr@entry=0xbfffc860 "Maximal allowed heightlevel: \377\277", string=string@entry=892, args=args@entry=0x86f01e0, last=last@entry=0xbfffd05f "\b\200}c\b#",
case_index=case_index@entry=0, game_script=game_script@entry=false) at /home/wol/openttd/_trunk_comb/src/strings.cpp:269
#11 0x0842dbef in GetString (buffr=0xbfffc860 "Maximal allowed heightlevel: \377\277", string=892, last=0xbfffd05f "\b\200}c\b#") at /home/wol/openttd/_trunk_comb/src/strings.cpp:276
#12 0x0827bc0d in DrawString (left=60, right=493, top=94, str=892, colour=TC_LIGHT_BLUE, align=SA_LEFT, underline=false, fontsize=FS_NORMAL) at /home/wol/openttd/_trunk_comb/src/gfx.cpp:653
#13 0x083f4cdd in SettingEntry::DrawSetting (this=this@entry=0x86ec3b0, settings_ptr=settings_ptr@entry=0x86eb060, left=60, left@entry=35, right=right@entry=493, y=94, state=0, highlight=false)
at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1268
#14 0x083f5001 in SettingEntry::Draw (this=0x86ec3b0, settings_ptr=0x86eb060, left=5, right=493, base_y=61, first_row=0, max_row=26, cur_row=3, parent_last=0, selected=0x0) at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1169
#15 0x083f524e in Draw (parent_last=<optimized out>, cur_row=<optimized out>, selected=<optimized out>, max_row=<optimized out>, first_row=<optimized out>, base_y=<optimized out>, right=<optimized out>, left=<optimized out>,
settings_ptr=<optimized out>, this=<optimized out>) at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1413
#16 SettingsPage::Draw (this=0x863d5ec, settings_ptr=0x86eb060, left=5, right=493, base_y=61, first_row=0, max_row=26, selected=0x0, cur_row=2, parent_last=0) at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1408
#17 0x083f524e in Draw (parent_last=<optimized out>, cur_row=<optimized out>, selected=<optimized out>, max_row=<optimized out>, first_row=<optimized out>, base_y=<optimized out>, right=<optimized out>, left=<optimized out>,
settings_ptr=<optimized out>, this=<optimized out>) at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1413
#18 SettingsPage::Draw (this=0x863d574, settings_ptr=0x86eb060, left=5, right=493, base_y=61, first_row=0, max_row=26, selected=0x0, cur_row=0, parent_last=0) at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1408
#19 0x083f7ff4 in GameSettingsWindow::DrawWidget (this=0xa8b4b2d0, r=..., widget=1) at /home/wol/openttd/_trunk_comb/src/settings_gui.cpp:1854
#20 0x084a8b87 in NWidgetBackground::Draw (this=0xa8b4b880, w=0xa8b4b2d0) at /home/wol/openttd/_trunk_comb/src/widget.cpp:1808
#21 0x084a6374 in NWidgetPIPContainer::Draw (this=0xa8b4b830, w=0xa8b4b2d0) at /home/wol/openttd/_trunk_comb/src/widget.cpp:1068
#22 0x084a6374 in NWidgetPIPContainer::Draw (this=0xa8b4b508, w=0xa8b4b2d0) at /home/wol/openttd/_trunk_comb/src/widget.cpp:1068
#23 0x084a9c6a in Window::DrawWidgets (this=0xa8b4b2d0) at /home/wol/openttd/_trunk_comb/src/widget.cpp:572
#24 0x084b0193 in DrawOverlappedWindowForAll (left=584, top=256, right=1095, bottom=704) at /home/wol/openttd/_trunk_comb/src/window.cpp:704
#25 0x0827970a in RedrawScreenRect (left=584, top=top@entry=256, right=right@entry=1095, bottom=704) at /home/wol/openttd/_trunk_comb/src/gfx.cpp:1726
#26 0x08279950 in DrawDirtyBlocks () at /home/wol/openttd/_trunk_comb/src/gfx.cpp:1818
#27 0x084b1d8c in UpdateWindows () at /home/wol/openttd/_trunk_comb/src/window.cpp:2754
#28 0x08494b77 in VideoDriver_SDL::MainLoop (this=0x8733890) at /home/wol/openttd/_trunk_comb/src/video/sdl_v.cpp:631
#29 0x0832f19d in ttd_main (argc=1, argv=0xbffff644) at /home/wol/openttd/_trunk_comb/src/openttd.cpp:847
#30 0x08165498 in main (argc=1, argv=0xbffff644) at /home/wol/openttd/_trunk_comb/src/os/unix/unix.cpp:275
I noticed that I used STRING1 (which worked in the past as far as I remember), but all other strings defined there use STRING2. As this looked like it might be the cause for the assertion, I replaced it with STRING2 (I admit that I not fully understand the magic behind consuming the string parameters of those settings strings...). This fixed the assertion, but nevertheless it prints out "undefined string" in the construction settings. I also replaced the constants from tile_type.h by simple int literals in settings.ini, no change.
I noticed that some there was some refactoring concerning settings during the last months, but currently I have no clue what might be wrong with that settings.ini entry.
Can anyone help? If you know the solution, feel free to post an updated version of the patch as I will not have the time for such things during the next two weeks...