The function in question is something like this:
Code: Select all
sub buggy(i as long)
print i, ubound(c), lbound(c)
if c(i).a <> -1 then 'this is the line that gives an error
ubound/lbound show that I'm well within the array, and thus should not be getting out-of-bounds. Not only that, but some variations I've tried also set some high bits in the error code (I can't see anything that shows any valid error codes greater than about 17).
I don't expect anyone to be able to fix my problem with what I've posted thus far, but I was wondering if anyone has any guesses on what could be causing this or how I might go about finding what's going on.
It's worth noting I'm not making use of any pointers anywhere, so I don't think it's possible to have overwritten anything important that would end up causing strange random errors.