Unhandled error on frame drawing causing engine reinitialization

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Hacke
Posts: 1
Joined: Wed Nov 29, 2023 9:39 am

Unhandled error on frame drawing causing engine reinitialization

Post by Hacke » Wed Nov 29, 2023 10:01 am

We are currently developing new software for our customers that uses LightningChart and until now we had no problems during development and on several PCs in our company.

However, when we installed the software on a OptiPlex Small Form Factor 7010 (the model we sell to our customers) to test it, this error appeared:
Arction.Wpf.Charting.ChartException
HResult=0x80131500
Message = Something caused the rendering engine to reinitialize.: Unhandled error on frame drawing causing engine reinitialization: HRESULT: [0x80004005], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unspecified error

Source = Arction.Wpf.Charting.LightningChart
Stack trace:
at Arction.Wpf.Charting.LightningChart.svefv(MessageSeverity xnlwb, MessageType xnlwc, Object xnlwd, String xnlwe, String xnlwf, Boolean xnlwg, Exception xnlwh)
at Arction.Wpf.Charting.LightningChart.sveaz()
at Arction.Wpf.Charting.LightningChart.svevd(Object xnlwb, RoutedEventArgs xnlwc)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

This exception was originally thrown at this call stack:
[External Code]

Inner Exception:
SharpDXException: HRESULT: [0x80004005], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unspecified error
After it occured I updated the Nuget packge to the newest stable version 10.5.1.1 but the errror is still the same.

Is there anything that I can do to fix this error?

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: Unhandled error on frame drawing causing engine reinitialization

Post by ArctionKestutis » Thu Nov 30, 2023 8:01 am

This is most likely graphic drivers problem. You can test/verify that by forcing LightningChart to use different DeviceType (that is different graphic drivers). To do that you should set
chart.(Chart)RenderOptions.DeviceType property to HardwareOnlyD11 (default from 'Auto'), HardwareOnlyD9 or SoftwareOnlyD11. In addition, chart.(Chart)RenderOptions.GPUPreference property allows to switch to different graphic hardware, if such is available.

It would be clear indication of graphic drivers problem, if you see difference between HardwareOnlyD11 and SoftwareOnlyD11. Rendering difference between HardwareOnlyD11 and HardwareOnlyD9 could be explained by other factors, but it is also very like drivers, if it is computer specific.

Unfortunately we are seeing a lot of reports lately about Intel integrated graphic problems. Some of them have been described for 11th-12th Gen. CPU (https://lightningchart.com/news/intel-1 ... rkarounds/ ). To my knowledge that should be fixed with latest drivers. However, we now starting to see new kind of issues with 13th Gen on Intel CPU graphics.

If you have such 'problematic' hardware, LightningChart will allow to circumvent with different DeviceType. However, I would would suggest to submit report to Intel about this bug to facilitate resolution (report could be submitted through 'Intel Graphics Command Center' application)?

Post Reply