Author Topic: DarwinBot crash (ver 2.44)  (Read 10468 times)

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« on: November 20, 2008, 05:55:31 PM »
Hi

Darwinbots seams to crash frequently sometimes the error reason differs
But so far I got the folowing noted :

An Error Ocurred. DarwinBots cannot contineu. Sorry Badfilename or number 52 0

or :

The instruction at "0x7c911762" referenced at 0x000000018". The memory could not be "read"

or:

Some kind of DEP error on XP thats tipicaly a program that doesnt do well on its memory reservations.
Even if I disable DEP protection since I trust DarwinBots, it still crashes

To the programmer >> -- you might also be able to run it with a debuger connected [requires source code]  (then you see exactly how it goes wrong)


 
I gues the program has a problem with arrays since a virus can make species discription longer.  
Its not such a wild gues, for my IT job I did many crash debugs... on NT4.0
Since I could run the program run for days if I dont use viruses in the sim.
The only thing a virus can do is making DNA longer.
In fact this virus DNA introduces sexrepro to any species
A slightly modified algeahelper (from jknilinux > the modification is that it can only infects once but thats still to much, doesnt keep me from crashing).

.. I believe strings can be quite long even in VB6, maybe encode a bot in a string (I dont know where it is stored in).
   otherways make sure that virus execution, dont result in array seize problems (meaning the bot becomes larger then was reserved for)
   A way to solve that is to re-create the string/array with proper size  
   .. and if for some reason a virus has to much genes inserted allready > then just dont excute the virus command sillently ignore it

About my PC its XP with latest fixes.
Darwin Bots version 2.44
DEP was enabled but I Disabled it still didnt solve it (and that gives a good cleu in the direction where it went wrong)



Feel free to run attached bots and sim
Sim is in no pond mode small, it might take a while crash is usualy random but often within 5 minutes or so or less
(realy sometimes it takes longer, but I cannt run it for an hour).
« Last Edit: November 20, 2008, 06:12:16 PM by peterb »

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #1 on: November 20, 2008, 08:04:37 PM »
My only recommendation would be to send all the DB folders to your desktop, delete DB, and reinstall from 2.1. Then, download 2.43.1l & m from here, since 2.44 is sometimes a bit buggy.

The bug support here used to be good, but now that eric's gone I don't think this will be fixed for a while, if ever...

Just thought you should know, since you came after eric left, that he was the main(only?) VB developer. So, we may not have another release of DB until DB3 in about a year.

You don't have tons of free time and know how to use C# or VB, do you?

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #2 on: November 21, 2008, 06:54:02 AM »
What is the difference from 2.43.1 and 2.44 ?

Well I do understand VB6 and vb.net and a little bit of C# C.net, and various other languages.
Time is a bit of a problem, but also usualy I'd like to solve the computer problems I face (bad habitat but it results in work too)

Can I get the source code of 2.44 ( I couldnt find it).
I'd like to run in in Debug mode and try to solve this.


Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #3 on: November 21, 2008, 02:42:41 PM »
Quote from: jknilinux
My only recommendation would be to send all the DB folders to your desktop, delete DB, and reinstall from 2.1. Then, download 2.43.1l & m from here, since 2.44 is sometimes a bit buggy.

Noting also that L and M version have (what it looks like the same crashgin problems)
And also  the same as you had posted in that forum with the download you mentioned you then had too problems with virus genes inside bots..
Me personal hinting that Genes resize DNA...

Anyway th L version gave another bug hint..



This array is fixed or temporarily locked

