Author Topic: [SOLVED] Sudden crash around 200 turns  (Read 3666 times)

Offline jem7650

  • Newbie
  • *
  • Posts: 10
[SOLVED] Sudden crash around 200 turns
« on: January 07, 2019, 03:23:02 AM »
Is there any reason that after turn 200, the game crashes to my desktop. My moral is still going up and I have minerals and food.
« Last Edit: January 09, 2019, 09:05:03 PM by leeor_net »

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Sudden Crash Around 200 Turns
« Reply #1 on: January 07, 2019, 07:06:03 PM »
There are a thousand and one reasons. If you can provide a save game, I can investigate further. I haven't come across this yet so save games will make tracking down the issue much easier. :)

Offline jem7650

  • Newbie
  • *
  • Posts: 10
Re: Sudden Crash Around 200 Turns
« Reply #2 on: January 08, 2019, 03:55:54 AM »
This my saved game just before crash.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Sudden Crash Around 200 Turns
« Reply #3 on: January 08, 2019, 07:53:00 PM »
Excellent, this is very useful.

I tried running it through the current code base... and it doesn't crash at all. So I'm going to assume (for now) that whatever the issue you're experiencing now has already been corrected (the current code base corrects a lot of bugs and shitty code, still a WIP but definitely more stable).

Barring that, is there any action you're taking besides running another turn? Deploying a robot? Factory production? Clicking somewhere? Do you have any windows open while you're processing a new turn?

I need to get back into development again and start pushing updates out again. Now that the holidays are behind us I'll have more time and energy to devote to OPHD.
« Last Edit: January 09, 2019, 09:02:39 PM by leeor_net »

Offline jem7650

  • Newbie
  • *
  • Posts: 10
Re: Sudden Crash Around 200 Turns
« Reply #4 on: January 09, 2019, 03:13:06 AM »
I put a communication tower by the next mine. I put in a new mine and it crashed, then I tried it without the mine, still crashed.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Sudden Crash Around 200 Turns
« Reply #5 on: January 09, 2019, 09:01:03 PM »
Okay, I figured out the issue. Your robots are too old. In this case your digger. It 'dies' before it can be properly disposed of leading to an immediate crash... I never tested into the aging logic of robots so this has slipped by over time.

I have a fix implemented on my end which will be in the next release of OPHD. Good catch! :D


I attached an updated version of your save file with the robot age's reset to 0 so they'll be good for another 200 turns.
« Last Edit: January 09, 2019, 09:14:43 PM by leeor_net »

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: [SOLVED] Sudden crash around 200 turns
« Reply #6 on: January 09, 2019, 09:14:18 PM »
For anybody looking at a sudden crash around 200 turns or so, you can use the following method to update your save files to reset your robot's ages back to 0. It's purely a band-aid workaround that is fixed in the next release:

Open up your save game file in any text editor (notepad++ is my recommendation as it handles newlines properly). Look for similar lines near the very bottom of the file:

Code: [Select]
 <robot id="2" type="1" age="195" production="1" x="37" y="80" depth="4" direction="5" />

For each robot, change the field age="XXX" to age="0". Your ages may vary but this defect is related to improper handling of 'dead' robots. If this doesn't fix your crashing, please open up a new thread with as many details as you can provide to replicate your issue.



As a final aside, I split this thread into a new topic with an updated title.
« Last Edit: January 09, 2019, 09:17:11 PM by leeor_net »

Offline jem7650

  • Newbie
  • *
  • Posts: 10
Re: [SOLVED] Sudden crash around 200 turns
« Reply #7 on: January 10, 2019, 03:26:48 AM »
Thanks, I'll give that a try.

Offline jem7650

  • Newbie
  • *
  • Posts: 10
Re: [SOLVED] Sudden crash around 200 turns
« Reply #8 on: January 12, 2019, 03:26:47 AM »
Yes thar work, Thanks