View Issue Details

IDProjectCategoryView StatusLast Update
0002792NoesisGUIC# SDKpublic2024-06-03 20:01
Reporterstonstad Assigned Tosfernandez  
PrioritynormalSeveritycrash 
Status resolvedResolutionno change required 
Product Version3.2.2 
Target Version3.2.4Fixed in Version3.2.4 
Summary0002792: Noesis Crashes Unity during App Domain Unload
Description

After editing XAML and alt-tabbing back to the Unity editor, Noesis crashes the editor during app domain unload.

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

  at <unknown> <0xffffffff>
  at Noesis.NoesisGUI_PINVOKE:BaseComponent_Release <0x000db>
  at Noesis.BaseComponent:Release <0x00082>
  at Noesis.Extend:ReleasePending <0x00212>
  at Noesis.Extend:Shutdown <0x00c82>
  at Noesis.Extend:OnDomainUnload <0x00082>
  at <Module>:invoke_void_object_EventArgs <0x002d4>
  at System.AppDomain:DoDomainUnload <0x00099>
  at System.Object:runtime_invoke_void__this__ <0x00187>

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

Steps To Reproduce

========== OUTPUTTING STACK TRACE ==================

0x00007FFE63B3DECB (Noesis) InertiaExpansionBehavior_DesiredExpansion_get
0x00007FFE63B3DF25 (Noesis) InertiaExpansionBehavior_DesiredExpansion_get
0x00007FFE63B3AC82 (Noesis) InertiaExpansionBehavior_DesiredExpansion_get
0x00007FFE63B30AD1 (Noesis) Boxed_Point_GetStaticType
0x00007FFE63B30CA4 (Noesis) Boxed_Point_GetStaticType
0x00007FFE639A2493 (Noesis) BaseComponent_GetStaticType
0x000001EC75C0C9DC (Mono JIT Code) (wrapper managed-to-native) Noesis.NoesisGUI_PINVOKE:BaseComponent_Release (intptr)
0x000001EC75C0C883 (Mono JIT Code) [D:\Source\StellarConquest\StellarConquest.Utilities\Noesis\3.2.2\Runtime\API\Proxies\BaseComponent.cs:62] Noesis.BaseComponent:Release (intptr)
0x000001ECBEABE343 (Mono JIT Code) [D:\Source\StellarConquest\StellarConquest.Utilities\Noesis\3.2.2\Runtime\API\Core\Extend.cs:6110] Noesis.Extend:ReleasePending ()
0x000001EC71CF1B43 (Mono JIT Code) [D:\Source\StellarConquest\StellarConquest.Utilities\Noesis\3.2.2\Runtime\API\Core\Extend.cs:83] Noesis.Extend:Shutdown ()
0x000001EC71CF04D3 (Mono JIT Code) [D:\Source\StellarConquest\StellarConquest.Utilities\Noesis\3.2.2\Runtime\API\Core\Extend.cs:36] Noesis.Extend:OnDomainUnload (object,System.EventArgs)
0x000001EC71CEF435 (Mono JIT Code) (wrapper delegate-invoke) <Module>:invoke_void_object_EventArgs (object,System.EventArgs)
0x000001EC71CEF0FA (Mono JIT Code) System.AppDomain:DoDomainUnload ()
0x000001EC6621B658 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_voidthis (object,intptr,intptr,intptr)
0x00007FFE63064B6E (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\mini\mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007FFE62F9D204 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:3066] do_runtime_invoke
0x00007FFE62E746D5 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\appdomain.c:3485] mono_domain_try_unload
0x00007FFE6304DF1A (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\unity-utils.c:765] mono_unity_domain_unload
0x00007FF685524910 (Unity) UnloadDomain
0x00007FF68551487B (Unity) MonoManager::CreateAndSetChildDomain
0x00007FF6855133EC (Unity) MonoManager::BeginReloadAssembly
0x00007FF68551E4A8 (Unity) MonoManager::ReloadAssembly
0x00007FF6864BA3CD (Unity) Internal_ADB_Only_ReloadAllUsedAssemblies
0x00007FF68697091A (Unity) DomainReloadIfAllowed
0x00007FF68696EA6B (Unity) CompileAndDomainReload
0x00007FF68698D602 (Unity) RefreshInternalV2
0x00007FF68699585F (Unity) StopAssetImportingV2Internal
0x00007FF68698F2BC (Unity) RefreshV2
0x00007FF6869033F0 (Unity) AssetDatabase::Refresh
0x00007FF68618A31B (Unity) Application::AutoRefresh
0x00007FF68663B153 (Unity) ContainerWindow::ContainerWndProc
0x00007FFFCBFC8241 (USER32) DispatchMessageW
0x00007FFFCBFC7EFC (USER32) DispatchMessageW
0x00007FFFCBFD302D (USER32) GetClassLongW
0x00007FFFCDFD3434 (ntdll) KiUserCallbackDispatcher
0x00007FFFCB4214D4 (win32u) NtUserPeekMessage
0x00007FFFCBFD1B4F (USER32) PeekMessageW
0x00007FFFCBFD1A1C (USER32) PeekMessageW
0x00007FFE572FA084 (gameoverlayrenderer64) OverlayHookD3D3
0x00007FF6866174AD (Unity) MainMessageLoop
0x00007FF68661D170 (Unity) WinMain
0x00007FF687A003EE (Unity) __scrt_common_main_seh
0x00007FFFCBD2257D (KERNEL32) BaseThreadInitThunk
0x00007FFFCDF8AA78 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

PlatformAny

Activities

stonstad

stonstad

2023-10-30 05:39

reporter   ~0008898

This is user error, I think. I was disposing a Noesis control -- and disposing it is not necessary.

stonstad

stonstad

2023-10-30 16:23

reporter   ~0008905

The stack traces and dumps are in the zip file, if it is useful to you.

stonstad

stonstad

2023-10-30 17:43

reporter   ~0008909

This behavior is now mitigated by NOT calling Dispose on the static singleton instance of a Noesis user control during Unity Editor OnDestroy. It is assigned null, and not disposed and this works fine. Can you confirm this is the correct approach? Otherwise, this is a candidate for closure.

sfernandez

sfernandez

2024-06-03 20:00

manager   ~0009621

Yes, you shouldn't call Dispose on Noesis controls, setting the variable to null is the correct solution.
Closing this.

Issue History

Date Modified Username Field Change
2023-10-30 05:24 stonstad New Issue
2023-10-30 05:39 stonstad Note Added: 0008898
2023-10-30 11:12 sfernandez Assigned To => sfernandez
2023-10-30 11:12 sfernandez Status new => assigned
2023-10-30 11:12 sfernandez Target Version => 3.2.3
2023-10-30 16:23 stonstad Note Added: 0008905
2023-10-30 17:43 stonstad Note Added: 0008909
2024-01-22 11:47 sfernandez Target Version 3.2.3 => 3.2.4
2024-06-03 20:00 sfernandez Status assigned => resolved
2024-06-03 20:00 sfernandez Resolution open => fixed
2024-06-03 20:00 sfernandez Note Added: 0009621
2024-06-03 20:01 sfernandez Resolution fixed => no change required
2024-06-03 20:01 sfernandez Fixed in Version => 3.2.4