Code center > Bug reports

league out of memory error

<< < (2/7) > >>

Griz:

--- Quote from: Jez ---Where do I find the latest source code pls, only seem to be able to find it for C++
--- End quote ---

source code for 2.42.9r
http://www.darwinbots.com/FTP/Darwinsource2.42.9r.zip

thanks eric ... these are most helpful to have.

if you still need VB6:
http://www.darwinbots.com/FTP/VB6.zip
you may get some error messages when installing ...
ignore them ... it's stuff you don't need.


attempted to get a Debugging page happening on the WIki ...
hoping to have a place where 'seasoned' debuggers could give some
tips to we newbies ...
help us finger out some tricks using VB ...
so we could then help debug ...
but nothing ever came of it.
the page is still there ...
and still a good idea, imo.
http://www.darwinbots.com/WikiManual/index...title=DeBugging

Jez:
Thanks Griz

Didn't know we had a wiki page for debugging, I was thinking of collating all the info I get on doing it myself, seeings as I'll need most of it explained to me. I'll try to add the info to that page. How do I get to the place where the source is available? Otherwise I'll have to ask for link for each update.

Eric,

I have VB and source now, have managed to get DB to run in debugging mode and even found one bug, which didn't seem worth bothering you with so ignored it.

Any more tips would be welcome now...  

Edit
Link on how to Bug Report when you find bug

Edit
Just noticed Ieserva is running .9q not .9r as well. Hope that won't matter.

EricL:
Cool.  Glad to have you helping out!

The link to the source code download page is at the bottom of the main Downloads Page.

Please tell me about the bug you found.  Every little fix helps.

So, search the entire source for the string 'error.sim'.  You will find it about 6 times, but there are two lines where the comment portion of the source code line indicates that line should be commented out when running under the debugger.  Just put a single apostrophe at the beginning of the line.  This way, the source code won't try to handle the exception (an 'exception' is just a fancy name for a crash, a divide by 0 or something like that) and VB will get the error.  When an exception does happen, you should get a pop-up dialog that offers to let you debug the problem.  When you hit the debug button, it should hightlight the source code line where the exception is occurring.

Not much difference between 2.42.9q and 2.42.9r.  Pretty sure the memory leak is in both.

Setting a breakpoint on a specific line (the F9 button) and then stepping through the code line by line using F8 can be very useful in learning what is going on.  You can take a look at varible values in the watch window by adding 'watches' or execute your own source on the fly when VB is paused (e.g. print foo) in the immediate window.

Have fun playing around.  Feel free to ask questions!  Happy holidays.

Griz:

--- Quote from: EricL ---So, search the entire source for the string 'error.sim'.  You will find it about 6 times, but there are two lines where the comment portion of the source code line indicates that line should be commented out when running under the debugger.  Just put a single apostrophe at the beginning of the line.  This way, the source code won't try to handle the exception (an 'exception' is just a fancy name for a crash, a divide by 0 or something like that) and VB will get the error.  When an exception does happen, you should get a pop-up dialog that offers to let you debug the problem.  When you hit the debug button, it should hightlight the source code line where the exception is occurring.
--- End quote ---
two lines?
I know of one here:

in MDIForm1 (code)
in Private Sub simload
~~~

--- Code: ---Private Sub simload(Optional path As String)
  Dim I As Integer
  Dim path2 As String
  
 On Error GoTo fine ' Uncomment this line in the compiled version error.sim
--- End code ---
~~~
comment this 'On Error' out when using VB and Debugger ...
or it will abort and go save the error.sim.

then remember to uncomment it once you have
located and fixed an error and want to recompile ...
or the recompiled prog won't do it's 'save error.sim'
[not that this has ever happened.  lol]

also ... once the debugger has sent you to the break ...
'hovering' the mouse over variables in the code will
give you their value at that time and place in the execution.
this is helpful in finding overflows or variables out of range.
using this, even I have been able to locate errors on occasion.

again ...
I urge those with VB and Debugging knowledge to use the Wiki
page to document some of the basics in this area.
the advantage of the wiki being ...
it can be continually updated/edited by any of us ...
and is always in the same place ...
not getting lost somewhere in the archive of posts here at
the forum.

I used to have a lot of pages there listing the codes
for various moduals and bug fixes when we were
trying to help out PY debug version 2.37.
they are now out of date ...
but still exist.
here's a couple of them to give you an idea of how
I started to go about it ...
just couldn't get anyone else to use them!
http://www.darwinbots.com/WikiManual/index...tle=Bug_Reports
http://www.darwinbots.com/WikiManual/index.php?title=Senses
http://www.darwinbots.com/WikiManual/index.php?title=Robots

the idea was to put the code out there so people could
ask questions about it, begin to see how it works ...
and perhaps get interesting in debugging/writing themselves ...
to perhaps start an interactive  VB and/or DB tutorial.
that was the plan anyway.

so maybe something like this would be useful ...
or perhaps someone has a better idea.
like I said, this can all be edited and changed to
make it whatever we want to make it ...
whatever works.
so check it out ...
see what you think ...
see what you can come up with ...
and if people are actually interested ...
then I could see getting behind it again and
investing more time and energy.

Jez:
You were certainly right about it running slower in VB debugger; watching it reminds me of the old days!  

Bug; (let's see if the reporting is done right

Not having league folder ready when you try to run rerun league, choosing NO when it asks if you want to set up new league folder: Runtime error 5

Forms/LeagueForm(LeagueForm.frm)

Private Sub Write_Challenger()
  If Attacker >= 0 Then
->    Robname1(30).Caption = Left(LeagueEntrants(Attacker).Name, Len(LeagueEntrants(Attacker).Name) - 4)

****

When you say
--- Quote ---search the entire source for the string 'error.sim'.
--- End quote ---
do you mean search all those windows (that nearly gave my finger RSI closing before I figured out I hadn't made a mistake and there was an easier way to close them) ??  
That's 20k lines of code if I remember right, I'm sure that's not what you meant...  


--- Quote ---Setting a breakpoint on a specific line (the F9 button) and then stepping through the code line by line using F8 can be very useful in learning what is going on. You can take a look at varible values in the watch window by adding 'watches' or execute your own source on the fly when VB is paused (e.g. print foo) in the immediate window.
--- End quote ---
Causes me lots of problems in the understanding dept, sry but I might need a pre-school prep ABC before getting to grips with what you meant. On the other hand, perhaps when I have played about with it a bit more, I.e. locating watch window, I might get struck by lightning and be granted by the gift of many tongues, you never can tell.

2BH I have a 'learn VB in 21 days' book and a VB v4.0 disc but I never got past chapter 3 'cause my pc got a fresh install and I misplaced the disc for a year or two.   Never did get round to doing it again.  So that, and a little bit of basic C64 programming is the full extent of my experience.

***

If you peeps in the states (or elsewhere) are already into Xmax then Happy Xmas! If, like me, you have a few more hours to wait then Happy Xmas soon!!
(I'm having a happy holiday keeping Santa's glass topped up and taste testing it now and then to make sure nobody poisoned it while I wasn't looking.)  

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version