Author Topic: Poison bug.  (Read 13203 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Poison bug.
« Reply #15 on: November 01, 2005, 10:31:46 AM »
That's what I mean.

The line that you added from my other (possibly related) fix was for a specific bug regarding a value of >32000 being sent to the "Createshot" routine from "Releasebod". It may be related to this one in some way but I wouldn't recomend adding that line into this routine as it could limit power too much.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Poison bug.
« Reply #16 on: November 01, 2005, 10:33:28 AM »
Hmm... That's a little confusing. So that was just some temporary fix, or what? Should I remove it?
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Poison bug.
« Reply #17 on: November 01, 2005, 10:36:44 AM »
Change it to 32000 instead of 8000 perhaps.

And set a floor of 0 on it in much the same way.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Poison bug.
« Reply #18 on: November 01, 2005, 10:44:25 AM »
Could you be more specific what you mean with 'floor'?   :)
The internet is corrupt and controlled by criminally minded people.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Poison bug.
« Reply #19 on: November 01, 2005, 10:45:17 AM »
Quote
Hmm... That's a little confusing. So that was just some temporary fix, or what? Should I remove it?
No it wasn't a temporary fix.

It was a specific fix designed for the releasebod routine. It is not valid in the releasenrg routine as, despite the similarities, they do slightly different things with slightly different parameters.

Num's suggestion would work however. Set a ceiling of 32000 and a floor of 0 for power. It certainly won't hurt and may even help.

Then again the real issue could be somewhere else completely and may not even be in this module. All we know is that poison is getting too big. We don't know why yet so applying a fix is somewhat premature.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Poison bug.
« Reply #20 on: November 01, 2005, 10:46:35 AM »
Quote
Could you be more specific what you mean with 'floor'?   :)
Ceiling = upper limit

Floor = lower limit.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Poison bug.
« Reply #21 on: November 01, 2005, 10:48:54 AM »
You mean like this:

If power > 32000 Then power = 0

If that's wrong you need to tell me exactly what to type. I'm no coder.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Poison bug.
« Reply #22 on: November 01, 2005, 10:51:06 AM »
If power > 32000 then power = 32000
if power < 0 then power = 0

Like that.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Poison bug.
« Reply #23 on: November 01, 2005, 10:52:47 AM »
Quote
If that's wrong you need to tell me exactly what to type. I'm no coder.
Stick with us and you soon will be.  ;)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Poison bug.
« Reply #24 on: November 01, 2005, 10:54:39 AM »
Ok. Now I understand.  :D

I'll let you know if I crash again, but that might take quite some time. In the mean time maybe you could check through that subroutine and see if something might be wrong in the code that could cause the crash I got. See you later.
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Poison bug.
« Reply #25 on: November 01, 2005, 01:23:52 PM »
Got the same crash again.

ERROR:

Run-time error 6: overflow

CODE:

rob(n).mem(poison) = rob(n).poison

HOVERING INFO:

rob(n).mem(poison) = 25283

n = 1662

poison = 827

power = -27954

I hope that's enough info.
The internet is corrupt and controlled by criminally minded people.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Poison bug.
« Reply #26 on: November 01, 2005, 01:58:25 PM »
Quote
power = -27954
Thought as much.

Somehow power has gone negative.

Since power is calculated as.

power = Shots(t).value * (Shots(t).nrg / Shots(t).range)

it would be helpful to know those three values alao
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Poison bug.
« Reply #27 on: November 01, 2005, 02:10:44 PM »
Testlund ...
can you upload a 'settings' for this ...
or perhaps a zip of the sim just prior to the crash?
(meant to impliment that write error sim in 2.37.4 too ... how difficult is that Num?!)
perhaps I or someone can then duplicate it ...

I've taken to setting a user 'seed' as well ...
so I have a better shot at repeating the problem.
« Last Edit: November 01, 2005, 02:14:19 PM by Griz »
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Poison bug.
« Reply #28 on: November 01, 2005, 03:50:36 PM »
nrg is probably what's going negative, I'd bet.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Poison bug.
« Reply #29 on: November 01, 2005, 03:54:43 PM »
Could be

A robot's energy can go negative during any part of the main loop, It is only zeroed again in "Updatepos" (I think)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D