News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Error with toolbar?

Started by Yona-TYT, January 05, 2017, 08:04:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

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

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

Dwachs

Parsley, sage, rosemary, and maggikraut.

Yona-TYT

It is difficult to reproduce, try loading the scenario several times and selecting the rails tool in chapter 3 of the scenario.

An_dz

#3
1  0x082fc476 in two_click_tool_t::init (this=0xb4ccb70) at simmenu.cc:930
Seems like a problem with double-clicking the tool. It's failing in the cleanup() call.

Ters

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.

Dwachs

I cannot reproduce this.

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

Yona-TYT

Quote from: Dwachs on January 06, 2017, 07:24:01 PM
I cannot reproduce this.

@Yona: does the script builds ways itself?

No, but I suspect it may be a problem with the "set_all_rules (pl)" function





This continues to give me problems.  :o


(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 ...
[New Thread 0xb72ddb40 (LWP 2640)]
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_colours() at config/simuconf.tab: 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 0xb2260b40 (LWP 2642)]
[Thread 0xb2260b40 (LWP 2642) exited]
[New Thread 0xb2260b40 (LWP 2643)]
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 (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
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.
expose: x=1440, y=825
textur_resize()::screen=0x84fa720
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 (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
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 (Mix_LoadWAV_RW with NULL src)
Reading menu configuration ...
Reading midi data ...
  Reading MIDI file '/home/yona/Descargas/simutrans/music/01-Simutrans-Main-Theme.mid' - Main Theme
  Reading MIDI file '/home/yona/Descargas/simutrans/music/02-Gotta-catch-that-train.mid' - Gotta catch that train
  Reading MIDI file '/home/yona/Descargas/simutrans/music/03-Sunday-drivers.mid' - Sunday drivers
  Reading MIDI file '/home/yona/Descargas/simutrans/music/04-Simutrans-B-Theme.mid' - Simutrans B Theme
  Reading MIDI file '/home/yona/Descargas/simutrans/music/05-Boring-afternoon.mid' - Boring Afternoon
  Reading MIDI file '/home/yona/Descargas/simutrans/music/06-A-busy-day-at-the-depot.mid' - A busy day at the depot
  Reading MIDI file '/home/yona/Descargas/simutrans/music/07-Transport-chaos.mid' - Transport Chaos
  Reading MIDI file '/home/yona/Descargas/simutrans/music/08-The-journey-home.mid' - The Journey Home
  Reading MIDI file '/home/yona/Descargas/simutrans/music/09-Simupolitan-Swing.mid' - simupolitan swing
  Reading MIDI file '/home/yona/Descargas/simutrans/music/10-Easy-driving.mid' - easy driving
  Reading MIDI file '/home/yona/Descargas/simutrans/music/11-Stucked-Convoi.mid' - stucked convoi
  Reading MIDI file '/home/yona/Descargas/simutrans/music/12-Steamin-across-the-prairies.mid' - Steamin' across the prairies
  Reading MIDI file '/home/yona/Descargas/simutrans/music/13-Stephenson-blues.mid' - Stephenson blues
  Reading MIDI file '/home/yona/Descargas/simutrans/music/14-Last-journey-of-the-Niagara.mid' - Last journey of the Niagara
  Reading MIDI file '/home/yona/Descargas/simutrans/music/15-The-Wayside-Blues.mid' - The Wayside Blues
  Reading MIDI file '/home/yona/Descargas/simutrans/music/16-Midnight-Express2.mid' - Midnight Express2
  Reading MIDI file '/home/yona/Descargas/simutrans/music/17-The-Benevolent-Dictators-March.mid' - The Benevolent Dictators March
  Reading MIDI file '/home/yona/Descargas/simutrans/music/18-Ride-that-train.mid' - Ride that train
  Reading MIDI file '/home/yona/Descargas/simutrans/music/19-Rockin-trucker.mid' - Rockin` trucker
  Reading MIDI file '/home/yona/Descargas/simutrans/music/20-Last-Trip.mid' - Last Trip
  Reading MIDI file '/home/yona/Descargas/simutrans/music/21-Dusty-Eyes.mid' - Dusty Eyes
  Reading MIDI file '/home/yona/Descargas/simutrans/music/22-Variable-Journeys.mid' - Variable Journeys
  Reading MIDI file '/home/yona/Descargas/simutrans/music/23-Something-for-Silver-Sand.mid' - Something for Silver Sand
  Reading MIDI file '/home/yona/Descargas/simutrans/music/24-needlessly-striking.mid' - needlessly striking
  Reading MIDI file '/home/yona/Descargas/simutrans/music/25-Float-on-by.mid' - Float on by
  Reading MIDI file '/home/yona/Descargas/simutrans/music/26-Tantalizingly-Unusual.mid' - Tantalizingly Unusual
  Reading MIDI file '/home/yona/Descargas/simutrans/music/27-March-Winds.mid' - March Winds
  Reading MIDI file '/home/yona/Descargas/simutrans/music/28-Road-to-Warm-Places.mid' - Road to Warm Places
  Reading MIDI file '/home/yona/Descargas/simutrans/music/29-Runaway.mid' - Runaway
  Reading MIDI file '/home/yona/Descargas/simutrans/music/30-On-the-waterfront.mid' - On the waterfront
  Reading MIDI file '/home/yona/Descargas/simutrans/music/31-Courtenay-Bridge.mid' - Courtenay Bridge
  Reading MIDI file '/home/yona/Descargas/simutrans/music/32-incidental-skies.mid' - incidental skies
  Reading MIDI file '/home/yona/Descargas/simutrans/music/33-Journey-to-times-gone-by.mid' - Journey to times gone by
  Reading MIDI file '/home/yona/Descargas/simutrans/music/34-flyingaway.mid' - flying away
  Reading MIDI file '/home/yona/Descargas/simutrans/music/35-deep-ride.mid' - deep ride
  Reading MIDI file '/home/yona/Descargas/simutrans/music/36-faded-things.mid' - faded things
  Reading MIDI file '/home/yona/Descargas/simutrans/music/37-inevitably-engrossed.mid' - inevitably engrossed
  Reading MIDI file '/home/yona/Descargas/simutrans/music/38-positive-thrill.mid' - positive thrill
  Reading MIDI file '/home/yona/Descargas/simutrans/music/39-bangin-mover.mid' - bangin mover
  Reading MIDI file '/home/yona/Descargas/simutrans/music/40-alternative.mid' - alternative
  Reading MIDI file '/home/yona/Descargas/simutrans/music/41-Libertador.mid' - Libertador
  Reading MIDI file '/home/yona/Descargas/simutrans/music/42-Stranger-Echoes.mid' - Stranger Echoes (Multitrack slow)
Midi disabled ...
Calculating textures ...done
[New Thread 0xac9dfb40 (LWP 2644)]
[New Thread 0xac1deb40 (LWP 2645)]
[New Thread 0xab9ddb40 (LWP 2646)]
Creating cities ...
Creating cities: 1
Creating factories ...
Distributing 1 tourist attractions ...
Preparing startup ...
Loading BDF font 'cyr.bdf'
Show banner ...
[New Thread 0xa97f8b40 (LWP 2647)]
[New Thread 0xa8ff7b40 (LWP 2648)]
[New Thread 0xa87f6b40 (LWP 2649)]
Running world, pause=0, fast forward=0 ...
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2650)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2650) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2654)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2654) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2663)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2663) exited]
[New Thread 0xa7ef4b40 (LWP 2667)]
[Thread 0xa7ef4b40 (LWP 2667) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2673)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2673) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2679)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2679) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2683)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2683) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2730)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2730) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2731)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2731) exited]
set_zoom_factor() : set 4 (3/4)
set_zoom_factor() : set 5 (5/8)
set_zoom_factor() : set 6 (1/2)
set_zoom_factor() : set 7 (3/8)
set_zoom_factor() : set 6 (1/2)
set_zoom_factor() : set 5 (5/8)
set_zoom_factor() : set 4 (3/4)
set_zoom_factor() : set 3 (1/1)
set_zoom_factor() : set 4 (3/4)
set_zoom_factor() : set 5 (5/8)
set_zoom_factor() : set 4 (3/4)
set_zoom_factor() : set 3 (1/1)
set_zoom_factor() : set 2 (4/3)
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2761)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2761) exited]
World destroyed.
[New Thread 0xa7ef4b40 (LWP 2796)]
script engine started.
[Thread 0xa7ef4b40 (LWP 2796) exited]

Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
0x082789ea in two_click_tool_t::cleanup (this=0xb458ee0,
    delete_start_marker=true) at simmenu.cc:1084
1084    simmenu.cc: No such file or directory.
Missing separate debuginfos, use: dnf debuginfo-install SDL_mixer-1.2.12-11.fc24.i686 libmikmod-3.3.8-2.fc24.i686 libuuid-2.28.2-1.fc24.i686
(gdb) where
#0  0x082789ea in two_click_tool_t::cleanup (this=0xb458ee0,
    delete_start_marker=true) at simmenu.cc:1084
#1  0x08278aa1 in two_click_tool_t::init (this=0xb458ee0) at simmenu.cc:930
#2  0x0828cdcb in tool_build_way_t::init (this=0xb458ee0, player=0x226b64a8)
    at simtool.cc:2280
#3  0x082a46ff in karte_t::local_set_tool (this=0x20e2cb60, tool_in=0xb458ee0,
    player=0x226b64a8) at simworld.cc:3029
#4  0x082a491d in karte_t::set_tool (this=0x20e2cb60, tool_in=0xb458ee0,
    player=0x226b64a8) at simworld.cc:3014
#5  0x081813a6 in tool_selector_t::infowin_event (this=0x20ea3428,
    ev=0xbfffd380) at gui/tool_selector.cc:124
#6  0x08179002 in check_pos_win (ev=0xbfffd590) at gui/simwin.cc:1430
#7  0x0826d6a5 in interaction_t::process_event (this=0x20704050, ev=...)
    at siminteraction.cc:366
#8  0x0826dc39 in interaction_t::check_events (this=0x20704050)
    at siminteraction.cc:439
#9  0x082bb2f2 in karte_t::interactive (this=0x20e2cb60, quit_month=2147483647)
    at simworld.cc:6574
#10 0x08274d11 in simu_main (argc=1, argv=0xbffff0f4) at simmain.cc:1342
#11 0x08283893 in sysmain (argc=1, argv=0xbffff0f4) at simsys.cc:827
#12 0x0804ff62 in main (argc=1, argv=0xbffff0f4) at simsys_s.cc:729
(gdb)



Capture:


Dwachs

The crash happens since the build marker (the bulldozer) is deleted at the wrong time. Did you place the bulldozer before the crash? Does the crash occur just from loading the scenario again and again?

Can you upload a savegame that can be loaded to trigger the crash?
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on April 02, 2017, 05:30:03 PM
The crash happens since the build marker (the bulldozer) is deleted at the wrong time. Did you place the bulldozer before the crash? Does the crash occur just from loading the scenario again and again?

Can you upload a savegame that can be loaded to trigger the crash?
The error occurred after loading a savegame (I had done it several times) and when selecting the rails tool (by the way my mouse has a problem, sometimes double click).

Scenario: Tutorial-v3.0.01-beta.zip (The error occurred in chapter 3 / step F)

Savegame: tutorial2.sve

Dwachs

#9
Now I could reproduce this: place a way-builder bulldozer and load a savegame. Selecting the same way-building tool as before gives crash.

Edit: should be fixed in r8182
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on April 04, 2017, 08:21:34 PM
Now I could reproduce this: place a way-builder bulldozer and load a savegame. Selecting the same way-building tool as before gives crash.

Edit: should be fixed in r8182
Yes, I think that's the error.

Yona-TYT

You can move this topic.  ;)