Description
Background
We're using Cesium to build a multiplayer system in Unity. As part of our testing protocol, we have multiple clients that will boot up and connect to a shared server.
Error
When our test script is executed, occasionally we will get the following stack trace:
0x00007FFD236353AC (KERNELBASE) RaiseException
0x00007FFCEB3D6BA7 (VCRUNTIME140) CxxThrowException
0x00007FFC9447B5E9 (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x00007FFC94479271 (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x00007FFC943EF8DD (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x00007FFC943EF5DD (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x00007FFC93A2B381 (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x00007FFC93A2BB15 (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x00007FFC939DB8CA (CesiumForUnityNative-Runtime) DotNet_CesiumForUnity_CesiumPolygonRasterOverlay_CreateImplementation
0x0000012EF928BE14 (Mono JIT Code) (wrapper managed-to-native) CesiumForUnity.Cesium3DTileset:DotNet_CesiumForUnity_Cesium3DTileset_Update (intptr,CesiumForUnity.Cesium3DTileset/ImplementationHandle)
0x0000012EF928BCC3 (Mono JIT Code) CesiumForUnity.Cesium3DTileset:Update ()
This crash only seems to affect one of the clients we spawn in our testing script. The testing script is below:
start "Test1" Client.exe -playerName 1 -serverIp 127.0.0.1 -hideDebugGUI true
start "Test2" Client.exe -playerName 2 -serverIp 127.0.0.1 -hideDebugGUI true
This crash seems to happen when ever we launch two or more clients within about 5 seconds of each other. If we wait longer than that, the crash does not seem to ever occur.
Technical Details
Unity Version: 22.3.18f1
CesiumForUnity Version: 1.9.0
We could not replicate the crash in the CesiumForUnity sample project
Conclusion
This is a rather annoying, but likely low priority, crash in our testing pipeline. It appears to be caused by something in the C++ implementation of the code, though my C++ skills are not sufficient to determine what. If there is a simple workaround we can implement, that would help us out a lot! The full stack trace and memory dump are available on request.