Unity 6 crashing

I’m trying to use this plugin in unity 6.0.60 and it works for a while but after some time the editor starts crashing alot.

These 2 errors keep popping up.

Any ideas how to solve this?

Hi @lejean, welcome to the community!

I’m not sure what might be causing those errors, but it doesn’t look like they should be immediately causing a crash. Is the Editor crashing as well, separate from these errors? If so, can you provide some more of the information from the Unity crash reporter? In particular, it would be very useful to see a call stack of the crash.

Hey

I added the editor crash log to google drive because I can’t upload as a new user.

crash log

At first the editor works but after a crash happens because of a memory leak or what not, it mostly crashes instantly on launch.

Hi!

I’m also experiencing crashes with Unity 6. In my case with the Unity samples for v1.18.1 with Unity 6.0.58f2. The editor crashes after executing any sample.

The error I’m seeing is in CesiumRasterOverlays::RasterOverlayTile::~RasterOverlayTile()

I opened a ticket in GitHub as well.

Hi @lejean,

Looking at your log, I see this error from Cesium:

Exception: Failed to obtain _appData, can't resume connection

Which I suspect indicates some kind of problem communicating with Cesium ion. I don’t think that should cause Unity to crash, though.

Then, later, the call stack of the native crash doesn’t appear to have anything Cesium related in it. It looks like it’s crashing in OpenXR code?

We are aware of some instability with Cesium for Unity on AppDomain reloads (e.g., when editing code or entering / leaving play mode), particularly if they happen while tilesets are in the process of loading. We’re working on this! But your crash looks unrelated to that. So we’ll probably need your help to reproduce it ourselves in order to be able to investigate the cause.

@Fengel, we hope that your RasterOverlayTile related crash has been fixed in v1.19.0, released yesterday. If you try it, please let us know if this is the case. It’s also worth trying a completely clean copy of the Cesium for Unity Samples project, if you haven’t already.

Unity just crashed on me and from my understanding its down to Cesium this time. At least the last entry to the stack is from Cesium.

I am on Unity 6.000.2.10f1 using Cesium For Unity 1.19. Also running some Unity XR related packages.

This popped up before the crash:

[./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs line 121906]

NullReferenceException: Object reference not set to an instance of an object
  at UnityEngine.Bindings.Unmarshal.UnmarshalUnityObject[T] (System.IntPtr gcHandlePtr) [0x00031] in <3209c419f8514dc7af6f7bbce69cabc6>:0 
  at UnityEngine.GUIStyleState.get_background () [0x00015] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEditor.StyleSheets.StylePainter.DrawStyle (UnityEngine.GUIStyle gs, UnityEngine.Rect position, UnityEngine.GUIContent content, UnityEngine.DrawStates states) [0x00041] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at (wrapper delegate-invoke) <Module>.invoke_bool_GUIStyle_Rect_GUIContent_DrawStates(UnityEngine.GUIStyle,UnityEngine.Rect,UnityEngine.GUIContent,UnityEngine.DrawStates)
  at UnityEngine.GUIStyle.Draw (UnityEngine.Rect position, UnityEngine.GUIContent content, System.Int32 controlId, System.Boolean isHover, System.Boolean isActive, System.Boolean on, System.Boolean hasKeyboardFocus) [0x0004a] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEngine.GUIStyle.Draw (UnityEngine.Rect position, UnityEngine.GUIContent content, System.Int32 controlID, System.Boolean on, System.Boolean hover) [0x00017] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEngine.SliderHandler.OnRepaint () [0x000a7] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEngine.SliderHandler.Handle () [0x00064] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEngine.GUI.Slider (UnityEngine.Rect position, System.Single value, System.Single size, System.Single start, System.Single end, UnityEngine.GUIStyle slider, UnityEngine.GUIStyle thumb, System.Boolean horiz, System.Int32 id, UnityEngine.GUIStyle thumbExtent) [0x00036] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEngine.GUI.Scroller (UnityEngine.Rect position, System.Single value, System.Single size, System.Single leftValue, System.Single rightValue, UnityEngine.GUIStyle slider, UnityEngine.GUIStyle thumb, UnityEngine.GUIStyle leftButton, UnityEngine.GUIStyle rightButton, System.Boolean horiz) [0x0013a] in <63404e9af2c9442ab231fe73c8a5716f>:0 
  at UnityEditor.ZoomableArea.SliderGUI () [0x0019d] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at UnityEditor.ZoomableArea.EndViewGUI () [0x0001d] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at UnityEditor.GameView.OnGUI () [0x00588] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) [0x00078] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) [0x00001] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at UnityEditor.DockArea.OldOnGUI () [0x001fc] in <2fde32bfa1cb49eb86f50f1a654c74ac>:0 
  at UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x002b9] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x000cc] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () [0x00081] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) [0x000ec] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
