JContainers icon indicating copy to clipboard operation
JContainers copied to clipboard

Filling a JArray casuses "Warning: access to a non-existing object with id 0x1 (1)"

Open MathiewMay2 opened this issue 1 month ago • 0 comments

I have a function that fills a JArray with the content of a a bunch of JSON files, about 6500 elements need to be placed in the JArray, but after 600 elements it gives this error "Warning: access to a non-existing object with id 0x1 (1)" is there a limit to how many elements a JArray can contain? i thought it was limited to 64 bit unsigned, this is my function

string[] mappingFiles = JsonUtil.JsonInFolder(mappingsPath)
    int i = 0
    While (i < mappingFiles.Length)
        string jsonPath = mappingsPath+"/"+mappingFiles[i]
        string[] mappingMembers = JsonUtil.PathMembers(jsonPath, ".string")
        int x = 0
        While (x < mappingMembers.Length)
            JArray.addStr(mappingHashKeys, mappingMembers[x])
            ConsoleUtil.PrintMessage(Jarray.getStr(mappingHashKeys, x))
            x += 1
        EndWhile
        i += 1
    EndWhile

Used in combination with PapyrusUtil, and i know for a fact the error does not come from PapyrusUtil since it is able to print all of the 6500 elements in the console fine the error only appears when i do JArray.addStr, same error with JMap. the JArray is defined in a separate function as "int mappingHash" and "mappingHash = JArray.object()"

MathiewMay2 avatar May 07 '24 14:05 MathiewMay2