Darwinbots Forum

Code center => Darwinbots Program Source Code => Topic started by: Botsareus on April 19, 2005, 04:36:23 PM

Title: How to fix overflow errors faster?
Post by: Botsareus 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.
Title: How to fix overflow errors faster?
Post by: Botsareus 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.
Title: How to fix overflow errors faster?
Post by: PurpleYouko 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.
Title: How to fix overflow errors faster?
Post by: Numsgil 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.
Title: How to fix overflow errors faster?
Post by: Botsareus on April 19, 2005, 04:56:30 PM
Num, what was happening in the top problem? (I could not figure it out at all)
Title: How to fix overflow errors faster?
Post by: Botsareus on April 19, 2005, 04:58:41 PM
I captolized my I letters here I hope...
Title: How to fix overflow errors faster?
Post by: PurpleYouko 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.
Title: How to fix overflow errors faster?
Post by: Botsareus on April 19, 2005, 05:05:03 PM
thx PY..., Num you there?
Title: How to fix overflow errors faster?
Post by: Numsgil 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.
Title: How to fix overflow errors faster?
Post by: Botsareus 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"
Title: How to fix overflow errors faster?
Post by: PurpleYouko 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.  :(
Title: How to fix overflow errors faster?
Post by: Numsgil 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.
Title: How to fix overflow errors faster?
Post by: Numsgil on April 19, 2005, 05:20:16 PM
I'm running in 98.  Maybe that matters...
Title: How to fix overflow errors faster?
Post by: PurpleYouko 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.
Title: How to fix overflow errors faster?
Post by: Numsgil on April 19, 2005, 05:56:08 PM
I'm running VB 6.0.8169.  Is that what you all are running?
Title: How to fix overflow errors faster?
Post by: Botsareus on April 19, 2005, 07:27:20 PM
HA! , I figured out a way to fix that one already  :laugh:

We make a new .bas based exe program that does wm_distroy on the first microsoft fatal error window it sees, Now before DB closes it does shell on this exe program.. we call it Patch.exe
Title: How to fix overflow errors faster?
Post by: Numsgil on April 19, 2005, 07:41:33 PM
I think that's cheating, lol.
Title: How to fix overflow errors faster?
Post by: PurpleYouko on April 20, 2005, 09:13:01 AM
Mine is 6.0.8169 too
Title: How to fix overflow errors faster?
Post by: Numsgil on April 20, 2005, 09:21:07 AM
Well I'm stumped.  If anyone figures this one out (why it works for me and not for them), you get something cool.