Crash in Cesium for Unity during code reloading

Working with Cesium for Unity, I’ve been experiencing a recurring crash. It seems to happen when Unity’s reloading code - it always seems to happen when I switch back to the editor after modifying something in Visual Studio. I’ve attached the full stack trace below. If anyone has also experienced this crash and can help nail down some reproduction steps, that would help me get this into a GitHub issue!

=================================================================
	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 CesiumForUnity.CesiumIonSession:DotNet_CesiumForUnity_CesiumIonSession_Tick <0x0017e>
	  at CesiumForUnity.CesiumIonSession:Tick <0x001a2>
	  at CesiumForUnity.CesiumEditorUtility:UpdateIonSession <0x0010a>
	  at UnityEditor.EditorApplication:Internal_CallUpdateFunctions <0x00327>
	  at System.Object:runtime_invoke_void <0x00184>
=================================================================
Received signal SIGSEGV
Obtained 87 stack frames
0x00007ffe2f80fbd9 (CesiumForUnityNative-Editor) [xmemory:1375] std::_Container_base12::_Orphan_all_unlocked_v3 
0x00007ffe2f80fb6a (CesiumForUnityNative-Editor) [xmemory:1232] std::_Container_base12::_Orphan_all_locked_v3 
0x00007ffe2f80fb24 (CesiumForUnityNative-Editor) [xmemory:1391] std::_Container_base12::_Orphan_all 
0x00007ffe2f80fc9e (CesiumForUnityNative-Editor) [xstring:4840] std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy_deallocate 
0x00007ffe2f80f44a (CesiumForUnityNative-Editor) [xstring:3141] std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> > 
0x00007ffe2f88175d (CesiumForUnityNative-Editor) CesiumIonClient::Profile::~Profile
0x00007ffe2f883e48 (CesiumForUnityNative-Editor) CesiumIonClient::Profile::`scalar deleting destructor'
0x00007ffe2f886140 (CesiumForUnityNative-Editor) [optional:132] std::_Optional_destruct_base<CesiumIonClient::Profile,0>::reset 
0x00007ffe2f881d88 (CesiumForUnityNative-Editor) [optional:285] std::optional<CesiumIonClient::Profile>::operator= 
0x00007ffe2f85f76b (CesiumForUnityNative-Editor) [CesiumIonSessionImpl.cpp:384] <lambda_63f7f162df8f18193c46c11eabce83d6>::operator() 
0x00007ffe2fbbaf5a (CesiumForUnityNative-Editor) [CatchFunction.h:61] `<lambda_03da5fcbac684505a4eda96ad2eee3d5>::operator()'::`1'::catch$3 
0x00007ffeb7751080 (VCRUNTIME140_1D) 
0x00007ffeb7753aae (VCRUNTIME140_1D) _NLG_Return2
0x00007ffecb0d3c66 (ntdll) RtlCaptureContext2
0x00007ffe2f8654a6 (CesiumForUnityNative-Editor) [CatchFunction.h:57] <lambda_03da5fcbac684505a4eda96ad2eee3d5>::operator() 
0x00007ffe2f86713e (CesiumForUnityNative-Editor) [traits.h:108] <lambda_207b55f1b8552b847e27389ff3bd54d9>::operator() 
0x00007ffe2f872a4c (CesiumForUnityNative-Editor) [traits.h:103] async::detail::invoke_fake_void<<lambda_207b55f1b8552b847e27389ff3bd54d9>,void> 
0x00007ffe2f87285b (CesiumForUnityNative-Editor) [traits.h:108] async::detail::invoke_fake_void<<lambda_03da5fcbac684505a4eda96ad2eee3d5>,std::exception_ptr> 
0x00007ffe2f8663e9 (CesiumForUnityNative-Editor) [task_base.h:550] async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<std::exception_ptr>,async::detail::fake_void,<lambda_03da5fcbac684505a4eda96ad2eee3d5>,std::integral_constant<bool,1>,0>::operator() 
0x00007ffe2f866549 (CesiumForUnityNative-Editor) [task_base.h:398] async::detail::task_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<std::exception_ptr>,async::detail::fake_void,<lambda_03da5fcbac684505a4eda96ad2eee3d5>,std::integral_constant<bool,1>,0>,async::detail::fake_void>::run 
0x00007ffe2f82be3f (CesiumForUnityNative-Editor) [scheduler.h:134] async::task_run_handle::run 
0x00007ffe2f82bfeb (CesiumForUnityNative-Editor) [ImmediateScheduler.h:23] CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>::schedule 
0x00007ffe2f81fd2c (CesiumForUnityNative-Editor) [scheduler.h:165] async::detail::schedule_task<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler> > 
0x00007ffe2f81fc2f (CesiumForUnityNative-Editor) [task_base.h:101] async::detail::task_base::run_continuation<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler> > 
0x00007ffe2f850f81 (CesiumForUnityNative-Editor) [task_base.h:134] async::detail::task_base::add_continuation<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler> > 
0x00007ffe2f876e85 (CesiumForUnityNative-Editor) [task.h:83] async::detail::basic_task<std::exception_ptr>::then_internal<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,<lambda_03da5fcbac684505a4eda96ad2eee3d5>,async::task<std::exception_ptr> > 
0x00007ffe2f875132 (CesiumForUnityNative-Editor) [task.h:263] async::task<std::exception_ptr>::then<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,<lambda_03da5fcbac684505a4eda96ad2eee3d5> > 
0x00007ffe2fbba188 (CesiumForUnityNative-Editor) [CatchFunction.h:64] `CesiumAsync::CesiumImpl::CatchFunction<<lambda_63f7f162df8f18193c46c11eabce83d6>,void,CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<void> &&>::operator()'::`1'::catch$3 
0x00007ffeb7751080 (VCRUNTIME140_1D) 
0x00007ffeb7753aae (VCRUNTIME140_1D) _NLG_Return2
0x00007ffecb0d3c66 (ntdll) RtlCaptureContext2
0x00007ffe2f8609c5 (CesiumForUnityNative-Editor) [CatchFunction.h:51] CesiumAsync::CesiumImpl::CatchFunction<<lambda_63f7f162df8f18193c46c11eabce83d6>,void,CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<void> &&>::operator() 
0x00007ffe2f864df0 (CesiumForUnityNative-Editor) [traits.h:108] <lambda_a0ea2b3692842674a47817ce9b9d41be>::operator() 
0x00007ffe2f873015 (CesiumForUnityNative-Editor) [traits.h:97] async::detail::invoke_fake_void<<lambda_a0ea2b3692842674a47817ce9b9d41be>,void> 
0x00007ffe2f8725ed (CesiumForUnityNative-Editor) [traits.h:108] async::detail::invoke_fake_void<CesiumAsync::CesiumImpl::CatchFunction<<lambda_63f7f162df8f18193c46c11eabce83d6>,void,CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<void> &&>,async::task<void> > 
0x00007ffe2f862eba (CesiumForUnityNative-Editor) [task_base.h:581] async::detail::continuation_exec_func<async::detail::inline_scheduler_impl,async::task<void>,async::detail::fake_void,CesiumAsync::CesiumImpl::CatchFunction<<lambda_63f7f162df8f18193c46c11eabce83d6>,void,CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<void> &&>,std::integral_constant<bool,0>,1>::operator() 
0x00007ffe2f862ff9 (CesiumForUnityNative-Editor) [task_base.h:398] async::detail::task_func<async::detail::inline_scheduler_impl,async::detail::continuation_exec_func<async::detail::inline_scheduler_impl,async::task<void>,async::detail::fake_void,CesiumAsync::CesiumImpl::CatchFunction<<lambda_63f7f162df8f18193c46c11eabce83d6>,void,CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<void> &&>,std::integral_constant<bool,0>,1>,async::detail::fake_void>::run 
0x00007ffe2f82be3f (CesiumForUnityNative-Editor) [scheduler.h:134] async::task_run_handle::run 
0x00007ffe2f82c164 (CesiumForUnityNative-Editor) [scheduler.h:171] async::detail::inline_scheduler_impl::schedule 
0x00007ffe2f81fdc7 (CesiumForUnityNative-Editor) [scheduler.h:165] async::detail::schedule_task<async::detail::inline_scheduler_impl> 
0x00007ffe2f81fc9f (CesiumForUnityNative-Editor) [task_base.h:101] async::detail::task_base::run_continuation<async::detail::inline_scheduler_impl> 
0x00007ffe2f86309e (CesiumForUnityNative-Editor) [task_base.h:417] async::detail::task_func<async::detail::inline_scheduler_impl,async::detail::continuation_exec_func<async::detail::inline_scheduler_impl,async::task<void>,async::detail::fake_void,CesiumAsync::CesiumImpl::CatchFunction<<lambda_63f7f162df8f18193c46c11eabce83d6>,void,CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<void> &&>,std::integral_constant<bool,0>,1>,async::detail::fake_void>::schedule 
0x00007ffe2f82600b (CesiumForUnityNative-Editor) [task_base.h:115] <lambda_748db4bbc179da6db048344469bf4b84>::operator() 
0x00007ffe2f81e534 (CesiumForUnityNative-Editor) [continuation_vector.h:221] async::detail::continuation_vector::flush_and_lock<<lambda_748db4bbc179da6db048344469bf4b84> > 
0x00007ffe2f82bea4 (CesiumForUnityNative-Editor) [task_base.h:117] async::detail::task_base::run_continuations 
0x00007ffe2f829e90 (CesiumForUnityNative-Editor) [task_base.h:279] async::detail::task_result<async::detail::fake_void>::cancel_base 
0x00007ffe2f862cc7 (CesiumForUnityNative-Editor) [task_base.h:410] async::detail::task_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<CesiumIonClient::Response<CesiumIonClient::Profile> >,async::detail::fake_void,<lambda_76165e152eb91127c2bab6b71e390739>,std::integral_constant<bool,1>,0>,async::detail::fake_void>::cancel 
0x00007ffe2f862ab3 (CesiumForUnityNative-Editor) [task_base.h:548] async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<CesiumIonClient::Response<CesiumIonClient::Profile> >,async::detail::fake_void,<lambda_76165e152eb91127c2bab6b71e390739>,std::integral_constant<bool,1>,0>::operator() 
0x00007ffe2f862c79 (CesiumForUnityNative-Editor) [task_base.h:398] async::detail::task_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<CesiumIonClient::Response<CesiumIonClient::Profile> >,async::detail::fake_void,<lambda_76165e152eb91127c2bab6b71e390739>,std::integral_constant<bool,1>,0>,async::detail::fake_void>::run 
0x00007ffe2f82be3f (CesiumForUnityNative-Editor) [scheduler.h:134] async::task_run_handle::run 
0x00007ffe2f82bfeb (CesiumForUnityNative-Editor) [ImmediateScheduler.h:23] CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>::schedule 
0x00007ffe2f81fd2c (CesiumForUnityNative-Editor) [scheduler.h:165] async::detail::schedule_task<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler> > 
0x00007ffe2f81fc2f (CesiumForUnityNative-Editor) [task_base.h:101] async::detail::task_base::run_continuation<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler> > 
0x00007ffe2f862d1e (CesiumForUnityNative-Editor) [task_base.h:417] async::detail::task_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<CesiumIonClient::Response<CesiumIonClient::Profile> >,async::detail::fake_void,<lambda_76165e152eb91127c2bab6b71e390739>,std::integral_constant<bool,1>,0>,async::detail::fake_void>::schedule 
0x00007ffe2f82600b (CesiumForUnityNative-Editor) [task_base.h:115] <lambda_748db4bbc179da6db048344469bf4b84>::operator() 
0x00007ffe2f81e534 (CesiumForUnityNative-Editor) [continuation_vector.h:221] async::detail::continuation_vector::flush_and_lock<<lambda_748db4bbc179da6db048344469bf4b84> > 
0x00007ffe2f82bea4 (CesiumForUnityNative-Editor) [task_base.h:117] async::detail::task_base::run_continuations 
0x00007ffe2f9531c0 (CesiumForUnityNative-Editor) [task_base.h:279] async::detail::task_result<CesiumIonClient::Response<CesiumIonClient::Profile> >::cancel_base 
0x00007ffe2f8c82f9 (CesiumForUnityNative-Editor) [task_base.h:410] async::detail::task_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<std::shared_ptr<CesiumAsync::IAssetRequest> >,CesiumIonClient::Response<CesiumIonClient::Profile>,<lambda_5dedf0dce7adcf57697cfb093d21f5eb>,std::integral_constant<bool,1>,0>,CesiumIonClient::Response<CesiumIonClient::Profile> >::cancel 
0x00007ffe2f8c8088 (CesiumForUnityNative-Editor) [task_base.h:548] async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<std::shared_ptr<CesiumAsync::IAssetRequest> >,CesiumIonClient::Response<CesiumIonClient::Profile>,<lambda_5dedf0dce7adcf57697cfb093d21f5eb>,std::integral_constant<bool,1>,0>::operator() 
0x00007ffe2f8c82ab (CesiumForUnityNative-Editor) [task_base.h:398] async::detail::task_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::detail::continuation_exec_func<CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::QueuedScheduler>,async::task<std::shared_ptr<CesiumAsync::IAssetRequest> >,CesiumIonClient::Response<CesiumIonClient::Profile>,<lambda_5dedf0dce7adcf57697cfb093d21f5eb>,std::integral_constant<bool,1>,0>,CesiumIonClient::Response<CesiumIonClient::Profile> >::run 
0x00007ffe2f82be3f (CesiumForUnityNative-Editor) [scheduler.h:134] async::task_run_handle::run 
0x00007ffe2f9ab6a1 (CesiumForUnityNative-Editor) [scheduler.cpp:216] async::fifo_scheduler::try_run_one_task 
0x00007ffe2f9ab704 (CesiumForUnityNative-Editor) [scheduler.cpp:222] async::fifo_scheduler::run_all_tasks 
0x00007ffe2f97c12b (CesiumForUnityNative-Editor) [QueuedScheduler.cpp:11] CesiumAsync::CesiumImpl::QueuedScheduler::dispatchQueuedContinuations 
0x00007ffe2f97dbaf (CesiumForUnityNative-Editor) [AsyncSystem.cpp:16] CesiumAsync::AsyncSystem::dispatchMainThreadTasks 
0x00007ffe2f85ca3c (CesiumForUnityNative-Editor) [CesiumIonSessionImpl.cpp:305] CesiumForUnityNative::CesiumIonSessionImpl::Tick 
0x00007ffe2f834c64 (CesiumForUnityNative-Editor) [CesiumIonSession.cpp:298] DotNet_CesiumForUnity_CesiumIonSession_Tick 
0x000002a226a4360f (Mono JIT Code) (wrapper managed-to-native) CesiumForUnity.CesiumIonSession:DotNet_CesiumForUnity_CesiumIonSession_Tick (intptr,CesiumForUnity.CesiumIonSession/ImplementationHandle)
0x000002a226a433f3 (Mono JIT Code) [CesiumIonSession-generated.cs:233] CesiumForUnity.CesiumIonSession:Tick () 
0x000002a226a42f5b (Mono JIT Code) [CesiumEditorUtility.cs:26] CesiumForUnity.CesiumEditorUtility:UpdateIonSession () 
0x000002a226a41248 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
0x000002a22678d175 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007ffdb58afe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 
0x00007ffdb57ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke 
0x00007ffdb57ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke 
0x00007ff708ce7614 (Unity) scripting_method_invoke
0x00007ff708cc6eb4 (Unity) ScriptingInvocation::Invoke
0x00007ff708cc1ac5 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff708e17b6b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
0x00007ff709740662 (Unity) SceneTracker::Update
0x00007ff7098f0e1a (Unity) Application::TickTimer
0x00007ff709d3ff5a (Unity) MainMessageLoop
0x00007ff709d4480b (Unity) WinMain
0x00007ff70b0d20ce (Unity) __scrt_common_main_seh
0x00007ffeca0c257d (KERNEL32) BaseThreadInitThunk
0x00007ffecb08aa58 (ntdll) RtlUserThreadStart

