News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Segfault when trying to build a bridge by dragging

Started by Huitsi, May 24, 2022, 05:24:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Huitsi

Current Linux nightly (with Pak128.Britain-Ex) segfaults when I try to build a bridge by dragging. This seems to happen in any save – including the B-B-server and demo.sve – and affect all bridges. Building a bridge by clicking on a slope seems to work fine. Edit: The segfault seems to only happen when the dragging starts from a flat tile and hits another flat tile.

(gdb) backtrace
#0  0x00005555556b4d19 in weg_t::get_max_speed (this=0x0, needs_electrification=false) at /mnt/DATA/dev/simutrans-extended/boden/wege/weg.cc:149
#1  0x0000555555651652 in bridge_builder_t::is_blocked (pos=..., check_ribi=8 '\b', player=0x555562f2b110, error_msg=@0x7fffffffa580: 0x0)
    at /mnt/DATA/dev/simutrans-extended/bauer/brueckenbauer.cc:300
#2  0x00005555556521c4 in bridge_builder_t::find_end_pos (player=0x555562f2b110, pos=..., zv=..., desc=0x555559768d00, error_msg=@0x7fffffffa580: 0x0,
    bridge_height=@0x7fffffffa57f: 0 '\000', ai_bridge=false, min_length=1, high_bridge=false)
    at /mnt/DATA/dev/simutrans-extended/bauer/brueckenbauer.cc:476
#3  0x0000555555a9e1a8 in tool_build_bridge_t::is_valid_pos (this=0x5555597c62d0, player=0x555562f2b110, pos=..., error=@0x7fffffffa618: 0x0, start=...)
    at /mnt/DATA/dev/simutrans-extended/simtool.cc:3562
#4  0x0000555555a7b50e in two_click_tool_t::move (this=0x5555597c62d0, player=0x555562f2b110, buttonstate=1, pos=...)
    at /mnt/DATA/dev/simutrans-extended/simmenu.cc:1464
#5  0x0000555555a66e8c in interaction_t::move_cursor (this=0x55557db60520, ev=...) at /mnt/DATA/dev/simutrans-extended/siminteraction.cc:107
#6  0x0000555555a68220 in interaction_t::process_event (this=0x55557db60520, ev=...) at /mnt/DATA/dev/simutrans-extended/siminteraction.cc:417
#7  0x0000555555a682f2 in interaction_t::check_events (this=0x55557db60520) at /mnt/DATA/dev/simutrans-extended/siminteraction.cc:444
#8  0x0000555555ad728c in karte_t::sync_step (this=0x555581480960, delta_t=32, do_sync_step=true, display=true)
    at /mnt/DATA/dev/simutrans-extended/simworld.cc:4958
#9  0x0000555555a68755 in interrupt_check (caller_info=0x555555be36d0 "/mnt/DATA/dev/simutrans-extended/simworld.cc:5816")
    at /mnt/DATA/dev/simutrans-extended/simintr.cc:111
#10 0x0000555555ada320 in karte_t::step (this=0x555581480960) at /mnt/DATA/dev/simutrans-extended/simworld.cc:5816
#11 0x0000555555aeed55 in karte_t::interactive (this=0x555581480960, quit_month=2147483647) at /mnt/DATA/dev/simutrans-extended/simworld.cc:11470
#12 0x0000555555a75640 in simu_main (argc=1, argv=0x7fffffffdf48) at /mnt/DATA/dev/simutrans-extended/simmain.cc:1698
#13 0x0000555555a8c8b2 in sysmain (argc=1, argv=0x7fffffffdf48) at /mnt/DATA/dev/simutrans-extended/sys/simsys.cc:1102
#14 0x0000555555b98711 in main (argc=1, argv=0x7fffffffdf48) at /mnt/DATA/dev/simutrans-extended/sys/simsys_s2.cc:1017
(Thanks to Matthew for telling me how to provide a stacktrace.)

jamespetts

Thank you for the report - I believe that I have fixed this. I should be grateful if you could re-test with the next nightly build.

Huitsi

The segfault is indeed no longer happening, thanks!