Open rnd256 opened 2 years ago
My temporary workaround is to completely disable the garbage collector by commenting out this line:
That seems to prevent both of the above errors.
It seems this issue has some connection to this one, which has been (hopefully) fixed here: https://github.com/colyseus/colyseus/issues/495#issuecomment-1276545324
Colyseus Unity3d version: 0.14.8 (latest). It also occurs with version 0.14.7. I haven't tested other versions. Colyseus server version: 0.14.23 (latest).
Occasionally, after removing a
Schema
object from aMapSchema
, this line throws the error "KeyNotFoundException: The given key was not present in the dictionary": https://github.com/colyseus/colyseus-unity3d/blob/f80f7f402ad2e51c4ebad59db389c0b4d05ee1ad/Assets/Colyseus/Runtime/Scripts/Serializer/Schema/ColyseusReferenceTracker.cs#L85If I continue to play my game after this error, I eventually hit a "refId not found" error as well: https://github.com/colyseus/colyseus-unity3d/blob/f80f7f402ad2e51c4ebad59db389c0b4d05ee1ad/Assets/Colyseus/Runtime/Scripts/Serializer/Schema/Schema.cs#L399
This makes me think that there's some step where a
Schema
within aMapSchema
isn't properly getting added torefCounts
andrefs
in the Unity3d client.