The International Simutrans Forum

 

Author Topic: Segfault on startup [r6922]  (Read 1826 times)

0 Members and 1 Guest are viewing this topic.

Offline ArthurDenture

  • Coder/patcher
  • *
  • Posts: 86
Segfault on startup [r6922]
« on: November 24, 2013, 07:58:30 PM »
I noticed that now that the "compile simutrans" build is green again (after revision 6922), the "run simutrans" build is still red, and indeed I can reproduce locally (at r6931) that simutrans segfaults on startup. I haven't examined the code to see what the problem is, but here's the traceback from gdb.

Code: [Select]
(gdb) run
Starting program: /home/jacob/simutrans/sim-sdl2-head
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Use work dir /home/jacob/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!

Program received signal SIGSEGV, Segmentation fault.
0x0000000000409dd9 in obj_besch_t::get_child<bildliste_besch_t> (this=0x0, i=2)
    at bauer/../boden/wege/../../besch/obj_besch.h:25
25 template<typename T> T const* get_child(int i) const { return static_cast<T const*>(node_info[i]); }
(gdb) bt
#0  0x0000000000409dd9 in obj_besch_t::get_child<bildliste_besch_t> (this=0x0,
    i=2) at bauer/../boden/wege/../../besch/obj_besch.h:25
#1  0x0000000000409235 in skin_besch_t::get_bild (this=0x0, i=0)
    at bauer/../boden/wege/../../besch/skin_besch.h:29
#2  0x000000000051ae90 in gui_theme_t::init_gui_from_images ()
    at gui/gui_theme.cc:178
#3  0x000000000051bbd5 in gui_theme_t::themes_init (
    file_name=0x75616c "themes.tab") at gui/gui_theme.cc:346
#4  0x000000000069cd13 in simu_main (argc=1, argv=0x7fffffffe048)
    at simmain.cc:713
#5  0x00000000006ae9e5 in sysmain (argc=1, argv=0x7fffffffe048)
    at simsys.cc:703
#6  0x000000000071a0c0 in main (argc=1, argv=0x7fffffffe048)
    at simsys_s2.cc:658

Edit: oh, is this the same "simutrans doesn't start up" as the n other recent threads? Whoops... maybe if I have the time I'll see if it's possible to make it abort with a message instead of segfaulting.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Segfault on startup [r6922]
« Reply #1 on: November 24, 2013, 08:10:42 PM »
Yep you'll need to update the themes paks.

Offline ArthurDenture

  • Coder/patcher
  • *
  • Posts: 86
[solved] Re: Segfault on startup [r6922]
« Reply #2 on: November 24, 2013, 08:15:27 PM »
Yep, here was what I needed to do, in case anyone else wasn't familiar with the commands:

Code: [Select]
make makeobj
build/default/makeobj/makeobj PAK ~/simutrans/themes/menu.standardtheme.pak themes.src/standard/standard.dat

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5520
  • Languages: EN, NO
Re: Segfault on startup [r6922]
« Reply #3 on: November 24, 2013, 10:36:17 PM »
Yep, here was what I needed to do, in case anyone else wasn't familiar with the commands:

Code: [Select]
make makeobj
build/default/makeobj/makeobj PAK ~/simutrans/themes/menu.standardtheme.pak themes.src/standard/standard.dat


I think we should have a makefile target for that.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9511
  • Languages: De,EN,JP
Re: Segfault on startup [r6922]
« Reply #4 on: November 27, 2013, 05:13:04 PM »
THe svn contain the current thme pak anyway in it simutrans folder.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5520
  • Languages: EN, NO
Re: Segfault on startup [r6922]
« Reply #5 on: November 27, 2013, 06:04:03 PM »
It's still nice to have the instructions for how to make that pak file written down somewhere, and why not write it down so that the computer can follow it itself. This is true whether the pak is regenerated often or seldom, for different reasons.