News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Segfault on startup [r6922]

Started by ArthurDenture, November 24, 2013, 07:58:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ArthurDenture

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.


(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.

kierongreen

Yep you'll need to update the themes paks.

ArthurDenture

Yep, here was what I needed to do, in case anyone else wasn't familiar with the commands:


make makeobj
build/default/makeobj/makeobj PAK ~/simutrans/themes/menu.standardtheme.pak themes.src/standard/standard.dat


Ters

Quote from: ArthurDenture 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:


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.

prissi

THe svn contain the current thme pak anyway in it simutrans folder.

Ters

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.