News:

Beta test the new forum at https://simutrans.forum/
Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Crash when opening line

Started by michal., March 01, 2024, 05:18:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

michal.

Hi everyone,

After the recent commits, the game became a bit unstable. I've been able to create a reproducible crash:

1) open attached save: https://file.io/IH70MfsCL6F6
2) go to line management
3) search for line +Nareinon a .6z
4) click on line
5) game crashes

Tested with the latest nightly build.

And thank you everyone for all of the development work! The recent changes in GUI and particularly the display of loading ratios in the stop diagram is a superb addition to the game.

Ranran

It looks like the save file has been deleted

michal.

Hi,

I've up re-uploaded the save using the following websites:
https://anonymfile.com/W1brD/76708f.sve
https://filebin.net/uq0lor50ojgzqg92

Btw., I've noticed that the game crashes when clicking on the line's convoy schedule as well. It may be related to the line schedule containing waypoints that no longer exist due to landscaping.

jamespetts

I have managed to download this, but I am afraid that I cannot reproduce the crash with my locally built version.
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.

jamespetts

Further investigation shows that I can reproduce this crash after applying this pull request. Here is the backtrace, which points to the UI code as the immediate cause.

Thread 1 "simutrans-exten" received signal SIGSEGV, Segmentation fault.
grund_t::get_depot (this=0x0) at boden/grund.cc:1927
1927 return dynamic_cast<depot_t *>(first_obj());
(gdb) backtrace
#0  grund_t::get_depot (this=0x0) at boden/grund.cc:1927
#1  0x0000555555832964 in gui_line_waiting_status_t::init (this=this@entry=0x5555e60434d0)
    at gui/line_waiting_status.cc:328
#2  0x0000555555868cf7 in gui_line_waiting_status_t::set_line (line_=..., this=0x5555e60434d0)
    at gui/line_waiting_status.h:91
#3  schedule_list_gui_t::update_lineinfo (this=this@entry=0x5555e60428d0, new_line=...)
    at gui/schedule_list.cc:1136
#4  0x000055555586b065 in schedule_list_gui_t::action_triggered (this=0x5555e60428d0, comp=<optimised out>,
    v=...) at gui/schedule_list.cc:746
#5  0x0000555555776323 in gui_action_creator_t::call_listeners (v=..., this=0x5555e6045368)
    at gui/components/gui_action_creator.h:32
#6  gui_scrolled_list_t::infowin_event (this=0x5555e6045068, ev=<optimised out>)
    at gui/components/gui_scrolled_list.cc:236
#7  0x00005555557795b1 in gui_tab_panel_t::infowin_event (this=0x5555e6045f88, ev=0x7fffffff9de0)
    at gui/components/gui_tab_panel.cc:169
#8  0x000055555576052d in gui_container_t::infowin_event (this=this@entry=0x5555e6047b28,
    ev=ev@entry=0x7fffffff9e60) at gui/components/gui_container.cc:206
#9  0x00005555557ea227 in gui_frame_t::infowin_event (this=this@entry=0x5555e60428d0,
    ev=ev@entry=0x7fffffff9ef0) at gui/gui_frame.cc:135
#10 0x000055555586746e in schedule_list_gui_t::infowin_event (this=0x5555e60428d0, ev=0x7fffffff9ef0)
    at gui/schedule_list.cc:603
#11 0x000055555589e1fb in check_pos_win (ev=ev@entry=0x7fffffffa220) at gui/simwin.cc:1711
#12 0x0000555555a424a9 in interaction_t::process_event (this=this@entry=0x55556f6275b0, ev=...)
    at siminteraction.cc:369
#13 0x0000555555a42b5b in interaction_t::check_events (this=0x55556f6275b0) at siminteraction.cc:444
#14 0x0000555555aa4b26 in karte_t::sync_step (this=0x55557711aa20, delta_t=<optimised out>,
    do_sync_step=<optimised out>, display=display@entry=true) at simworld.cc:4348
#15 0x0000555555a42e45 in interrupt_check (caller_info=caller_info@entry=0x555555b7a875 "simworld.cc:10827")
    at simintr.cc:111
#16 0x0000555555abc71c in karte_t::interactive (this=this@entry=0x55557711aa20,
    quit_month=quit_month@entry=2147483647) at simworld.cc:10827
#17 0x0000555555a503e6 in simu_main (argc=argc@entry=1, argv=argv@entry=0x7fffffffe048) at simmain.cc:1705
#18 0x0000555555ac1ebd in sysmain (argc=1, argv=0x7fffffffe048) at sys/simsys.cc:1105
#19 0x0000555555b41e1f in main (argc=<optimised out>, argv=<optimised out>) at sys/simsys_s2.cc:1107
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.

jamespetts

Update: I believe that I have now found and fixed this crash, as well as merged the pull request. Thank you for the report.
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.

Ranran

@michal.
Thank you for your bug report.

@James
Thank you for identifying the problem and fixing it.

michal.

Hi,

thank you for the quick fix! However, the same game still crashes on other occasions.

1) open attached save: https://anonymfile.com/W1brD/76708f.sve / https://filebin.net/uq0lor50ojgzqg92
2) go to line management
3) search for line +Nareinon a .6z
4) click on line
5) click on any convoy
6) click on schedule button

7) game crashes

and

1-4) the same
5) click on "edit line" button
6) game crashes

(tested with current nightly)

jamespetts

Thank you for that - I have now pushed a fix for this. I should be grateful if you could re-test with the next nightly build. Thank you.
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.

michal.

Hello,

Thank you for the reply! Unfortunately, I don't think that the issue has been fixed.

When clicking on any of the line +Nareinon a .6z convoys, and then "schedule", the game still crashes.

The game no longer crashes when clicking "edit line". However, in the edit line dialog window, it crashes when I try to delete the invalid waypoint.

Anyway, I've started a new bug report as well, as I've found another problem :)

jamespetts

Quote from: michal. on March 13, 2024, 06:56:36 PMHello,

Thank you for the reply! Unfortunately, I don't think that the issue has been fixed.

When clicking on any of the line +Nareinon a .6z convoys, and then "schedule", the game still crashes.

The game no longer crashes when clicking "edit line". However, in the edit line dialog window, it crashes when I try to delete the invalid waypoint.

Anyway, I've started a new bug report as well, as I've found another problem :)
I am afraid that I cannot reproduce this. Can I check whether you have tested this with the latest nightly build? It may be that the fix to the other problem that you reported on the other thread and that Ranran fixed has solved this.
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.

jamespetts

Closed as issue cannot be reproduced.
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.