Do you happen to know if you were modifying one of the ConfigureReinterop.cs files when this happened?

Reinterop creates a sort of hash of all of the interop functions so that it can detect when the C# code and the C++ code are out of sync. When they’re out of sync, attempting to call into C++ will just throw a managed exception, because proceeding would almost certainly crash hard. Stack corruption is common, for example. But it’s possible the hash isn’t capturing every aspect of the generated interop code, and so it’s failing to detect certain kinds of changes.

I’m not sure if that’s what you’re seeing here, though. It’s just a guess.

If I recall correctly, this was while editing other C# files - CesiumFlyToController being the one that comes to mind. I’ve noticed this crash seems to be proceeded by messages of A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details., which might be related.

I was able to find a more reliable way of producing this bug (use the editor script to set project build settings in this draft PR in cesium-unity-samples), so I was able to get it to happen in-debugger. The problem happens on line 266 of CesiumIonSessionImpl.cpp, the line this->_connection = std::move(*pConnection); The move assignment is causing a read access violation trying to move the _pSchedulers shared_ptr in AsyncSystem.

I believe the reason this bug happens in cesium-unity-samples is that the script will run when play mode begins, it will end play mode to make its changes when Ok is pressed, and then it will re-enter play mode once those changes are made. Somewhere in the steps of compiling, playing, compiling, and playing again, CesiumIonSessionImpl is trying to Resume a session that hasn’t been correctly initialized yet, causing a crash.

