Closed XertroV closed 5 months ago
okay on restarting the game I got the original assertion error then a few more.
// this causes assertion errors
// protected ObjInMap@[]@[] _Macroblocks;
// const ObjInMap@[]@[]@ get_Macroblocks() { return _Macroblocks; }
// this does not
protected ObjInMap@[][] _Macroblocks;
const ObjInMap@[][]@ get_Macroblocks() { return _Macroblocks; }
protected void AddToMacroblock(ObjInMap@ b) {
if (b.mbInstId < 0) return;
while (b.mbInstId >= _Macroblocks.Length) {
_Macroblocks.InsertLast({});
dev_trace("_Macroblocks length: " + _Macroblocks.Length + " for mbInstId: " + b.mbInstId);
}
_Macroblocks[b.mbInstId].InsertLast(b);
}
So this is related to an array of arrays as handles? Can we find a minimal reproduction case w/o the use of Openplanet-specific API's to report on the Angelscript forum?
Reported here: https://www.gamedev.net/forums/topic/715669-4-assertion-errors-with-nested-lists-of-handles/
Repro:
class Cache {
Cache() {
}
protected Obj@[]@[] _Blah;
const Obj@[]@[] get_Blah() {
return _Blah;
}
protected void AddObj(Obj@ o) {
while (o.pos.x >= _Blah.Length) {
_Blah.InsertLast({});
break;
}
_Blah[o.pos.x].InsertLast(o);
}
}
class Obj {
nat3 pos;
Obj(nat3 pos) {
this.pos = pos;
}
}
Happened on reloading E++.
Clicked ignore a bunch. There was a different message after some repeats of that assertion, but I clicked ignore too quickly to see it. Then the game crashed.