Page 1 of 1

LightningChart logic hangs UI on virual machine

Posted: Wed Apr 07, 2021 9:35 am
by ArtemK
Hello,
I have a problem with the application UI freezing when drawing LightningChart control.
It is a WPF application but a chart of Windows Forms controls.
This problem is reproducible only on a virtual machine. At the moment of hangning, the debug shows that several streams of the LightningChart are currently working.
The existing information is vague, but is there any suspicion of a possible problem. Any additional information I could provide?

Re: LightningChart logic hangs UI on virual machine

Posted: Thu Apr 08, 2021 6:35 am
by ArctionKestutis
There is nothing special about virtual machine, which should prevent LightingChart running on it. Unless machine configured not to use accelerated GPU, low on memory or have no DirectX (at least 9.0c) support.
Your image suggest that you may have thread problem. Please make sure that all Chart’s properties updated in the Main UI Thread. LightningChart requires that all the Chart properties should be updated in Main UI Thread. LightningChart should be updated in the Main Thread, as for the most UI controls. When using a background thread in the application, all UI updates from the thread must go through Invoke (Control.Invoke() in WinForms, and Dispatcher.Invoke() in WPF). If chart is not updated in Main Thread user may get very random and unexpected results (including crashes and access violation).

Hope this helps.