Author Topic: Overflow errors RESOLVED 2.43.1M  (Read 3313 times)

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Overflow errors RESOLVED 2.43.1M
« on: March 18, 2007, 10:19:40 AM »
DB doesn't like very big numbers. In settings you get overflow error in Species inviduals and starting energy, waste treshold, corpse decay perioid, every setting in population control and league rounds if you put value above 32767. Also, if you pute insanely large (several millions or hundreds of millions) in mutation oscillation frequency, nrg/round or in nrg management window sun up/down if-box, you get the same error. Otherwise settings seems to handle big numbers.
« Last Edit: August 11, 2008, 12:40:43 PM by EricL »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Overflow errors RESOLVED 2.43.1M
« Reply #1 on: March 18, 2007, 06:55:12 PM »
It has to do with how the numbers are stored in the program itself. (One of the main programmers could explain this better) Mainly we just use 32000 as the cut off.

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Overflow errors RESOLVED 2.43.1M
« Reply #2 on: August 02, 2008, 06:35:06 AM »
Quote from: Nitus
...What's the maximum value for waste threshold? I tried 32000 and it crashed....
There seems to be an overflow error still in the waste, its not at 32,000, but it will still exit abruptly if you change the waste settings to something like 99,999 or 320,000 (probably what happened to Nitus, if you press the extra zero it crashes, but 32,000 exactly won't)

I didn't try any other settings as I really should be asleep right now.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Overflow errors RESOLVED 2.43.1M
« Reply #3 on: August 02, 2008, 02:12:07 PM »
It's mostly a VB limitation.  In C or C++, the numbers would get truncated (would only take the least significant 16 bits), but in VB it causes an error to be flagged, so the code has to specifically check for overflow conditions everywhere they might happen.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Overflow errors RESOLVED 2.43.1M
« Reply #4 on: August 11, 2008, 12:45:12 PM »
Waste Threshold overflow fixed for 2.43.1M.  It was as Shasta says.  Not at 32000, but anything over the VB Integer limit.

Note that I have not fixed the insanely large number overflow issues Peksa mentions in the top post.  That is an overflow of the VB Val() command.  Fixed that would be more involved.   So if you type a number larger than a VB Long can handle, the program will still crash but to do so takes deliberte effort as opposed to accidently hitting an extra digit so I think not fixing it is fine.
Many beers....