Author Topic: Corupted saves. - RESOLVED 2.43.1k  (Read 3923 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« on: March 07, 2008, 11:51:17 AM »
I get a bunch of error messages when trying to load these saves. Maybe you can take a look at them. Lost my sim and have to start over.  
« Last Edit: May 01, 2008, 01:06:32 PM by EricL »
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #1 on: April 09, 2008, 09:36:23 AM »
Bump! I got this problem AGAIN!!! Lost all my saves! This time in version 2.43.1h. The error message is "Invalid procedure call or argument Darwinbots 5 0." If I try to close DB I get another error message. I suspect it might be too many mutations in the sim that is causing it.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #2 on: April 09, 2008, 01:30:02 PM »
I think Eric is on vacation at the moment, so don't want you to feel too abandoned

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #3 on: April 09, 2008, 03:50:34 PM »
Ok, thanks.    Well, I think I should save without mutations from now on. The save was very slow to load before the crash. Too bad cause I had some nice stable replicators.    I think zerobots that start replicating between long intervals producing very small offspring are usually the best ones in the beginning, not wasting too much energy.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #4 on: April 14, 2008, 01:21:07 AM »
Been investigating this.  The problem in the two sims in the first post is the same.  The sim file thinks there are 496 bots in it, but in fact there are only 495.  The program crashes attempting to read in and load a 496th bot when in fact it is reading in a bunch of sim-level properties and trying to shoe horn those into a bot structure.  Specifcally, the crash is an attempt to allocate a negative length string.   I have no idea what caused this but it's most likely on the save side.  The fact that it's the last bot in the file is very suspicious.   A reading of the code does not offer an obvious off-by-one problem but that is probably what it is.  I'm pretty confident it has nothing to do with saving with or without mutations.

I can resurrect these sims if you like.  Let me know.

The third sim is a similar problem although it occurs on bot 1742 out of 1934 bots.    It takes forever to load and save due to all the mutation details, but what is there appears to be formatted correctly.  I do not know if I can resurrect this sim or not (only the first 1742 bots in any case) but probably I can with some work if it's important.  Let me know.  

It does not appear that any of the files are truncated.  Namely, it appears there is a real problem here somewhere with saving the right number of bots though I have no idea what it is at the moment.   The corruption does not appear to be a function of killing the program or Windows rebotting during a save or exit or similar.

I'll continue to investigate.  Ideas welcome.


Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #5 on: April 14, 2008, 03:45:12 AM »
No need to resurrect the sims as I'm running a new evosim right now. Ok, I've been wondering if it could be my antimalware program that checks the memory every 10th second for bad code, which I suspect have caused corruption in game saves on occasion. I'll have it turned off when I save a sim from now on and see if it happens again, also I save without mutations too. Maybe when it gets very much data with both mutation history and lots of bots it might be a little too much for the program. I'll let you know if it happens again.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #6 on: April 14, 2008, 10:15:20 AM »
Quote from: Testlund
I've been wondering if it could be my antimalware program that checks the memory every 10th second for bad code, which I suspect have caused corruption in game saves on occasion.
I would love it to be something like this but that fact that you had two independent saves exhibit the exact same problem in the exact same place is pretty strong evidence its in the DB code somewhere and not an external cause.  I'll keep at it...

Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Corupted saves. - RESOLVED 2.43.1k
« Reply #7 on: May 01, 2008, 01:07:47 PM »
Implicit Long->Single cast in the Bot load routine regarding mutation details length.  Fixed in 2.43.1k
Many beers....