Author Topic: How to fix overflow errors faster?  (Read 7396 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to fix overflow errors faster?
« on: April 19, 2005, 04:36:23 PM »
I found 2 overflow errors one I fixed , the other is a different story.

It turns out that when you run somthing in vb it runs is with the [you]same compilation rules as it does if you make exe file [/you], therefor you guys (PY, NUM) have to go to Options > compile > , turn Advanced optimizations off , then turn favor pentum pro (for the hell of it) on

Here is the trouble codes I pinpointed that cause the overflows"

the call for repruduction , the "per" part can get intager overflows.

Quote
Reproduce rep(t), rob(rep(t)).mem(repro) + rob(rep(t)).mem(mrepro) 'causes oveflows


and finaly

Quote
Private Function customcequa(n As Integer) As Boolean
'usage: 10 20 30 ~= is are 10 and 20 within 30 percent of each other?
  Dim a As Integer
  Dim b As Integer
  Dim c As Integer
  Dim d As Integer
 
  d = readst(n)
  b = readst(n)
  a = readst(n)
  c = a / 100 * d
'Here I am getting NEGATIVE values for c that cause integer oveflow
  customcequa = (a - c <= B) And (a + c * 1# >= B)
End Function

Note that I did not change the code for ANY of this models.

Note that I am waiting again on a virsion, and got rid of my mutation fixes hoping that its already added to the virsion you guys have. Lets start a new topic to with a list of stuff that needs to be done to mutation. In the mean time read this; try to comprehend it, and good luck with what ever you are working on.
« Last Edit: April 19, 2005, 04:38:59 PM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to fix overflow errors faster?
« Reply #1 on: April 19, 2005, 04:38:35 PM »
One more error , really annoing , when I Properly exit the Darwin Bots program it crashes, This has something to do with the quary unload code in the Mdi parent form.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
How to fix overflow errors faster?
« Reply #2 on: April 19, 2005, 04:42:45 PM »
You can only exit DarwinBots from the VB screen by clicking the stop button. It is kind of annoying but not difficult to get around.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to fix overflow errors faster?
« Reply #3 on: April 19, 2005, 04:46:46 PM »
Aright, I've fixed the two problems you've said.  Both are

Does the crashing program happen everytime you exit?  I don't think anyone's ever found something like that.  It's weird how sometimes we get specific bugs that are only on some people's systems.  There's definately not a universiality to VB.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to fix overflow errors faster?
« Reply #4 on: April 19, 2005, 04:56:30 PM »
Num, what was happening in the top problem? (I could not figure it out at all)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to fix overflow errors faster?
« Reply #5 on: April 19, 2005, 04:58:41 PM »
I captolized my I letters here I hope...

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
How to fix overflow errors faster?
« Reply #6 on: April 19, 2005, 05:01:37 PM »
Quote
Does the crashing program happen everytime you exit?

This is only when running from code.

If I run the sim then click the little X like you normally do, VB crashes completely. I have to go back into the code window and stop it from there.
It has always done this for me. Happens on all of my PCs (four different systems now). I just assumed that it did for everybody.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to fix overflow errors faster?
« Reply #7 on: April 19, 2005, 05:05:03 PM »
thx PY..., Num you there?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to fix overflow errors faster?
« Reply #8 on: April 19, 2005, 05:11:04 PM »
Wow guys, I can exit the program normally even when running through VB front end.

Bots, the problem was that its passing integer + integer to integer.  So for incredibly stupid values for repro and mrepro (like 32000 each), it'll overflow.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to fix overflow errors faster?
« Reply #9 on: April 19, 2005, 05:14:46 PM »
ic , lol , thx Num.. thats what its for that "per", I mean clue people whats "per" .. anyway,

Num: Yes Program crashes on crapy prossesors big time when you exit, maybe its the vedio card , I have no clue...

Maybe its the OS?

we need to fix it in the code, we won't tell everyone to: "go get a DELL"
« Last Edit: April 19, 2005, 05:16:05 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
How to fix overflow errors faster?
« Reply #10 on: April 19, 2005, 05:17:53 PM »
I am running a top of the range Dell, a 2.8 gig Compaq Presario and a 4 year old E-Machine i700 with a Celeron chip. It crashes exactly the same way on all 3 of them.  :(
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to fix overflow errors faster?
« Reply #11 on: April 19, 2005, 05:19:05 PM »
Quote
we need to fix it in the code, we won't tell everyone to: "go get a DELL"
Lol, I AM running a Dell.  I think we've found the problem.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to fix overflow errors faster?
« Reply #12 on: April 19, 2005, 05:20:16 PM »
I'm running in 98.  Maybe that matters...

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
How to fix overflow errors faster?
« Reply #13 on: April 19, 2005, 05:23:05 PM »
Possibly but I doubt it.

My Dell is running 2000 (daughter product of NT)

My E-Machine is running ME (daughter of 98) though it has run XP professional

My (daughter's) Presario is using XP home edition

It crashed on every computer and every operating system in exactly the same way.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to fix overflow errors faster?
« Reply #14 on: April 19, 2005, 05:56:08 PM »
I'm running VB 6.0.8169.  Is that what you all are running?