Author Topic: Making Saved Games Work  (Read 1580 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Making Saved Games Work
« on: September 14, 2009, 06:00:01 PM »
For those of you unaware of this problem, if you load a saved game and then attempt to look at the mission objectives list immediately afterward, OP2 crashes.  A few minutes ago, I found out (by accident) that saved games do in fact work right.  Sorta.  Basically, if you wait a mark or two before attempting to view the mission objectives, you're fine.

But this begs the question, why does this occur at all?  Further, why don't the original Dynamix missions suffer from this problem?  So I got to snooping.

At first, I thought it had something to do with updating the struct used for save data, so I tried to make a time trigger that fired every 10 ticks and changed something pointless in the save data struct.  That didn't work, so I'm guessing it has something to do with the mission objectives list itself.  That got me thinking that perhaps forcing OP2 to update the mission objectives upon loading a saved game might fix this nuisance.

Of course, I'm not sure how to do that, so my research ended.

But still, I'm happy that saved games aren't as buggy as we previously thought!

Anyways, to recap:
-Saved games only crash if you try to look at the mission objectives immediately after loading a saved game.
-To avoid this, wait a mark or two before attempting to view the mission objectives list.
-To eliminate this problem once and for all, we need to figure out a way to eliminate this delay.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Making Saved Games Work
« Reply #1 on: September 16, 2009, 12:57:22 AM »
Try to reproduce the crash with the simplest DLL code possible. Remove everything you can, and still get it to crash. Post the code, and the associated crash address.

Failing that, at least post the crash address.
 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Making Saved Games Work
« Reply #2 on: September 16, 2009, 07:12:42 AM »
I'll get that done as soon as I can.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials