Code center > Bug reports
league out of memory error
Numsgil:
I still use the wiki from time to time to look up things about the DNA. I definately think a wiki works best as a way to post the final summary of a long discussion instead of as an avenue for discussion. Forums are very much the other way around.
League code is messy, and it's my fault, and I take full responsibility It was the first really major enhancement I made to the source code. Thankfully I've learned alot about software engineering in the interem.
A little off topic, but one of the reasons I like C# so much is that it makes error handling alot nicer. You can post the call stack for a bug right in the error message. I could never figure out how to do that in VB, C++, or any other languages I've programmed in.
Jez:
--- Quote from: Numsgil ---I still use the wiki from time to time to look up things about the DNA. I definately think a wiki works best as a way to post the final summary of a long discussion instead of as an avenue for discussion. Forums are very much the other way around.
--- End quote ---
That's how I use the Wiki as well. I have never used it for discussion and only edited it, usually following questions in the forum, when there was a definitive piece of text I could add. (plus a couple of errors I corrected in the writing 1G bots bit when I was writing a 1G bot). Part of the problem, for me, is that I only surf the wiki when I am looking for a bit of information that I know should be there.
I guess it is the best source for newbies to the game to use, it is clearer and easier to locate info there than here on the forum.
I personally would much prefer if you started a couple of topics in the forum to use as a discussion base, I can link them from the existing, relevant, stickies or make them into stickies in their own right if you prefer.
PY, btw, used to get paid to play with DB because he was so efficient at doing his job and had lots of free time, unfortunately, I think they spotted how good he was and have given him lots of other things to do. I'm sure if he ever gets enough free time again he will return.
--- Quote ---League code is messy, and it's my fault, and I take full responsibility It was the first really major enhancement I made to the source code. Thankfully I've learned alot about software engineering in the interem.
--- End quote ---
--- Code: --- 'this little snippet insures that Numsgil can run his code alright
If Left(MDIForm1.MainDir, 15) = "C:\darwinsource" Then _
MDIForm1.MainDir = "C:\DarwinbotsII"
' Here's another hack like the above so that EricL can run in VB
If Left(MDIForm1.MainDir, 51) = "C:\Documents and Settings\Eric\Desktop\DB VB Source" Then _
MDIForm1.MainDir = "C:\Program Files\DarwinBotsII"
--- End code ---
Just made me laugh.
Plus a little snippet of code I presume is relevant to leagues for Griz (removed as already in wiki)
You missed a chance to tell me what the immediate window does btw Nums' I'm gonna be forced to find out for myself soon.
Edit
Nice work Griz, I've just been browsing the wiki links you gave and noticed you have already started updating.
Griz:
Jez ...
left you some messages at http://www.darwinbots.com/WikiManual/index...e=User_talk:Jez
you should be alerted as to any new messages there when you log in ...
but just in case ... now you know.
EricL:
Some quick responses:
You can make *some* changes to the source code while DB is running, but you have to pause VB first, either with the pause button or by hitting a breakpoint. What changes you are able to make may not make sense without a programming background, but basically, while paused, you can change or add things to the source code as long as it doesn't mess up the VB interpreter's state. It will tell you if it it does. You can generally do all sort of things to routines that arn't on the call stack, but only certain things to routines that are. You can't declare a new variable for example in a routine on the stack without halting the program's exectuion in VB but you can make other changes, add lines, new routines, etc..
The immediate window is a mostly a place where you can execute code you write on the fly while debugging - code that is not part of the program, but code you want to execte right then for help in debugging. Say you hit a breakpoint and want to step through from there, but with a certain set of variables having a certain set of values, say to reproduce a bug further down the line. Well, instead of waiting for the program to happen upon those values, you can change those varaible values manually in the immediate window e.g. x = 5, y = 10, etc. and then proceed. The code you type in the immediate window is, well, immediate. It does not become part of the DB source code - it only executes right there and then is gone. Also useful for things like printing variable values at breakpoints.
I agree with the discussion of wiki v.s forum. Wiki is for static, long lived information. Forum is for dynamic discussion.
Most of the league code is in the F1mode module though some is in with the options form code and a few other places.
Any assistance that helps narrow down a bug is totally appreciated. The ones with the long repro times are the worst. If someone catches one of these in the debugger, that is gold since they are so hard and time intensive to reproduce. Even just telling me what line it occurs on and nothing else helps tremendously. Non-programmers who are willing to run under VB can really be tremendously helpful even without any understanding of the source code or programming skills. Some bugs can be environment specific and hard to reproduce execpt on a specific machine. Getting someone to run DB under VB on that machine can be serious money and save days of debugging elsewhere. Many thanks!
Jez:
Thanks for the head up Griz, I wouldn't have seen that for a while if you hadn't mentioned it. Will check it after this post.
Also thanks for the reply Eric, I have located the pause button (VB newbs ) edited the code as per the location Griz identified and restarted the sim. Hope it didn't need to be saved first. Also hope that is the only line of the code I had to amend.
I am so much more in awe of the work you have done Eric/PY/Nums, having run the sim in VB debugger now, the last league match round took over 8hrs to finish. It is a time waste and a half X10 tracking these niggling little bugs down.
I think I have identified what you mean by 'breakpoint'; Run/break I guess. Still not sure how it would be used. (I surfed the VBv4.0 book and missed any info on using it ) I don't think I am par for the course when it comes to using the immediate window yet.
Your thanks are appreciated, (new leaue: bug spotting ) but should I be able to email you a bottle of your favourite tipple (it is xmas) then I would. Plus a bottle to all the others that have contributed to the creation and evolution of DB!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version