The International Simutrans Forum

 

Author Topic: Becoming un-responsive on large maps  (Read 660 times)

0 Members and 1 Guest are viewing this topic.

Offline BoredEngineer

  • *
  • Posts: 9
Becoming un-responsive on large maps
« on: January 21, 2019, 01:46:54 PM »
Don't know if this is known issue.
Trying to run "complete" build for windows, version from last Friday. At some point during simulation application becomes unresponsive and doesn't recover. I've narrowed it down to somehow be a function of the map size. On maps of 100x200km game seams to be running fine. On larger maps, like latest was 1000x500km, game freezes after running for 10-15minutes (not measured). In all cases I'm using Britain128 pak and starting in mid 18th century.
Just saw that there is a newer build, will try it and just in case will move game out of the dropbox folder (no idea if that can be an issue). Using Windows 7.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18679
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Becoming un-responsive on large maps
« Reply #1 on: January 21, 2019, 01:57:35 PM »
Thank you for your report and Iam sorry that you are having trouble. Can you upload a saved game in which this issue can reliably be reproduced at a particular in-game time?

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #2 on: January 21, 2019, 03:41:13 PM »
I can definitely upload the save game but reproducing the issue is a problem. I was trying to note if there was a pattern to what I was doing at the time, but unfortunately I don't see one. It seams, that it happens only during simulation but can't be 100% sure. Saving frequently allowed to keep progressing in the game. I should have multiple save like this, on the same version of the game but on different maps, used them on two different PCs.

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #3 on: January 21, 2019, 04:43:01 PM »
Unfortunately only one PC still had saves from the large map:
https://www.dropbox.com/s/d97f0jvcqz62qc1/Huge%20Map%202.sve?dl=0

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #4 on: January 21, 2019, 04:58:54 PM »
Just tried the same save on latest version of the "complete". Got frozen at "Winter 1800 December 1:47:48/6:24:00". Run as Administrator and game folder moved out of dropbox.

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #5 on: January 21, 2019, 06:37:22 PM »
Running 2nd time as administrator and almost 5 years passed without a freeze. Not sure what made the difference, maybe saving when running as administrator and then loading from that save. Or the fact that now I'm mostly just waiting for my finances to recover and not building more things.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18679
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Becoming un-responsive on large maps
« Reply #6 on: January 21, 2019, 08:12:08 PM »
Thank you for letting me know - it is difficult to fix the problem when it is difficult to reproduce. May I ask - when it becomes unresponsive, what is the process's CPU usage?

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #7 on: January 21, 2019, 08:19:14 PM »
And got freeze again. But it looks like there is pattern - running simulation at a normal speed, not fast forward and while I'm constructing something or placing new lines. The other thing is date matches with the previous freeze: Winter 1806 December 5:00:04/6:24:00 [got confused, that is just range], so only month matches.
Thank you for letting me know - it is difficult to fix the problem when it is difficult to reproduce. May I ask - when it becomes unresponsive, what is the process's CPU usage?
After freeze. It's mostly staying at 0.4% and changes occasionally to 1-2%.
Here is how it looks like in performance monitor: https://www.dropbox.com/s/sb6tgtmai7eoim9/Simutrans_not_responding.JPG?dl=0
and it's taking almost 8 gigs of memory.
« Last Edit: January 21, 2019, 08:41:57 PM by BoredEngineer »

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #8 on: January 21, 2019, 09:52:14 PM »
Now it froze in May, so I don't think that December was relevant. Resource utilization is the same: 30 threads, 0.4% CPU on average.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18679
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Becoming un-responsive on large maps
« Reply #9 on: January 21, 2019, 10:00:51 PM »
I am running it now, not fast-forwarded, in an attempt to reproduce this issue, but have not had luck so far.

This seems consistent with a thread deadlock: indeterministic freezes with ~0% CPU utilisation in the frozen state. Unfortunately, these are very difficult sorts of errors to reproduce reliably, especially if only you are experiencing them (meaning that it is likely to be difficult for anyone else to reproduce them).

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #10 on: January 21, 2019, 10:23:37 PM »
Yes, I understand that, no worries. I'm just saving more often and do that during/after construction/line changes. Let me know if I can help somehow. If it would actually crash I could get a crash dump as I have VS installed.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18679
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Becoming un-responsive on large maps
« Reply #11 on: January 21, 2019, 10:28:04 PM »
That is very helpful, thank you.

It is difficult to suggest a specific way that you might help at this stage, but if you have an understanding of programming, any debugging assistance that you might be able to provide will be welcomed, although I cannot guarantee to be able to fix this issue given the difficulties involved and the fact that I only do this in my spare time.

Offline BoredEngineer

  • *
  • Posts: 9
Re: Becoming un-responsive on large maps
« Reply #12 on: January 21, 2019, 11:51:48 PM »
Sure. I can try to compile source on my machine and run it with debugging, maybe it's something specific to my hardware. I think I've seen a thread with some details on how to do this correctly.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18679
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Becoming un-responsive on large maps
« Reply #13 on: January 22, 2019, 12:01:50 AM »
Sure. I can try to compile source on my machine and run it with debugging, maybe it's something specific to my hardware. I think I've seen a thread with some details on how to do this correctly.

That would be helpful. If you can reproduce the freeze in debug mode, you should at least be able to unpick where the deadlock is occurring. Working out how to solve it may be an exercise in intellectual dexterity, but let us at least try to reproduce it first.

Thank you very much for your help with this: it is much appreciated.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18679
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Becoming un-responsive on large maps
« Reply #14 on: January 22, 2019, 12:12:45 AM »
Update: I have managed to get to January 1801 without any freezing, so I am afraid that I am not able to reproduce this. If you are able to do so and track down the source of the problem, that would be most helpful.