Rethrow as ImmediateModeException
  at UnityEngine.UIElements.UIR.RenderTreeManager.RenderSingleTree (UnityEngine.UIElements.UIR.RenderTree renderTree, UnityEngine.RenderTexture nestedTreeRT, UnityEngine.RectInt nestedTreeViewport) [0x001c8] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIR.RenderTreeManager.RenderRootTree () [0x0006d] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIRRepaintUpdater.Render () [0x00024] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.BaseVisualElementPanel.Render () [0x00000] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.Panel.Render () [0x00014] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00063] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) [0x0007f] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) [0x0001a] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) [0x00001] in <9d8bee41f4d447c7bdc7f4c82643bb7e>:0 
  at UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) [0x00083] in <63404e9af2c9442ab231fe73c8a5716f>:0 

Crash!!!

@RSDev was this immediately after an AppDomain reload?

Usually this happens when I exit Play Mode, dont remember exactly for this crash.

I actually just spent some time porting my project to a fresh Unity 6.000.0.60f1 project based on the Unity VR template and now my editor crashes constantly. Its trying to reload the scene on startup and crashes again. Could be related to the issue you mentioned with AppDomain reloads while tilesets are loading

(Filename: ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Editor/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs Line: 10847)

[2025-11-05 11:03:06.457] [error] [TilesetContentManager.cpp:1021] An unexpected error occurred when loading tile: Unknown exception
UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object
)
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr,intptr*) (at ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:118378)
Reinterop.ReinteropInitializer/CallbackFunctionNativeFunction:Invoke () (at ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:117020)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

(Filename: ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs Line: 118378)

Request Asset Garbage Collect because used heap size increased from 373.9 MB to 0.71 GB, exceeding the threshold of 256.0 MB.
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)

=================================================================
Native Crash Reporting

Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

=================================================================
Managed Stacktrace:

=================================================================
Crash!!!

Edit:
Another crash log excerpt, different crash:

[./Library/PackageCache/com.unity.render-pipelines.universal@ba24149c0920/Runtime/UniversalRenderPipeline.cs line 885]

Asset Pipeline Refresh (id=0fc2fc1b6a5311f45b0a6cb80f372fcb): Total: 0.093 seconds - Initiated by RefreshV2(AllowForceSynchronousImport)
Asset Pipeline Refresh (id=fe9a2a5b653d5c94e87cac3ef26fb87b): Total: 0.048 seconds - Initiated by RefreshV2(NoUpdateAssetOptions)
Reloading assemblies due to reload request.
Reloading assemblies after forced synchronous recompile.
Begin MonoManager ReloadAssembly
Curl error 42: Callback aborted
Curl error 42: Callback aborted
[2025-11-05 11:18:15.007] [info] [IonRasterOverlay.cpp:557] Failed to refresh Cesium ion token for URL https://api.cesium.com/v1/assets/3830184/endpoint?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxYjQxNTNkNS00YzI0LTRkZDMtOGE5My01ZTVmZTkwMTJjZmUiLCJpZCI6MzExNjU2LCJpYXQiOjE3NTU1MjAxMTZ9.WJyLwDAT0mk99bktf1MQd0qRI_eOIiF3B0X6ITuWFUw.
UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object
)
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr,intptr*) (at ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:118378)

(Filename: ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs Line: 118378)

[2025-11-05 11:18:15.008] [error] [ErrorList.h:125] The following messages were reported while refreshing the token:

[Error] Error while accessing Cesium ion asset: Unknown exception
UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object
)
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr,intptr*) (at ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:118378)

(Filename: ./Library/PackageCache/com.cesium.unity@5EB9ED43342A/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs Line: 118378)

Curl error 42: Callback aborted

=================================================================
Native Crash Reporting

Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

=================================================================
Managed Stacktrace:

  at <unknown> <0xffffffff>
  at System.IO.File:Exists <0x0028a>
  at System.Console:.cctor <0x000ba>
  at System.Object:runtime_invoke_void <0x00184>
  at <unknown> <0xffffffff>
  at UnityEngine.UnityLogWriter:Init <0x00112>
  at UnityEngine.ClassLibraryInitializer:Init <0x0007a>
  at System.Object:runtime_invoke_void <0x00184>

=================================================================
Crash!!!