News:

SimuTranslator
Make Simutrans speak your language.

Bug: Crash on start with segmentation fault

Started by cousjath, March 02, 2018, 12:29:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cousjath

When I try to start simutrans-extended, I am given the option of what pak to use, when I choose pak128-britain.Ex I get a segmentation fault:


./simutrans-extended
Use work dir /home/jonathan/Software/simutrans-ex/simutrans/
Reading low level config data ...
Parsed simuconf.tab for directory layout; multiuser = 1
Simutrans version 120.2.1 Extended Nightly development build 13.4 from Mar  2 2018 #61f000d
parse_simuconf() in program dir (config/simuconf.tab): Reading simuconf.tab successful!
SDL Driver: x11
Preparing display ...
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
modal_dialogue( sel, magic_none, NULL, empty_objfilename );
Pak found: Pak128.Britain-Ex/
parse_simuconf() in pak (Pak128.Britain-Ex/config/simuconf.tab): Reading simuconf.tab successful!
Reading compatibility sound data ...
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/aec-regent-3-ff3170.wav to sample 0.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/leyland-atlantean-ff3170.wav to sample 1.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/bus-volvo-ninebilly.wav to sample 2.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/lwalker-class-40.wav to sample 3.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/lwalker-br-4mt-tank.wav to sample 4.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/jessepash-switch.wav to sample 5.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/decembered-brakes.wav to sample 6.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/vickyleao1-digging.wav to sample 7.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/gavel.wav to sample 8.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/dock.wav to sample 9.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/ohrwurm-demolition.wav to sample 10.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/kermite607-coin.wav to sample 11.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/beaches.wav to sample 12.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/forest.wav to sample 13.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/Water.wav to sample 14.
could not load wav (Couldn't open /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/desert.wav)
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/tropic.wav to sample 15.
could not load wav (Couldn't open /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/mediterran.wav)
could not load wav (Couldn't open /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/temperate.wav)
could not load wav (Couldn't open /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/tundra.wav)
could not load wav (Couldn't open /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/rocky.wav)
could not load wav (Couldn't open /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/arctic.wav)
Loading BDF font 'font/cyr.bdf'
Reading city configuration ...
Reading electricity consumption configuration ...
Reading menu configuration ...
Reading object data from Pak128.Britain-Ex/...
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/laxspotter97-boeing747-400.wav to sample 16.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/androo4519-btu9613t.wav to sample 17.
Loaded /home/jonathan/Software/simutrans-ex/simutrans/Pak128.Britain-Ex/sound/laurie-gwr-railcar.wav to sample 18.
Segmentation fault (core dumped)


I have found a workaround, if I start it with -nosound this it works fine.

I am using the latest nightly on Ubuntu 17.10 Mate.

jamespetts

Thank you for your report: I am sorry that you are having trouble. Do you know how to use GDB? It would be helpful to have a backtrace of this crash so that I can investigate it further. It looks as though the problem relates to the sound system in some way.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

cousjath

Sorry for the late reply, I've had a try at using gbt and getting the backtrace and I get (using Extended Nightly development build 13.4 from Apr  4 2018 #8838b60):

#0  0x00007ffff74a2c88 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#1  0x00007ffff74a2e85 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#2  0x00007ffff74a33b7 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#3  0x00000000007c59da in ?? ()
#4  0x0000000000450e10 in ?? ()
#5  0x0000000000447447 in ?? ()
#6  0x0000000000449cae in ?? ()
#7  0x0000000000449d60 in ?? ()
#8  0x0000000000449e8f in ?? ()
#9  0x000000000044a50c in ?? ()
#10 0x00000000006ec84e in ?? ()
#11 0x0000000000701c77 in ?? ()
##12 0x00007ffff67cf1c1 in __libc_start_main (main=0x410040 <main>, argc=3, argv=0x7fffffffe078, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>,
    stack_end=0x7fffffffe068) at ../csu/libc-start.c:308



I tried to see if debugging symbols for libsdl are available but they are no longer in the repositories in Ubuntu.

DrSuperGood

Seems it is crashing inside SDL2? I think SDL2 is GPU accelerated (OpenGL) so maybe it is graphic driver related (this is a long shot so likely not the case)?

jamespetts

Are you able to compile Simutrans-Extended yourself so as to have debugging symbols? I suspect that a NULL or bad reference is being passed to an SDL function somewhere, but it would help me to know where.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

cousjath

I can confirm it is graphics driver related. I switched to the X.org driver (xserver-xorg-video-nouveau 1.0.15-2) and simutrans-extended starts. Sound works, but midi does not, in the sound settings it says Invalid MIDI index,

The driver that does not work with simutrans-extended is the NVidia driver (384.111). My graphics card is a GeForce GT 1030.

jamespetts

Interesting - thank you for letting me know. I am unsure whether this is a bug in the graphics driver, in SDL2 or in Simutrans, and, if the latter, whether it is specific to Simutrans-Extended, or is common with Simutrans-Standard.

In relation to that latter point, can you check whether this bug can be reproduced with Simutrans-Standard?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

cousjath

It does not occur when I use simutrans-standard 120.2.2. Checking the dependencies for standard and it uses libSDL1.2, whereas extended uses libSDL2.

I can confirm it is a bug in libSDL 2.0.6, I managed to download, build and install version 2.0.8 from source and extended starts successfully, although music fails to work.

jamespetts

Thank you for the confirmation - that is very helpful. I will have to look into upgrading the libSDL version on the build server.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.