Author Topic: 2.41.0 bugs & things  (Read 2708 times)

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
2.41.0 bugs & things
« on: March 28, 2006, 09:51:29 AM »
FYI ...
the compiled version doesn't do an error.sim save.
yes ... I got an error overflow 6 ...
but don't know why.
wouldn't you know ...
haven't been able to get it to repeat since I recompiled
with the save error working!

in Form1 main ...
line 1002 needs to be uncommented before compiling the exe.

on error goto SaveError

I forget this almost every time! :angry:
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.41.0 bugs & things
« Reply #1 on: March 28, 2006, 10:51:31 AM »
Yea, forgot to uncomment the error.sim line in 2.41.0.  Sorry about that.  Have done so now in my fork and will be so in the next drop.

I'm working on a rather nasty overflow bug that might be yours.  Basically it's another case where an Integer location of the .mem array is getting overflowed when the result of some calculation using Longs or Singles gets assigned.  In this case, its the energy calculation and the overflow occurs when it goes way way negative (like less than -2^15!), not in the bot's own energy but when the refsysvars are getting set. Still working on the root cause and the "correct" fix, but if you just want to work around it, add these lines to the bottom of the VoluntaryForces() routine in Physics.bas (line 427).

Code: [Select]
If .nrg < 0 Then .nrg = 0
If .nrg >32000 Then .nrg = 32000  

Note this is just a bandaid.  It will prevent the crash (or at least this specific crash) and there's nothng wrong with leaving them in, but it doesn't address the root cause which has to do with one of the movement sysvars being set really high and negative somewhere up the call stack...  Still working on it...

-E
Many beers....

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
2.41.0 bugs & things
« Reply #2 on: March 28, 2006, 11:10:27 AM »
will keep it handy ...
still trying to reproduce the overflow I got ...
to see if it's something else.

thanks
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]