News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

r11997 crash on linux Ubuntu derived

Started by Yona-TYT, Yesterday at 08:20:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

(gdb) run -debug 3
Starting program: /home/yona/Games/simutrans-nigth/simutrans -debug 3
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Simutrans version 124.5.1 Nightly from Jun  4 2026 r11997 hash 0xa5fd692
Warning: loadsave_t::rd_open: File 'settings.xml' does not exist or is not accessible
Message: simu_main(): Parsing /home/yona/Games/simutrans-nigth/config/simuconf.tab
Message: simu_main(): Version:    124.5.1 Nightly  Date: Jun  4 2026
Message: simu_main(): Debuglevel:  3
Message: simu_main(): base_dir:    /home/yona/Games/simutrans-nigth/
Message: simu_main(): install_dir: /home/yona/simutrans/paksets/
Message: simu_main(): user_dir:    /home/yona/simutrans/
Message: simu_main(): locale:      es
Message: dr_os_init(SDL2): SDL Driver: x11
Message: SDL_StartTextInput:
Message: dr_query_screen_resolution(SDL2): screen resolution width=1366, height=768
Message: simu_main(): simgraph_init disp_width=704, disp_height=560, fullscreen=0
Message: dr_query_screen_resolution(SDL2): screen resolution width=1366, height=768
Message: dr_os_open(): Screen requested 704,560, available max 1366,768
Message: internal_create_surfaces(SDL2): Renderer: opengl, Max_w: 0, Max_h: 0, Flags: 14, Formats: 4, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888
Message: internal_create_surfaces(SDL2): Renderer: opengles2, Max_w: 0, Max_h: 0, Flags: 14, Formats: 4, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888
Message: internal_create_surfaces(SDL2): Renderer: software, Max_w: 0, Max_h: 0, Flags: 13, Formats: 8, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB565, SDL_PIXELFORMAT_RGB555
[Nuevo Thread 0x7fffe7abe6c0 (LWP 70956)]
[Nuevo Thread 0x7fffe72bd6c0 (LWP 70957)]
[Nuevo Thread 0x7fffe6abc6c0 (LWP 70966)]
[Nuevo Thread 0x7fffe62bb6c0 (LWP 70967)]
[Thread 0x7fffe62bb6c0 (LWP 70967) terminado]
[Thread 0x7fffe6abc6c0 (LWP 70966) terminado]
[Nuevo Thread 0x7fffe6abc6c0 (LWP 70976)]
[Nuevo Thread 0x7fffe62bb6c0 (LWP 70977)]
Message: internal_create_surfaces(SDL2): Using: Renderer: opengl, Max_w: 16384, Max_h: 16384, Flags: 10, Formats: 8, SDL_PIXELFORMAT_RGB565
Message: dr_os_open(SDL2): SDL realized screen size width=704, height=560 (internal w=704, h=560)
Message: font_t::load_from_freetype: trying to load '/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf' in size 11
Message: simu_main(): .. results in disp_width=704, disp_height=560
Message: simu_main(): Loading colours from /home/yona/Games/simutrans-nigth/config/simuconf.tab

Thread 1 "simutrans" received signal SIGSEGV, Segmentation fault.
0x00005555556ddd18 in image_reader_t::read_node(_IO_FILE*, obj_node_info_t&) ()
(gdb) where
#0  0x00005555556ddd18 in image_reader_t::read_node(_IO_FILE*, obj_node_info_t&) ()
#1  0x000055555568b80e in pakset_manager_t::read_nodes(_IO_FILE*, obj_desc_t*&, int, unsigned int) ()
#2  0x000055555568b943 in pakset_manager_t::read_nodes(_IO_FILE*, obj_desc_t*&, int, unsigned int) ()
#3  0x000055555568be58 in pakset_manager_t::load_pak_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#4  0x00005555557a742c in gui_theme_t::themes_init(char const*, bool, bool) ()
#5  0x00005555559eb0bb in simu_main(int, char**) ()
#6  0x00005555559f37e0 in sysmain(int, char**) ()
#7  0x00007ffff742a1ca in __libc_start_call_main (main=main@entry=0x555555648750 <main>, argc=argc@entry=3,
    argv=argv@entry=0x7fffffffddf8) at ../sysdeps/nptl/libc_start_call_main.h:58
#8  0x00007ffff742a28b in __libc_start_main_impl (main=0x555555648750 <main>, argc=3, argv=0x7fffffffddf8,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdde8)
    at ../csu/libc-start.c:360
#9  0x00005555556487f5 in _start ()
(gdb)

QuoteWarning: loadsave_t::rd_open: File 'settings.xml' does not exist or is not accessible

The setting didn't exist because I had deleted the public directory of simutrans, however that made no difference and the bug is still there, settings.xml is no longer recreated because Simutrans crashes beforehand.


Edit.

Debugging my own Linux build with debug options enabled.