This crash happens to me often too. It even happens on editing unity scene that do not contains Cesium component.(Cesium tab was also closed)
Below is my crash report.

=================================================================
	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 CesiumForUnity.CesiumIonSession:DotNet_CesiumForUnity_CesiumIonSession_Tick <0x0017e>
	  at CesiumForUnity.CesiumIonSession:Tick <0x001a2>
	  at CesiumForUnity.CesiumEditorUtility:UpdateIonSession <0x0010a>
	  at UnityEditor.EditorApplication:Internal_CallUpdateFunctions <0x00327>
	  at System.Object:runtime_invoke_void <0x00184>
=================================================================
Received signal SIGSEGV
Obtained 60 stack frames
0x00007ffea52f1e3f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea54863f3 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fff7b8c1080 (VCRUNTIME140_1) 
0x00007fff7b8c2715 (VCRUNTIME140_1) _NLG_Return2
0x00007fff8e9d3c66 (ntdll) RtlCaptureContext2
0x00007ffea52f0e1b (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52eaa70 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52ea8b8 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e9224 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52ce730 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c83f6 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c8378 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e1585 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52ec151 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea5486c74 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fff7b8c1080 (VCRUNTIME140_1) 
0x00007fff7b8c2715 (VCRUNTIME140_1) _NLG_Return2
0x00007fff8e9d3c66 (ntdll) RtlCaptureContext2
0x00007ffea52f214a (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52eadfb (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52ea79d (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e76bf (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c8482 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c83b8 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e77cc (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52cca5f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c7c08 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e752c (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e73df (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52ce730 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c83f6 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c8378 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52e758c (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52cca5f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52c7c08 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea530ee0f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea530ec6c (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea54154a9 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea5415038 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea53682ae (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ffea52d33ba (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x000001dbe097ea6f (Mono JIT Code) (wrapper managed-to-native) CesiumForUnity.CesiumIonSession:DotNet_CesiumForUnity_CesiumIonSession_Tick (intptr,CesiumForUnity.CesiumIonSession/ImplementationHandle)
0x000001dbe097e853 (Mono JIT Code) CesiumForUnity.CesiumIonSession:Tick () (at ./Packages/com.cesium.unity/Editor/generated/Reinterop/Reinterop.RoslynSourceGenerator/CesiumIonSession-generated.cs:560)
0x000001dbe097e3bb (Mono JIT Code) CesiumForUnity.CesiumEditorUtility:UpdateIonSession () (at ./Packages/com.cesium.unity/Editor/CesiumEditorUtility.cs:26)
0x000001dbe097b7b8 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
0x000001dbdd0c3c95 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007fff0b9d4b7e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007fff0b90d204 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007fff0b90d37c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff6790b0ed4 (Unity) scripting_method_invoke
0x00007ff67908edc4 (Unity) ScriptingInvocation::Invoke
0x00007ff6790899d5 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff6791d734b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
0x00007ff679bd9bea (Unity) SceneTracker::Update
0x00007ff679cfe929 (Unity) Application::TickTimer
0x00007ff67a175a3a (Unity) MainMessageLoop
0x00007ff67a17b2d0 (Unity) WinMain
0x00007ff67b55a7be (Unity) __scrt_common_main_seh
0x00007fff8c77257d (KERNEL32) BaseThreadInitThunk
0x00007fff8e98aa58 (ntdll) RtlUserThreadStart

+1 also seeing this often

Exception: Unknown exception
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLogError_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.11.1/Editor/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:6463)
CesiumForUnity.CesiumIonSession:Tick () (at ./Library/PackageCache/com.cesium.unity@1.11.1/Editor/generated/Reinterop/Reinterop.RoslynSourceGenerator/CesiumIonSession-generated.cs:582)
CesiumForUnity.CesiumEditorUtility:UpdateIonSession () (at ./Library/PackageCache/com.cesium.unity@1.11.1/Editor/CesiumEditorUtility.cs:26)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

(Filename: ./Library/PackageCache/com.cesium.unity@1.11.1/Editor/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs Line: 6463)

Received signal SIGSEGV
Obtained 50 stack frames
0x00007fffb70393a7 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6fb32e0 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6fa6046 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ff8760f1c96 (ntdll) RtlCaptureContext2
0x00007fffb6dc4c43 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6dba7fe (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6dba4cd (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6db7a1d (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d9c260 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d95ea6 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d95e28 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6daf295 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6dbc7b7 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb703987d (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6fb32e0 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6fa6046 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007ff8760f1c96 (ntdll) RtlCaptureContext2
0x00007fffb6dc5321 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6dbae4b (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6db9dfd (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6db710f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d95f32 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d95e68 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6db721c (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d9a48f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6d956aa (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6db6f75 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6db6e7f (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6e46338 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6e46408 (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00007fffb6da0fca (CesiumForUnityNative-Editor) DotNet_CesiumForUnity_CesiumIonSession_Disconnect
0x00000222b38630af (Mono JIT Code) (wrapper managed-to-native) CesiumForUnity.CesiumIonSession:DotNet_CesiumForUnity_CesiumIonSession_Tick (intptr,CesiumForUnity.CesiumIonSession/ImplementationHandle)
0x00000222b3862e93 (Mono JIT Code) CesiumForUnity.CesiumIonSession:Tick () (at ./Library/PackageCache/com.cesium.unity@1.11.1/Editor/generated/Reinterop/Reinterop.RoslynSourceGenerator/CesiumIonSession-generated.cs:582)
0x00000222b38629fb (Mono JIT Code) CesiumForUnity.CesiumEditorUtility:UpdateIonSession () (at ./Library/PackageCache/com.cesium.unity@1.11.1/Editor/CesiumEditorUtility.cs:26)
0x00000222903b5af8 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
0x00000222b67b3865 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007fffb065e0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007fffb059eb74 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
0x00007fffb059ed0c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
0x00007ff66182a034 (Unity) scripting_method_invoke
0x00007ff661808254 (Unity) ScriptingInvocation::Invoke
0x00007ff661802ea5 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff66195239b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
0x00007ff662354a12 (Unity) SceneTracker::Update
0x00007ff662477019 (Unity) Application::TickTimer
0x00007ff6628ed97a (Unity) MainMessageLoop
0x00007ff6628f31e0 (Unity) WinMain
0x00007ff663cd765e (Unity) __scrt_common_main_seh
0x00007ff875c27374 (KERNEL32) BaseThreadInitThunk
0x00007ff87609cc91 (ntdll) RtlUserThreadStart

+1 me too,when i modify some c# code, and unity compiling,this may be happen.

This may very well be the same as a problem I recently fixed with this commit:

If so, I hope to get it included in the next release at the beginning of September.

1 Like