WPF crashed unexpectedly.
Description
WPF crashed unexpectedly.
UI stack trace:
Insufficient memory to continue the execution of the program. at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam) at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Reproduction Steps
TBU
Expected behavior
TBU
Actual behavior
TBU
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
.NET Framework 4.6.2 (32-bit) Windows 11
Other information
No response
#439
I am able to reproduce the problem consistently.
Based on https://learn.microsoft.com/en-us/troubleshoot/developer/dotnet/framework/general/wpf-render-thread-failures,
- Updated machine's registry - https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/graphics-rendering-registry-settings#disable-hardware-acceleration-option
- Run WPF application and still see similar stack trace.
What other information is needed for detail troubleshooting and workable fixes? @SamBent
@ET-KK How about use the debug version wpf and add the breakpoint to MilInstrumentationCallHRCheckFunction when dwFailureFlags be true:
https://github.com/dotnet/wpf/blob/ee7cbb82652173e3a9f4e8feec155eb58eed5f4f/src/Microsoft.DotNet.Wpf/src/WpfGfx/shared/util/UtilLib/Instrumentation.h#L130
And the system log may record some information.
@ET-KK How about use the debug version wpf and add the breakpoint to MilInstrumentationCallHRCheckFunction when dwFailureFlags be true:
wpf/src/Microsoft.DotNet.Wpf/src/WpfGfx/shared/util/UtilLib/Instrumentation.h
Line 130 in ee7cbb8
MilInstrumentationCallHRCheckFunction( And the system log may record some information.
@lindexi , I don't have the source code. Will full dump file able to help and trace the problems?
@ET-KK
Will full dump file able to help and trace the problems?
I do not think so. Because I do not think you can take the right dump, and I think you will capture the state after the exception occurs.
Because the C# exception raise by the HR value return. And when the HR value return, it means that the state is after the exception occurs.
@ET-KK How about use the debug version wpf and add the breakpoint to MilInstrumentationCallHRCheckFunction when dwFailureFlags be true:
wpf/src/Microsoft.DotNet.Wpf/src/WpfGfx/shared/util/UtilLib/Instrumentation.h
Line 130 in ee7cbb8
MilInstrumentationCallHRCheckFunction( And the system log may record some information.
@lindexi ,
- Is the WPF (debug version) equivalent with .Net Framework 4.6.2 ?
- Please advise some sample of system log.
@ET-KK
Is the WPF (debug version) equivalent with .Net Framework 4.6.2 ?
No.
Please advise some sample of system log.
You should not get the samle of my system log, and you should take your device system log when application crash.
How to look the system log?
See: https://www.dell.com/support/kbdoc/en-us/000124382/how-to-export-windows-event-logs
Is the WPF (debug version) equivalent with .Net Framework 4.6.2 ?
@lindexi , If I manage to find the source code, which breakdown / debugging steps I should follow ?
No.
Please advise some sample of system log.
You should not get the samle of my system log, and you should take your device system log when application crash.
How to look the system log?
See: https://www.dell.com/support/kbdoc/en-us/000124382/how-to-export-windows-event-logs
@lindexi , which event name/type I should focus on ?
@ET-KK All the relevant information you can obtain. Not only the System Windows logs.
@ET-KK All the relevant information you can obtain. Not only the
SystemWindows logs.
I not able and should not provide the full event logs, any chance to only provide filtered / lightweight events log ?