News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Crash at (roughly) certain time

Started by Junna, August 08, 2016, 11:31:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Junna

Occasionally it runs longer before it crashes. Should definitely crash in may, however.

Running debug with MSVC:

Quote
'Simutrans-Experimental-debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mciseq.dll'. Symbols loaded.
First-chance exception at 0x0080C97C in Simutrans-Experimental-debug.exe: 0xC0000094: Integer division by zero.
Unhandled exception at 0x0080C97C in Simutrans-Experimental-debug.exe: 0xC0000094: Integer division by zero.

Quote1247:         // we can allow crossings or traffic lights here, since they will stop also oncoming traffic
  1248:         if(  ribi_t::ist_gerade(str->get_ribi())  ) {
0080C946 8B 4D 94             mov         ecx,dword ptr [str] 
  1246:     do {
  1247:         // we can allow crossings or traffic lights here, since they will stop also oncoming traffic
  1248:         if(  ribi_t::ist_gerade(str->get_ribi())  ) {
0080C949 E8 2B 87 BF FF       call        weg_t::get_ribi (0405079h) 
0080C94E 0F B6 D0             movzx       edx,al 
0080C951 52                   push        edx 
0080C952 E8 D4 C5 BF FF       call        ribi_t::ist_gerade (0408F2Bh) 
0080C957 83 C4 04             add         esp,4 
0080C95A 0F B6 C0             movzx       eax,al 
0080C95D 85 C0                test        eax,eax 
0080C95F 74 27                je          private_car_t::can_overtake+828h (080C988h) 
  1249:             time_overtaking -= (VEHICLE_STEPS_PER_TILE<<16) / kmh_to_speed(str->get_max_speed());
0080C961 8B 4D 94             mov         ecx,dword ptr [str] 
0080C964 E8 23 5B BF FF       call        weg_t::get_max_speed (040248Ch) 
0080C969 C1 E0 06             shl         eax,6 
0080C96C 99                   cdq 
0080C96D B9 05 00 00 00       mov         ecx,5 
0080C972 F7 F9                idiv        eax,ecx 
0080C974 8B C8                mov         ecx,eax 
0080C976 B8 00 00 00 01       mov         eax,1000000h 
0080C97B 99                   cdq 
Arrow here->0080C97C F7 F9                idiv        eax,ecx 
0080C97E 8B 55 BC             mov         edx,dword ptr [time_overtaking]   

Junna

Is it not possible to reproduce this or something?

zhaop

Hi Junna, I'm trying to reproduce your bug. Which version (branch name or commit) of Experimental are you running?

Also, it seems you posted the link twice, both only go to the save file.

I don't know how relevant this is to the exact bug you're experiencing, but my copy (devel-new 4c08333 (Aug 21), Pak128.Britain-Ex-0.9.2, on Mac) seems to crash even just loading the save file you posted. I suspect it's because I don't have the right paks that you have, or it could be a sign of something more sinister. Here's my stack trace from LLDB in case it might help.


* thread #1: tid = 0x8619d8, 0x000000010000ad7c simutrans-experimental`haus_tile_besch_t::get_besch(this=0x0000000000000000) const + 12 at haus_besch.h:54, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
  * frame #0: 0x000000010000ad7c simutrans-experimental`haus_tile_besch_t::get_besch(this=0x0000000000000000) const + 12 at haus_besch.h:54
    frame #1: 0x00000001000ca9d7 simutrans-experimental`gebaeude_t::rdwr(this=0x000000010cbce7a0, file=0x00007fff5fbfa8d8) + 5863 at gebaeude.cc:1316
    frame #2: 0x00000001003a56c7 simutrans-experimental`signalbox_t::rdwr(this=0x000000010cbce7a0, file=0x00007fff5fbfa8d8) + 39 at simsignalbox.cc:96
    frame #3: 0x00000001003a4e09 simutrans-experimental`signalbox_t::signalbox_t(this=0x000000010cbce7a0, file=0x00007fff5fbfa8d8) + 105 at simsignalbox.cc:29
    frame #4: 0x00000001003a4f6d simutrans-experimental`signalbox_t::signalbox_t(this=0x000000010cbce7a0, file=0x00007fff5fbfa8d8) + 29 at simsignalbox.cc:28
    frame #5: 0x0000000100088c4e simutrans-experimental`objlist_t::rdwr(this=0x000000012e72a550, file=0x00007fff5fbfa8d8, current_pos=(x = 766, y = 7, z = '?')) + 5134 at objlist.cc:916
    frame #6: 0x0000000100068247 simutrans-experimental`grund_t::rdwr(this=0x000000012e72a548, file=0x00007fff5fbfa8d8) + 7943 at grund.cc:455
    frame #7: 0x000000010006420d simutrans-experimental`boden_t::boden_t(this=0x000000012e72a548, file=0x00007fff5fbfa8d8, pos=(x = 766, y = 7)) + 125 at boden.cc:23
    frame #8: 0x00000001000644a3 simutrans-experimental`boden_t::boden_t(this=0x000000012e72a548, file=0x00007fff5fbfa8d8, pos=(x = 766, y = 7)) + 35 at boden.cc:22
    frame #9: 0x00000001003a1f2b simutrans-experimental`planquadrat_t::rdwr(this=0x000000011941cbb8, file=0x00007fff5fbfa8d8, pos=(x = 766, y = 7)) + 651 at simplan.cc:263
    frame #10: 0x0000000100406d49 simutrans-experimental`karte_t::load(this=0x0000000116a14000, file=0x00007fff5fbfa8d8) + 7161 at simworld.cc:7660
    frame #11: 0x0000000100404227 simutrans-experimental`karte_t::load(this=0x0000000116a14000, filename="save/dersxc.sve") + 2583 at simworld.cc:7208
    frame #12: 0x00000001001a1a09 simutrans-experimental`loadsave_frame_t::item_action(this=0x00000001183cf400, filename="save/dersxc.sve") + 57 at loadsave_frame.cc:95
    frame #13: 0x00000001001c2b90 simutrans-experimental`savegame_frame_t::action_triggered(this=0x00000001183cf400, component=0x00000001183cfe38, p=(p = 0x00007fff5fbfb130, i = 140734799786288)) + 1296 at savegame_frame.cc:573
    frame #14: 0x000000010011b52c simutrans-experimental`gui_action_creator_t::call_listeners(this=0x00000001183cfe38, v=(p = 0x00007fff5fbfb130, i = 140734799786288)) + 252 at gui_action_creator.h:36
    frame #15: 0x0000000100464d39 simutrans-experimental`gui_table_t::infowin_event(this=0x00000001183cfe20, ev=0x00007fff5fbfb218) + 153 at gui_table.cc:152
    frame #16: 0x000000010012e01c simutrans-experimental`gui_scrollpane_t::infowin_event(this=0x00000001183d0008, ev=0x00007fff5fbfb418) + 1388 at gui_scrollpane.cc:120
    frame #17: 0x0000000100120f9b simutrans-experimental`gui_container_t::infowin_event(this=0x00000001183cf408, ev=0x00007fff5fbfb640) + 3019 at gui_container.cc:198
    frame #18: 0x00000001001755f2 simutrans-experimental`gui_frame_t::infowin_event(this=0x00000001183cf400, ev=0x00007fff5fbfb840) + 546 at gui_frame.cc:149
    frame #19: 0x00000001001c25eb simutrans-experimental`savegame_frame_t::infowin_event(this=0x00000001183cf400, event=0x00007fff5fbfb840) + 251 at savegame_frame.cc:492
    frame #20: 0x0000000100207913 simutrans-experimental`check_pos_win(ev=0x00007fff5fbfbca0) + 4275 at simwin.cc:1427
    frame #21: 0x0000000100384325 simutrans-experimental`interaction_t::process_event(this=0x0000000102170200, ev=0x00007fff5fbfbca0) + 1029 at siminteraction.cc:367
    frame #22: 0x000000010038471b simutrans-experimental`interaction_t::check_events(this=0x0000000102170200) + 123 at siminteraction.cc:440
    frame #23: 0x000000010040cfc5 simutrans-experimental`karte_t::interactive(this=0x0000000116a14000, quit_month=2147483647) + 1109 at simworld.cc:9046
    frame #24: 0x000000010039149f simutrans-experimental`simu_main(argc=1, argv=0x00007fff5fbffb18) + 20127 at simmain.cc:1361
    frame #25: 0x00000001003a838d simutrans-experimental`sysmain(argc=1, argv=0x00007fff5fbffb18) + 173 at simsys.cc:804
    frame #26: 0x0000000100481782 simutrans-experimental`main(argc=1, argv=0x00007fff5fbffb18) + 34 at simsys_s2.cc:686
    frame #27: 0x00007fff9a0a35ad libdyld.dylib`start + 1
    frame #28: 0x00007fff9a0a35ad libdyld.dylib`start + 1


Specifically, after inspection of frame 1, it seems to crash on a mechanical-signalbox-intermediate at (x, y) = (766, 7). I suspect this is just the northernmost mechanical signalbox. More specifically, I found that hausbauer_t::find_tile(name = "mechanical-signalbox-intermediate", idx = 3) returns NULL, and hausbauer_t::get_besch(name = "mechanical-signalbox-intermediate") also returns NULL. My pak folder has a pak128.Britain-Ex-0.9.1/mechanical-signalbox-intermediate.pak though.
I'm working on an AI for Simutrans that can make lots of money, and I'm currently learning the squirrel API for AI players.
https://github.com/zhaop/simutrans/tree/marmot

jamespetts

My apologies: I missed this post for some reason.

I have downloaded your saved game, but I think that my copy of your version of my pakset is out of date, as it crashes on loading with the type of crash caused by incompatible paksets. As Zhaop noted, both of the download links point to the saved game.

Zhaop - thank you very much for looking into this. One thing that you need to know is that Junna uses a customised version of the pakset, and the saved games require that customised version to work, so the crash that you see may not be the crash that Junna has reported. Also, version 0.9.1 is the older version that goes with the 11.xx series of releases: the latest version of the pakset is 0.9.2, which is generally available only as sources at present.
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.

Junna

Oh, I messed up the links.

http://www.mediafire.com/download/axlh8k9dmei13lh/Pak128.Britain-Ex-0.9.2J.rar

Obviously as usual this is latest (or as of the posting the latest build, that is to say, of August 9).

jamespetts

I think that I have fixed the crash; would you mind re-testing?
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.

Junna

Some oddities result upon loading. Odd reservation things cause trains to get stuck (random incoherent single-tile and section reservations appear). The crash seems to have changed nature. It no longer causes closing and exception error, but instead



gives this at roughly the same time as before.

https://www.mediafire.com/?hi01v7jj08nj1oy

Should cash within short while of loading.

jamespetts

#8
Thank you for that. I think that I have also fixed the new crash; I should be grateful if you could re-test. Thank you.

Edit: I think that I have also now fixed the problem with station reservations not always clearing. You may need to clear them manually initially after loading before they will cease to cause problems afresh.
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.

Junna

That fixes the crash, but trying to sort out the stuck vehicles seem to cause a crash quite soon thereafter. A number of vehicles end up standing at signals which never clear, even though the lines are clear ahead. This applies particularly to single-track passing-loop sections such as the interurban tramway south of Fishwell. Vehicles stand waiting indefinately and does not start. Trying to fix this occasionally causes a crash.

jamespetts

Can you give me the steps needed to reproduce the crash reliably?
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.

Junna

Not sure about way to reproduce it easily yet. But the tram at Fishwell Folly Railway station (541,886) will refuse to move (reloading the same save game). This also applies to a couple of other vehicles elsewhere, but that one is a good example. I can't seem to get it to move, though its path is clear.

Junna


jamespetts

Thank you for that report. I think that I have fixed the crash; would you mind re-testing to confirm? I will need to look into the other issues in time.
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.

Junna

It no longer crashes at least. However, reservation oddities are at times persistent.

https://www.mediafire.com/?hljsuflpp4eskn5
Changed files for the pak, overwrite; I merely updated the signal boxes and signals, as changes were made to them.

https://www.mediafire.com/?8bbcw8892d2g0cb
Save game.

A reliable location for reproducing is Foxingchester (1239, 1218).

Here, removing the signals present, will allow the trains to depart the station. Doing so, will allow the trains to depart. Replace the signals, and the next trains on these services will be stuck. They will not be given clearance, though the path to the next signal is clear.

Edit: There appears to be general oddities with trains stopping. Some tiles are not respected; some trains do not stop at Foxingchester which ought to, and instead proceed immediately to the next. This happens all over the networks. Also happens more or less with all express trains at Longchester.

jamespetts

I have fixed a number of the reservation issues (although I was using my own saved game to test and fix rather than the one that you have supplied here). Are you able to confirm which issues are fixed and which remain? Thank you for testing and feedback.
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.

Junna

http://www.mediafire.com/download/i7fji7lkmpb7tmp/ways.rar

Ways, updated compile

http://www.mediafire.com/download/xpe9dm9k3sdbjip/ders527.sve

A few sites still have recurring reservation problems. The slow lines near Saltingford, Applechester also, and near Floxinghall Gold Street station. Some appear to have been resolved, however.

jamespetts

I am currently reviewing old bug reports and I notice that this one appears to have no reported resolution. May I ask whether this can still 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.