Author Topic: Investigating Why Saved Games Crash  (Read 1733 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3237
Investigating Why Saved Games Crash
« on: February 07, 2010, 10:42:45 AM »
Okay, we've had this problem for a long time, and for the most part we've just developed work-arounds and told people to deal with it.  I think it's time we look into why saved games crash when you try to read the mission objectives.  Dynamix missions do not have this problem, so it's clearly a problem with our missions and not OP2.

The problem is, how are we going to do this?  We'll need to find the cause of the problem and then develop a method to fix it.

So, who wants to help?  I think the first phase will involve intentionally crashing OP2 and getting as much info about the crash as possible.
"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 CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Investigating Why Saved Games Crash
« Reply #1 on: February 07, 2010, 01:09:24 PM »
Personally, I think it should start with duplicating a campeign mission to see if the problem still happens.  If it doesn't, then it's a simple matter of a missing line of code.  If it does, then you know...umm...something
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Investigating Why Saved Games Crash
« Reply #2 on: February 07, 2010, 05:28:32 PM »
Yes, actually, a crash address would be very helpful. Also some source code that leads to the problem would also be good. If you can duplicate this behavior reliably, and trim down the code as much as possible until you get to the bare minimum that still causes the crash, then hopefully it won't be too hard to figure out.


I would certainly be willing to look into this, but I would appreciate the above starting information.
 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3237
Investigating Why Saved Games Crash
« Reply #3 on: February 07, 2010, 06:50:00 PM »
Ask and you shall receive.

Quote
AppName: outpost2.exe  AppVer: 1.3.0.4  ModName: outpost2.exe
ModVer: 1.3.0.4  Offset: 000c68a2

Test mission attached (DLL + source).

I should note that I haven't been able to get this level to load the objectives without crashing after saving/reloading, despite waiting 50 marks...

Anyways, the DLL just has two triggers (a Resource Trigger and a Time Trigger), both of which are kept track of in a save data struct.  There are also some toys for the player to have fun with.
"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