Code center > Bug reports
league out of memory error
Jez:
Stopped DB via VB and restarted, tried to rerun league again, it asked where file \ was so I cancelled it, got run time error 75 Path/File access error - Caused by me not adding veg to (empty) bot list before I started league I think
DNATokenizing (Code)
-> FileCopy path2, path
End If
path = path2
GoTo inizio
Griz:
--- Quote from: Jez ---Here's one I caught though, error 76 subscripts out of range IIRC
Was just rerunning the league and clicking the win button to see how easy it was to get the competitors to disapear again
HDRoutines (Code)
-> Open path For Binary As 1
Put #1, , numOfExistingBots
For t = 1 To MaxRobs
If rob(t).exist Then
Debug even offers me breakpoints now, solves that issue.
error sim attached although I doubt it's of any use
--- End quote ---
this is where 'hovering' the mouse over the variables
to see their values can show you one that is out of range.
iow ... numOfExistingBots or MaxRobs or rob(t).exist or even 't'.
if you also report these values, that can help Eric or someone
familiar with what the ranges of the variable should be ...
to see if there is a problem with one of them.
also ... if you zip the error.sim first ... it will only be a few KB ...
much less than the 500+kb you've attached.
that makes it easier to download for me ...
using my *TCAAS isp
[*two-cans-and-a-string which at times is 28kbbs!!!
one, of only a couple, downside to living in the boonies. ]
will load in your error.sim and poke around a bit.
don't hold your breath.
Jez:
File zipped, sry didn't think about it.
You'd probably have better luck just re-running the league under debugger and clicking win repeatedly, error sims for leagues don't hold the relevant league info. Only took me a couple of minutes to reproduce. you may notice, specially if you start clicking as soon as the sim starts, the number of wins going up by two for every click.
Anyway, am having go at hovering mouse stunt:
t = 0
Put #1, , Len(SimOpts.AutoRobPath) =""
Put #1, , SimOpts.AutoRobPath =""
Put #1, , SimOpts.AutoRobTime =0
Put #1, , Len(SimOpts.AutoSimPath) =""
Put #1, , SimOpts.AutoSimPath =""
Put #1, , SimOpts.AutoSimTime =0
Put #1, , SimOpts.BlockedVegs =FALSE
Put #1, , SimOpts.Costs(SHOTCOST) =23
Put #1, , SimOpts.CostExecCond =0.004
Hmm, there are lots of these, oops, it didn't want to give me these at first but I think these are the ones you were talking about:
Num of existing bots =15
MaxRobs =16
How do you decide what is relevant? Is it just the next few values after highlighted line?
EricL:
--- Quote from: Jez ---How do you decide what is relevant? Is it just the next few values after highlighted line?
--- End quote ---
This is where knowing the code and having some programming background starts to be important. Bascially, VB will detect an exception on a specific line. That is, something "illegal" is happenign on that line as far as VB is concerned such as an attempt to devide by 0 or in this case, an attempt to reference an array element outside the bounds of the declared arrray size. If you report the values of the variables on the line in which VB indicates there is a problem, that should be sufficient. I will also point out that a set of repro steps as you indicate above (e.g. pressing win a ton of times, etc. ) is just as good or better casue it lets me quickly reproduce the problem in the debugger on my machine where I can explore the root cause of the problem interactivly. A lot of the time, the root cause isn't where the "illegal" operation is being attempted. Its way back down the line.
I will look at this as soon as I can. Right now, I'm still trying to catch that memory leak...
Griz:
--- Quote ---You'd probably have better luck just re-running the league under debugger and clicking win repeatedly, error sims for leagues don't hold the relevant league info. Only took me a couple of minutes to reproduce. you may notice, specially if you start clicking as soon as the sim starts, the number of wins going up by two for every click.
--- End quote ---
I had noticed in the past that unless one is VERY quick on clicking ... it jumps up by 2 or 3 wins. need a bit of delay built in there somewhere, eh?
--- Quote ---How do you decide what is relevant? Is it just the next few values after highlighted line?
--- End quote ---
well, IN the line the debug brought you to, eh? the error occurred/was found ... there, yes?
if the problem can be seen there ...
then troubleshooting is about going back 'upstream' to see where it may have come from ...
but that quickly gets into PY/Num/Eric territory, eh?
seeing/knowing what is out of place, is not quite right , is too ...
but sometimes it might be obvious.
ie ... if 'Num of existing bots' is greater than 'MaxRobs' ...
or if in a 'from t = 1 to 10 loop, you see t is 0 or 11 ... that might be a hint.
or if a variable is >32768 ... and is defined as a single integer ... than there is a problem.
those are really the only one's I've spotted in the past ... only the most obvious.
but reporting these values for the variables in the offending line ...
is all good data for those who have a chance of knowing what it might mean.
this is the value of having a discussion and/or page on Debugging ...
where those with knowledge/experience can help those of us who do
not yet possess those skills but who are willing to learn ... do so ...
so we can then return the favor and help out on some level.
you know ... make it a real cooperative effort ...
sharing as much info as possible.
in fact ... that might be a good idea ...
to have a thread here just on Debugging ...
which I will also then mirror on the wiki ...
archiving the relevant info.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version