Author Topic: Overflow 2.42.9v  (Read 2524 times)

Offline Schigum

  • Bot Neophyte
  • *
  • Posts: 15
    • View Profile
Overflow 2.42.9v
« on: January 23, 2007, 11:11:17 AM »
Hi,
it happened, after I played around with mazes and then tried to load an other sim.
Overflow occured while loading.

EDIT:
Just realised the safe I've tried to load is defect, so it might be a problem caused by my pc while saving.

And the 5 latest auto-safes are damaged aswell. So it definitly got nothing to do with the mazes...
« Last Edit: January 23, 2007, 11:35:32 AM by Schigum »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Overflow 2.42.9v
« Reply #1 on: January 23, 2007, 12:19:09 PM »
Sweet!

Here's what's happening.  The root cause of the overflow is that a couple of bots in your sim have impossibly huge values of shell.  There is an unprotected, implicit Single-> Long assignment in the TakeVenom() routine which handles bots being hit by a venom shot.  It's gone undetected becuase the Long declaration is down in the miuddle of the routine.  So, it looks like a few of your bots got hit by a high nrg venom shot and this resulted in the assignment of an impossibly high value of shell becuase of the Single->Long assignment, eventially leading to the crash.  

Fixed in 2.42.9w.  I also added some parameter checking so broken values of .shell get fixed when you load a sim.  This should let you load your saves or the error.sim you posted (I'm running it fine right now) even if bots therein hae whacky shell values.

Buddy drop should be available shortly.
Many beers....