ID:32437
 
I've researched as much as possible but there is no documentation or explanation anywhere around the BYOND site. Forum posts don't seem to get resolved on this topic.


I am receiving this error after about 12-24 hours of running duels in DMO(using NPC controlled characters) which happens after about 1700-1800 duels with some changes to make heavy use of overlays(more so than usual).
Obviously it's not practical to run this kind of test, which brings me to my request..

How can I go about forcing this error to occur? A small debug verb that makes it occur reliably would be a huge help. I'm aware overlays/underlays use the arrays but that doesn't help much, I've rebuilt features to not use overlays but such changes usually come at a price and some features just aren't reasonably possible without them.
If I'm able to reliably make it occur, I will be able to narrow down the problem area.


The actual error is:
BYOND(350.909) ERROR: maximum number of internal arrays exceeded (65535)!
I think you have to many text strings or lists, I know in other languages arrays means lists, so seems like you've got to many.
It's probably not lists, the error for lists does say "list" instead of "array". I'm not sure on text strings but I will test it. Thanks for your response.
I tested strings a moment ago, it produces the error "maximum number of strings exceeded".

Hopefully in the future, debugging in BYOND will allow you to see counters for these limited items(obj/mob/datum/strings/arrays etc).
You can for all atoms, it's a bit hacky but it works. Make a hex2dec proc and do a \ref on a new atom.
proc/hex2dec(hex)
for(var/i = length(hex),i>0,i--)
. += (text2ascii(hex,i)>64?(text2ascii(hex,i)&223)-55:text2asci i(hex,i)-48)<<(length(hex)-i<<2)
proc/ObjCount()
var/atom/A = new
var/text = "\ref[A]"
return hex2dec(text)--
That's an good way to go about checking atom count, I've only used counters. It would be nice if there were a way to do the same with the internal arrays.
tell me what this says when you hit the limit.

var/X
for(var/atom/A)
X += A.overlays.len
X += A.unerlays.len
src << "total: [X]"
Will do, although I'm still working to cause the error at the moment. I will run the duel test tonight(which takes many hours).
Unfortunately I haven't been able to reproduce the error to retrieve the output. Getting my computer to run uninterrupted for up to 20 hours is rather difficult, luck didn't seem to be with me the last week.

I did set up various data to be recorded during the test(keep in mind these figures are from stress testing and usually won't occur in an actual game, some checks to prevent redundant updates were also removed for test purposes):
-Most amount of /obj at any one time was 19,042
-Amount of /mob was under 100
-Calls to my overlay procedures were over 3.5 million
-Most overlays at any one time 18,702 (later on I ran another test and pushed it up to 28,666 but produced no error)
-The overlay count went up and down between 17,643 and 18,702
thats great but asap can you email me at [email protected]? i have some pretty important questions