(Visual Basic)  Visual Basic Reference: Error Messages   ( http://msdn.microsoft.com/en-us/library/0d8t4e00(VS.80).aspx )
This error has the following possible causes:

Using ReDim to change the number of elements of a fixed-size array.

Redimensioning a module-level dynamic array, in which one element has been passed as an argument to a procedure. If an element is passed, the array is locked to prevent deallocating memory for the reference parameter within the procedure.

Attempting to assign a value to a Variant variable containing an array, but the Variant is currently locked.

To correct this error
Make the original array dynamic rather than fixed by declaring it with ReDim (if the array is declared within a procedure), or by declaring it without specifying the number of elements (if the array is declared at the module level.

Determine whether you really need to pass the element, since it is visible within all procedures in the module.

Determine what is locking the Variant and remedy it.

See Also

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #4 on: November 21, 2008, 08:33:49 PM »
we don't have the source ar present, unfortunately.  At least not the current source.

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #5 on: November 22, 2008, 02:29:08 PM »
Quote from: Numsgil
we don't have the source ar present, unfortunately.  At least not the current source.


Ok well I just installed VB6 (enterprice version) in a virtualized XP client, I will work (Sadly) on an older software version, since 2.44 seams to be not shared. Once this got solved futher then it should be adapted I gues into a next version which also includes the 2.44 improvements.
If I solve this ofcourse code will be published


Importent question, are there any people who I might ask some questions about the source code?.
Or is no one left from the original coders.
I'd also like to know as a first question what was improved by 2.44
(altough earlier versions got this problem too), anyone who can point me in a direction like "you might take a look there... xxxx.bas lines xxxx that would be realy helpfull. Cause I dont no anything about it yet (dough that will change over time).

I'm not doing any other sugestions (yet), perhaps later. This is a first atempt to code and to solve this problem of viruses who change DNA length of a bot resulting in  VB6 Arrays who got locked.
This has been going on for quite a while, so I dont think it would be an easy one, any help in this direction would be great.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #6 on: November 22, 2008, 04:16:09 PM »
I'm the only one left, and it's been a few years since I was in the source.  Eric kept pretty extensive change logs in forum postings.  Look through any topics he wrote in the bugs and fixes forum and see if you can find his changelogs.

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #7 on: November 22, 2008, 05:10:14 PM »
Okay... its al a bit confusing now..

I compiled a (new?) version, it seams to be more stable (the didnt crash)
Once I got a memory error, dough the sim continoud after it (wow..)
Its based on a compilation of     http://opensvn.csie.org/DarwinbotsVB/

Its the only VB source code I could find.

That main webpage there reads revesion 5... > 2.5 ???



I'm not sure, I compiled but in the compilation I enabled array checking (since I had that bug)..
And well it seams more stable. The virus dont causes problems. Was this version never released?.
But  why is this version only 1.752K in size / while version 2.44 is 9.381K in size ?.  
The size difference is huge, thats strange since this one seams to be working fine.
Dough it maybe is verry old? (looking at help about says 2.43 ??, dough that might not reflect it properly)
Also 2.43L and M are ~9k in size while this one is ~2K in size.
Or is my compiler better, I'm using eneterprice version of VB6, not standard version.

Maybe someone can tell me if this is a very old version just by testing
Or that it is recently dough not 2.44. (2.44 I know sourcecode unavailable)


Well I'll attach it

Note in the compiler I can also tune some parts, if people like it, (if it is indeed recently)
 I'll upload other tuned version later. (like favor Pentium Pro based)
« Last Edit: November 22, 2008, 05:14:43 PM by peterb »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #8 on: November 22, 2008, 05:23:37 PM »
The best way to go would be to get as many people as possible working on DB3, with only one or two maintaining DB2. I should have free capabilities to work on DB3 by the end of this week, not too keen on learning VB, might as well stick with C#. The DB3 branch will implement new features, DB2 just fixing old bugs for now. The problem now is finding people who are willing to work on these, and all this is easier said than done, so back to the main discussion...
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #9 on: November 22, 2008, 06:40:02 PM »
Quote from: bacillus
The best way to go would be to get as many people as possible working on DB3, with only one or two maintaining DB2. I should have free capabilities to work on DB3 by the end of this week, not too keen on learning VB, might as well stick with C#. The DB3 branch will implement new features, DB2 just fixing old bugs for now. The problem now is finding people who are willing to work on these, and all this is easier said than done, so back to the main discussion...

thats not realy an answer to my qeustions.... and I do try to fix

DB3 will be in C, I'm not so good in C, so I'll like to fix this one.



The main qeustion is does anyone recognize this version ?
or was it never released / compiled ?
- some parts seamed to be more advanced then 2.44 (see the FTP upload part without vegies)
- while other parts (populatoin graph's dont show numbers) seam to be of older version.
- It seams more stable then 2.44 (in regard to viruses with sexrepro)
And if you might  know what was the big change from 1.2K to a whooping 9K in 2.44 (different compilers?)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #10 on: November 23, 2008, 03:55:18 AM »
It's very old.  No idea which version is actually in there.  Maybe it's 2.37 or an early version of 2.40

Check out this page on the wiki.  The newest source it lists is for 2.44.1h.  That's the best I can find at the moment.

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #11 on: November 23, 2008, 07:28:23 AM »
ok I used a source coparissor, and indeed it is an older version.
It handles less DNA commands it seams.. maybe I just keep the this old version for virus related bots.

I got a better idea now to how such errors could exist.
One module dims an array I gues somewhere bot(n) is dimmed.
Another module can be working on the array of bot(n) while another module tries to change bot(n).
The problem with the design seams that various modules handle it; and might not release it before another module starts operating on it. A battle between modules.

For next version, split dependencies; I mean dont come depended on other modules.
if you have something like

Module1************
Tasks..
while bot(x).data.pos(n) < len bot(x).data
if  bot(x) data = (call module2) then ...
..
n = n+1
wend
end

module2 *************
Bot(x) data = mid (botx(data) , ..., len(bot(x) -1).... changing the data
return
end

 hmm modules or genes..


Devide such tasks in a way that only Module N is allowed to write data in a data object
While other modules for example to graphic output / file handling / internet sharing, syncing / statistics / can only read

Oh and it might also be better to make use of simple database, instead of arrays
(especialy since array's in .net are not the same old data structures)

And.. wondering this virus issue.. have something to not copy a virus if it is allready in there
(I cant think of use of having multiple the same dan codes inside).

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #12 on: November 23, 2008, 04:23:12 PM »
The older version you have might not do viruses like you expect.  There's been some work with how viruses work relatively recently.

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #13 on: December 09, 2008, 10:47:52 AM »
Quote from: Numsgil
The older version you have might not do viruses like you expect.  There's been some work with how viruses work relatively recently.

isn't the source code for 2.44 here:
http://www.darwinbots.com/FTP/Darwinsource2.44.1.zip
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
DarwinBot crash (ver 2.44)
« Reply #14 on: December 09, 2008, 12:39:34 PM »
Completely off topic  

Whoa!!!  

Welcome back Griz