yona@pop-os:~/Proyect/simutrans$ gdb /home/yona/Games/simutrans-nigth/sim
GNU gdb (Ubuntu 15.1-1ubuntu1~24.04.1) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/yona/Games/simutrans-nigth/sim...
(No debugging symbols found in /home/yona/Games/simutrans-nigth/sim)
(gdb) run -debug 3
Starting program: /home/yona/Games/simutrans-nigth/sim -debug 3
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Simutrans version 124.5.1 Nightly from Jun  4 2026 r
Warning: loadsave_t::rd_open: File 'settings.xml' does not exist or is not accessible
Message: simu_main(): Parsing /home/yona/Games/simutrans-nigth/config/simuconf.tab
Message: simu_main(): Version:    124.5.1 Nightly  Date: Jun  4 2026
Message: simu_main(): Debuglevel:  3
Message: simu_main(): base_dir:    /home/yona/Games/simutrans-nigth/
Message: simu_main(): install_dir: /home/yona/simutrans/paksets/
Message: simu_main(): user_dir:    /home/yona/simutrans/
Message: simu_main(): locale:      es
Message: dr_os_init(SDL2): SDL Driver: x11
Message: SDL_StartTextInput:
Message: dr_query_screen_resolution(SDL2): screen resolution width=1366, height=768
Message: simu_main(): simgraph_init disp_width=704, disp_height=560, fullscreen=0
Message: dr_query_screen_resolution(SDL2): screen resolution width=1366, height=768
Message: dr_os_open(): Screen requested 704,560, available max 1366,768
Message: internal_create_surfaces(SDL2): Renderer: opengl, Max_w: 0, Max_h: 0, Flags: 14, Formats: 4, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888
Message: internal_create_surfaces(SDL2): Renderer: opengles2, Max_w: 0, Max_h: 0, Flags: 14, Formats: 4, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888
Message: internal_create_surfaces(SDL2): Renderer: software, Max_w: 0, Max_h: 0, Flags: 13, Formats: 8, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB565, SDL_PIXELFORMAT_RGB555
[Nuevo Thread 0x7fffe7fff6c0 (LWP 12683)]
[Nuevo Thread 0x7fffe77fe6c0 (LWP 12684)]
[Nuevo Thread 0x7fffe6ffd6c0 (LWP 12693)]
[Nuevo Thread 0x7fffe67fc6c0 (LWP 12694)]
[Thread 0x7fffe67fc6c0 (LWP 12694) terminado]
[Thread 0x7fffe6ffd6c0 (LWP 12693) terminado]
[Nuevo Thread 0x7fffe6ffd6c0 (LWP 12699)]
[Nuevo Thread 0x7fffe67fc6c0 (LWP 12700)]
Message: internal_create_surfaces(SDL2): Using: Renderer: opengl, Max_w: 16384, Max_h: 16384, Flags: 10, Formats: 8, SDL_PIXELFORMAT_RGB565
Message: dr_os_open(SDL2): SDL realized screen size width=704, height=560 (internal w=704, h=560)
Message: font_t::load_from_freetype: trying to load 'font/cyr.bdf' in size 11
Warning: font_t::load_from_freetype: Cannot set pixel size 11 for font/cyr.bdf
Message: simu_main(): .. results in disp_width=704, disp_height=560
Message: simu_main(): Loading colours from /home/yona/Games/simutrans-nigth/config/simuconf.tab

Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
0x00005555556e95b8 in image_reader_t::read_node(_IO_FILE*, obj_node_info_t&) ()
(gdb) where
#0  0x00005555556e95b8 in image_reader_t::read_node(_IO_FILE*, obj_node_info_t&) ()
#1  0x000055555569706e in pakset_manager_t::read_nodes(_IO_FILE*, obj_desc_t*&, int, unsigned int) ()
#2  0x00005555556971a3 in pakset_manager_t::read_nodes(_IO_FILE*, obj_desc_t*&, int, unsigned int) ()
#3  0x00005555556976b8 in pakset_manager_t::load_pak_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#4  0x00005555557c4ddc in gui_theme_t::themes_init(char const*, bool, bool) ()
#5  0x0000555555a07ec4 in simu_main(int, char**) ()
#6  0x0000555555a106e0 in sysmain(int, char**) ()
#7  0x00007ffff7a2a1ca in __libc_start_call_main (main=main@entry=0x555555653820 <main>, argc=argc@entry=3,
    argv=argv@entry=0x7fffffffdde8) at ../sysdeps/nptl/libc_start_call_main.h:58
#8  0x00007ffff7a2a28b in __libc_start_main_impl (main=0x555555653820 <main>, argc=3, argv=0x7fffffffdde8,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffddd8)
    at ../csu/libc-start.c:360
#9  0x0000555555653a75 in _start ()
(gdb)



prissi

No, one of the theme pak files is damaged, according to the function log since it occurred in "image_reader_t::read_node" called from "gui_theme_t::themes_init".

Easiest way to reinstall simutrans, or repak the theme in question. (and make sure the theme in your simuconf.tab exists.)

I first suspected the newly introduced obj_reader functions for decoding files. Broken pak files may have gone unnoticed before to some extend. But 124.5 checks the integrity of the paks more closely, and would fail with a fatal error message, si it can not be the cause.

Nazalassa

Making paks since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars | Pneumatic tubes | More pak64 vehicles and industries

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.

Yona-TYT

Quote from: prissi on Today at 11:35:57 AMNo, one of the theme pak files is damaged, according to the function log since it occurred in "image_reader_t::read_node" called from "gui_theme_t::themes_init".
I replaced my themes directory with the one offered by the compiled version from GitHub, and the problem persists.