Author Topic: Error with toolbar?  (Read 380 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

Error with toolbar?
« on: January 05, 2017, 08:04:53 PM »
I am working on the tutorial, but sometimes simutrans is closed just after selecting a tool.

Scenario: http://www.mediafire.com/file/aj9glchy96jpjm3/Tutorial-v2.0.5.zip
Code: [Select]
(gdb) run
Starting program: /home/yona/Descargas/simutrans/sim
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Use work dir /home/yona/Descargas/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
SDL_driver=x11, hw_available=0, video_mem=0, blit_sw=0, bpp=32, bytes=4
Screen Flags: requested=10, actual=10
dr_os_open(SDL): SDL realized screen size width=704, height=560 (requested w=704, h=560)
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
parse_simuconf() at pak128/config/simuconf.tab:
Reading simuconf.tab successful!
warning: the debug information found in "/usr/lib/debug//usr/lib/libuuid.so.1.3.0.debug" does not match "/usr/lib/libuuid.so.1" (CRC mismatch).

[New Thread 0xb2f24b40 (LWP 2751)]
[Thread 0xb2f24b40 (LWP 2751) exited]
[New Thread 0xb2f24b40 (LWP 2752)]
Reading compatibility sound data ...
Loaded /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel-1.wav to sample 0.
Loaded /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel_d.wav to sample 1.
Loaded /home/yona/Descargas/simutrans/pak128/sound/train-horn-diesel-0.wav to sample 2.
Loaded /home/yona/Descargas/simutrans/pak128/sound/train-horn-steam-0.wav to sample 3.
Loaded /home/yona/Descargas/simutrans/pak128/sound/click.wav to sample 4.
Loaded /home/yona/Descargas/simutrans/pak128/sound/boing.wav to sample 5.
Loaded /home/yona/Descargas/simutrans/pak128/sound/jackhammer.wav to sample 6.
Loaded /home/yona/Descargas/simutrans/pak128/sound/gavel.wav to sample 7.
Loaded /home/yona/Descargas/simutrans/pak128/sound/dock.wav to sample 8.
Loaded /home/yona/Descargas/simutrans/pak128/sound/explosion.wav to sample 9.
Loaded /home/yona/Descargas/simutrans/pak128/sound/cash.wav to sample 10.
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/beaches.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/forest.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/Water.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/desert.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/tropic.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/mediterran.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/temperate.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/tundra.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/rocky.wav)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/arctic.wav)
Loading BDF font 'cyr.bdf'
Reading city configuration ...
Reading speedbonus configuration ...
Reading menu configuration ...
Reading object data from pak128/...
Loaded /home/yona/Descargas/simutrans/pak128/sound/train-horn-steam-1.wav to sample 11.
Loaded /home/yona/Descargas/simutrans/pak128/sound/ship-horn_a.wav to sample 12.
Loaded /home/yona/Descargas/simutrans/pak128/sound/ship-horn_b.wav to sample 13.
Loaded /home/yona/Descargas/simutrans/pak128/sound/train-horn-electric-0.wav to sample 14.
Loaded /home/yona/Descargas/simutrans/pak128/sound/engine-start-petrol-2.wav to sample 15.
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel_0)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel_0)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel_0)
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel_0)
Loaded /home/yona/Descargas/simutrans/pak128/sound/engine-start-petrol-1.wav to sample 16.
Loaded /home/yona/Descargas/simutrans/pak128/sound/engine-start-diesel-0.wav to sample 17.
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak128/sound/truck.wav)
expose: x=1440, y=825
textur_resize()::screen=0x8595d50
Reading menu configuration ...
Midi disabled ...
Calculating textures ...done
World destroyed.
script engine started.
Loading BDF font 'cyr.bdf'
Running world, pause=0, fast forward=0 ...
World destroyed.
script engine started.
World destroyed.
script engine started.
set_zoom_factor() : set 4 (3/4)
set_zoom_factor() : set 5 (5/8)
set_zoom_factor() : set 6 (1/2)
World destroyed.
script engine started.

Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
0x0970e84e in ?? ()
(gdb) where
#0  0x0970e84e in ?? ()
#1  0x082fc476 in two_click_tool_t::init (this=0xb4ccb70) at simmenu.cc:930
#2  0x0831155a in tool_build_way_t::init (this=0xb4ccb70, player=0x227041d0)
    at simtool.cc:2277
#3  0x08335e26 in karte_t::local_set_tool (this=0x20ead9e8, tool_in=0xb4ccb70,
    player=0x227041d0) at simworld.cc:3027
#4  0x08335d43 in karte_t::set_tool (this=0x20ead9e8, tool_in=0xb4ccb70,
    player=0x227041d0) at simworld.cc:3012
#5  0x081b58fa in tool_selector_t::infowin_event (this=0x2112c368,
    ev=0xbfffd234) at gui/tool_selector.cc:124
#6  0x081ac3ff in check_pos_win (ev=0xbfffd470) at gui/simwin.cc:1425
#7  0x082ef9a6 in interaction_t::process_event (this=0xfca8d38, ev=...)
    at siminteraction.cc:360
#8  0x082efd1c in interaction_t::check_events (this=0xfca8d38)
    at siminteraction.cc:433
#9  0x083448e6 in karte_t::interactive (this=0x20ead9e8, quit_month=2147483647)
    at simworld.cc:6562
#10 0x082f864f in simu_main (argc=1, argv=0xbffff0f4) at simmain.cc:1320
#11 0x08307802 in sysmain (argc=1, argv=0xbffff0f4) at simsys.cc:826
#12 0x083669dc in main (argc=1, argv=0xbffff0f4) at simsys_s.cc:729
(gdb)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4067
  • Total likes: 98
  • Helpful: 146
  • Languages: EN, DE, AT
Re: Error with toolbar?
« Reply #1 on: January 06, 2017, 09:44:37 AM »
How can this be reproduced?
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: Error with toolbar?
« Reply #2 on: January 06, 2017, 12:32:23 PM »
It is difficult to reproduce, try loading the scenario several times and selecting the rails tool in chapter 3 of the scenario.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2436
  • Total likes: 221
  • Helpful: 85
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Error with toolbar?
« Reply #3 on: January 06, 2017, 01:00:29 PM »
Code: [Select]
1  0x082fc476 in two_click_tool_t::init (this=0xb4ccb70) at simmenu.cc:930Seems like a problem with double-clicking the tool. It's failing in the cleanup() call.
« Last Edit: January 07, 2017, 04:23:14 AM by An_dz »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4451
  • Total likes: 141
  • Helpful: 105
  • Languages: EN, NO
Re: Error with toolbar?
« Reply #4 on: January 06, 2017, 03:54:04 PM »
It seems that cleanup's stack frame is the active one, but it is clearly not cleanup's code that was executing when it segfaulted. I can think of two things that can cause this. One is an overwritten return address in one of the functions called by cleanup, but since the rest of the stack has not been corrupted, this seems less likely. The other is that cleanup has called a virtual function on a corrupted/invalid pointer.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4067
  • Total likes: 98
  • Helpful: 146
  • Languages: EN, DE, AT
Re: Error with toolbar?
« Reply #5 on: January 06, 2017, 07:24:01 PM »
I cannot reproduce this.

@Yona: does the script builds ways itself?
Parsley, sage, rosemary, and maggikraut.