Author Topic: Error when loading a saved game.  (Read 646 times)

Offline draconuszero

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
Error when loading a saved game.
« on: August 05, 2006, 07:24:30 PM »
I posted a msg in the yahoo groups about an error, but well the msg will take a while to be posted.  I figured i should ask here instead.  basically, when i load a certain saved file, i get this error:  http://img309.imageshack.us/my.php?image=gearheadv n4.jpg

I'm not sure why this is occuring.  I am using windows 2k on this comp  and playing the ascii version of gerahead 1 1.002.

If the screenshot doesn't help, here is the saved file:  http://www.yousendit.com/transfer.php?action=downl oad&ufid=E6C2AD4C6A7DF389

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
Error when loading a saved game.
« Reply #1 on: August 06, 2006, 03:36:00 AM »
Weird. The error is a stack overflow- this usually indicates an infinite loop of some kind.  I just tried it, and usually it takes an infinite loop a couple of seconds to work to a crash, but this time the crash happened almost automatically.

I don't understand how it's possible to have an infinite loop while reading a save file, anyhow, since the save file is of finite length and every iteration should move farther through it.  This save file isn't even particularly big, so it can't be a "legitimate" stack overflow either.

I'll get back to work on it, see what I can find out. BTW there's no reason to send me the save file by mail now, since I already have it. :)

Edit-
I've found the problem. Your save file is incomplete. I guess when you saved the game previously something interrupted the process. So, the saved game loader (which assumes everything is going to be perfect and doesn't have nearly enough error-checking code) was getting confused and reading "empty" lines over and over again looking for the sentinel value.

I can't see any way to repair this save file because of all the data loss at the end. I tried adding a bunch of sentinels at the end to force a load but the resulting file still doesn't work. Apparently, something important (possibly the definition of the scene the PC is currently in) is included in the missing data.

Error checking code has been added to the saved game loader.

Offline draconuszero

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
Error when loading a saved game.
« Reply #2 on: August 06, 2006, 05:57:06 AM »
I see...  Oh well, I think I have a back-up save somewhere, so I can still use my character.  Thanks for replying!