EvergineTeam / Feedback

Feedback, feature requests, and bug reports for Evergine.
https://evergine.com
14 stars 1 forks source link

Random crash on WinUI3 #185

Open SpawnSP2 opened 7 months ago

SpawnSP2 commented 7 months ago

Hi all!

I've created a test app with a custom component that creates a 3D model of a shelf given some parameters (size and informational properties). When you add this component to an empty entity (with only a main Transform3D), it automatically adds 5 primitives and positions and scales them for the legs and the shelf itself.

This component works OK, but on the "WinUI" project it crashes randomly after some time moving the camera around or clicking with the mouse. It doesn't crash on the "Windows" version, using WinForms.

Here is the exception that is thrown:

error

And the output on Visual Studio:

Excepción producida en 0x00007FFAB1034D8C (KernelBase.dll) en MyEvergineProject.WinUI.exe: WinRT originate error - 0x80000013 : 'The given object has already been closed / disposed and may no longer be used.'. onecoreuap\windows\moderncore\inputv2\inputhost\components\dragdrop\lib\closeableobject.cpp(31)\Microsoft.UI.Input.dll!00007FFA21A11801: (caller: 00007FFA21A11686) ReturnHr(2) tid(66f8) 80000013 Se cerró el objeto. Profiler was prevented from loading notification profiler due to app settings. Process ID (decimal): 23732. Message ID: [0x2509]. onecoreuap\windows\moderncore\inputv2\inputhost\outside\lifted\contentappwindowbridge.cpp(1109)\Microsoft.UI.Input.dll!00007FFA219A19BF: (caller: 00007FFA219D278F) ReturnHr(1) tid(3408) 800705B5 Manipulador de monitor no válido. onecoreuap\windows\moderncore\inputv2\inputhost\outside\lifted\contentappwindowbridge.cpp(831)\Microsoft.UI.Input.dll!00007FFA219D27AC: (caller: 00007FFA219D20C5) LogHr(1) tid(3408) 800705B5 Manipulador de monitor no válido. clientcore\windows\advcore\ctf\uim\tim.cpp(800)\msctf.dll!00007FFAB15E65D9: (caller: 00007FFAB15E720C) LogHr(1) tid(3408) 8007029C Error de aserción. clientcore\windows\advcore\ctf\uim\tim.cpp(800)\msctf.dll!00007FFAB15E65D9: (caller: 00007FFAB15E720C) LogHr(2) tid(3408) 8007029C Error de aserción. Microsoft.ui.xaml.dll!00007FFA32638CF2: 80070057 - E_INVALIDARG Microsoft.ui.xaml.dll!00007FFA32638CF2: 80070057 - E_INVALIDARG Microsoft.ui.xaml.dll!00007FFA32638CF2: 80070057 - E_INVALIDARG onecoreuap\windows\frameworkudk\warppal.cpp(783)\Microsoft.Internal.FrameworkUdk.dll!00007FFA4E7A7BC3: (caller: 00007FFA4E7A946D) ReturnHr(1) tid(3408) 80004002 Interfaz no compatible onecoreuap\windows\frameworkudk\warppal.cpp(783)\Microsoft.Internal.FrameworkUdk.dll!00007FFA4E7A7BC3: (caller: 00007FFA4E7A946D) ReturnHr(2) tid(3408) 80004002 Interfaz no compatible Excepción producida en 0x00007FFAB1034D8C en MyEvergineProject.WinUI.exe: excepción de Microsoft C++: EEFileLoadException en la ubicación de la memoria 0x000000C92D378870. Excepción producida en 0x00007FFAB1034D8C en MyEvergineProject.WinUI.exe: excepción de Microsoft C++: [rethrow] en la ubicación de la memoria 0x0000000000000000. Excepción producida en 0x00007FFAB1034D8C en MyEvergineProject.WinUI.exe: excepción de Microsoft C++: EEFileLoadException en la ubicación de la memoria 0x000000C92D378870. Excepción producida en 0x00007FFAB1034D8C en MyEvergineProject.WinUI.exe: excepción de Microsoft C++: [rethrow] en la ubicación de la memoria 0x0000000000000000. Excepción producida en 0x00007FFAB1034D8C en MyEvergineProject.WinUI.exe: excepción de Microsoft C++: EEFileLoadException en la ubicación de la memoria 0x000000C92D378870. MyEvergineProject.WinUI Information: 0 : The assembly Evergine.Assets can not be loaded to find IAssetImporter types. [192,00ms] Shader compiled id: df2ab68e-2005-4a33-af58-1f9bcf68fe27 pass: Default directives: [91,00ms] Shader compiled id: dfb5efbf-33e9-4b56-836d-cb8ca4ca0c80 pass: Default directives: [33,00ms] Shader compiled id: daa1f60a-82ad-40fc-8fbb-7b85caa6de0a pass: ShadowMap directives: DIFF [32,00ms] Shader compiled id: daa1f60a-82ad-40fc-8fbb-7b85caa6de0a pass: ShadowMap directives: [14,00ms] Shader compiled id: d551eb2b-202d-454d-a059-c3ddce284636 pass: Default directives: SUNDISK [53,00ms] Shader compiled id: daa1f60a-82ad-40fc-8fbb-7b85caa6de0a pass: ZPrePass directives: DIFF,MT_RG_TEXTURED,NORMAL [226,00ms] Shader compiled id: daa1f60a-82ad-40fc-8fbb-7b85caa6de0a pass: Default directives: AO,DIFF,IBL,LIT,MT_RG_TEXTURED,NORMAL,SHADOW_SUPPORTED,SHADOWFILTER3 [44,00ms] Shader compiled id: daa1f60a-82ad-40fc-8fbb-7b85caa6de0a pass: ZPrePass directives: [201,00ms] Shader compiled id: daa1f60a-82ad-40fc-8fbb-7b85caa6de0a pass: Default directives: IBL,LIT,SHADOW_SUPPORTED,SHADOWFILTER3 [31,00ms] Shader compiled id: e6a559e1-c8f7-4729-b36d-85a2ecb63ad5 pass: Default directives: [2,00ms] Shader compiled id: 71506dd4-43b7-4e35-8d0c-a16cc7237083 pass: Default directives: None_OFF [10,00ms] Shader compiled id: ed92c3b2-44a0-4592-8d8e-e48ca4de92e4 pass: Default directives: [5,00ms] Shader compiled id: f5e59513-0d6f-4051-9331-586ccd951ef3 pass: Default directives: [6,00ms] Shader compiled id: c0529ee7-8b51-45f2-aa39-8167614dc8af pass: Default directives: CHRO,FILMIC,HDR,VIG [58,00ms] Shader compiled id: d5577c1c-52e0-4071-a1bd-928339880bc3 pass: Default directives: [5,00ms] Shader compiled id: d743adde-eb54-4f0b-8bc3-e431a34f762d pass: Default directives: [15,00ms] Shader compiled id: d7cba48c-3058-4386-9a0a-27bf8925bfaf pass: Default directives: Microsoft.ui.xaml.dll!00007FFA31DBC20D: 80070057 - E_INVALIDARG onecoreuap\windows\frameworkudk\warppal.cpp(783)\Microsoft.Internal.FrameworkUdk.dll!00007FFA4E7A7BC3: (caller: 00007FFA4E7A946D) ReturnHr(3) tid(4ec0) 80004002 Interfaz no compatible Excepción producida en 0x00007FFAB1034D8C (KernelBase.dll) en MyEvergineProject.WinUI.exe: WinRT originate error - 0x80004005 : 'Reentrancy was detected in this XAML application. Use a debugger to locate the reentrant code and, if necessary, move that code to an asynchronous event handler. Press OK to exit the application.'. Microsoft.ui.xaml.dll!00007FFA31E90DF7: 8000FFFF - E_UNEXPECTED

Only the last line appears when the exception is thrown. Previous lines appear when just running the app.

Thanks in advance!

mfmeisinger commented 6 months ago

Same to me! Crashes "randomly" after some time with mouse actions involved while scene is active on WinUI To be more precise: it crashes "always" just after a random time period!

The exception 0xc000027b occurs in a Monitor.Wait(...) call inside application.DrawFrame(...):

image

Due to Microsoft Docs Monitor.Wait(...) will raise an exception if realMillisecondsTimeout param is -1 and that's the case! The booring about this exception is that I can't catch it :-/ ?