Darwinbots Forum

Code center => Bugs and fixes => Topic started by: peterb on November 20, 2008, 05:55:31 PM

Title: DarwinBot crash (ver 2.44)
Post by: peterb 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).
Title: DarwinBot crash (ver 2.44)
Post by: jknilinux 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, (http://www.darwinbots.com/Forum/index.php?showtopic=3029&hl=) 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?
Title: DarwinBot crash (ver 2.44)
Post by: peterb 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.

Title: DarwinBot crash (ver 2.44)
Post by: peterb 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, (http://www.darwinbots.com/Forum/index.php?showtopic=3029&hl=) 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 (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
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on November 21, 2008, 08:33:49 PM
we don't have the source ar present, unfortunately.  At least not the current source.
Title: DarwinBot crash (ver 2.44)
Post by: peterb 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.
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil 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.
Title: DarwinBot crash (ver 2.44)
Post by: peterb 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/ (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)
Title: DarwinBot crash (ver 2.44)
Post by: bacillus 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...
Title: DarwinBot crash (ver 2.44)
Post by: peterb 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?)
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil 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 (http://www.darwinbots.com/WikiManual/index.php?title=Source_code_download) on the wiki.  The newest source it lists is for 2.44.1h.  That's the best I can find at the moment.
Title: DarwinBot crash (ver 2.44)
Post by: peterb 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).
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil 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.
Title: DarwinBot crash (ver 2.44)
Post by: Griz 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 (http://www.darwinbots.com/FTP/Darwinsource2.44.1.zip)
Title: DarwinBot crash (ver 2.44)
Post by: Endy on December 09, 2008, 12:39:34 PM
Completely off topic  

Whoa!!!  

Welcome back Griz
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on December 09, 2008, 11:34:00 PM
Hey, yeah, long time no see.

Did you check out the pic I'm using on the wiki
Title: DarwinBot crash (ver 2.44)
Post by: Griz on December 10, 2008, 10:47:28 AM
Quote from: Numsgil
Hey, yeah, long time no see.

Did you check out the pic I'm using on the wiki

off topic???
[hey endy]
somewhere in this thread ...
people were looking for the sourcecode for 2.44.
I just added the link after the last message.

yes ...
I did see the new pic on the wiki.
I have moved and changed my address ...
so maybe that's why I haven't been
receiving my royalty checks.

well ...
I'm just trying to catch up ...
downloaded the latest ... 2.44 and source code ...
then read this thread and find there were/are problems/bugs.
what is the last stable version that people are now using?

back to reading.

Title: DarwinBot crash (ver 2.44)
Post by: Endy on December 10, 2008, 11:49:59 AM
Darwin2.43.1L works good, I think the species forking stuff is the main issue with the newer versions.
Title: DarwinBot crash (ver 2.44)
Post by: peterb on December 11, 2008, 09:35:00 AM
Quote from: Endy
Darwin2.43.1L works good, I think the species forking stuff is the main issue with the newer versions.


Well the newer version 2.44.1 seams to do it better also
Dough it crashes at my pc on something else (when I want to start a simulation, but delete the last bot entry from the list), workaround is that I diasable the bots code execution.
Maybe dough I should post it in a new thread and not here.
Title: DarwinBot crash (ver 2.44)
Post by: Griz on December 11, 2008, 10:47:51 AM
Quote from: Endy
Darwin2.43.1L works good, I think the species forking stuff is the main issue with the newer versions.
yes, I have that ...
what I don't have is the source code for 2.43.1L ...
and I don't see it on the wiki or download site.
the last source I see there is Darwinsource2.43.1h ...
unless eric shared it in one of his update threads ...
which I haven't yet found.
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on December 11, 2008, 12:30:41 PM
The very very latest source is available from the FTP (http://www.darwinbots.com/WikiManual/index.php?title=Source_code_download).  We don't have version L's source code, unfortunately, just h and 2.44.1
Title: DarwinBot crash (ver 2.44)
Post by: peterb on December 11, 2008, 06:46:29 PM
Quote from: Numsgil
The very very latest source is available from the FTP (http://www.darwinbots.com/WikiManual/index.php?title=Source_code_download).  We don't have version L's source code, unfortunately, just h and 2.44.1


what is the difference with L and H
Where do those letters stand for ?
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on December 12, 2008, 02:04:47 AM
They're versions.  If you search the bugs and fixes forum you can find Eric's changelog where he kept track of what he changed between versions.
Title: DarwinBot crash (ver 2.44)
Post by: Griz on December 12, 2008, 04:51:30 PM
Quote from: Numsgil
They're versions.  If you search the bugs and fixes forum you can find Eric's changelog where he kept track of what he changed between versions.

~~~
good luck!

I found a message thread on
2.43.1.M (http://www.darwinbots.com/Forum/index.php?showtopic=2882)
 
but so far not for L.
seems M had some problems and L ended up being the last.
as I recall, eric often included an upload of the new changes ...
ie ... a,b,c .... L, M ... compiled ...
but not the source code in his update files.

well ...
I'll keep looking ...
if anyone discovers it ...
please let me know.
will do the same.
Title: DarwinBot crash (ver 2.44)
Post by: Griz on December 12, 2008, 05:18:28 PM
ok ...
have searched everywhere I can think of.
if it exists ...
I would think it would be at the FTP just like ver h is:
http://www.darwinbots.com/FTP/Darwinsource2.43.1h.zip (http://www.darwinbots.com/FTP/Darwinsource2.43.1h.zip)
as:
http://www.darwinbots.com/FTP/Darwinsource2.43.1l.zip (http://www.darwinbots.com/FTP/Darwinsource2.43.1l.zip)
or:
http://www.darwinbots.com/FTP/Darwinsource2.43.1L.zip (http://www.darwinbots.com/FTP/Darwinsource2.43.1L.zip)

doesn't appear to be.

so it goes.


Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on December 13, 2008, 04:37:50 AM
Yeah, the source isn't there.  He wasn't as regular uploading source code as binaries.

I've pinned the changelog threads I could find for between 2.43 and 2.43.1L.  I don't know where the changelog is for the versions after 1L.
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on December 13, 2008, 04:43:04 AM
I found the last changelog.  Was hiding in announcements.  Anyway, they're all pinned.
Title: DarwinBot crash (ver 2.44)
Post by: Griz on December 13, 2008, 07:15:49 PM
Quote from: Numsgil
I found the last changelog.  Was hiding in announcements.  Anyway, they're all pinned.

I have no idea what that means ...
or where to find them.
can you give me a clue?
Title: DarwinBot crash (ver 2.44)
Post by: Numsgil on December 14, 2008, 05:39:42 AM
"pinned" means they're always the first topics in the bugs and fixes forum.