Size change Exception

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Lawrence_Jung
Posts: 14
Joined: Mon Jul 03, 2017 8:43 am

Size change Exception

Post by Lawrence_Jung » Mon Dec 11, 2017 4:52 am

hello
I have some Error

i use this
OS : Windows10 x64, GPU : GeForce 840M, ChartVersion : 8.2.1.4001
VisualStudio 2017, X86 build(User want x86 program)


When I change the Chart Size. Then My Chart Have to Exception message In thread loop

Exception log is this
'System.AccessViolationException'(Arction.DirectX.dll)

'SharpDX.SharpDXException'(Arction.DirectX.dll)
HREsult : 0x887A0001
Modul: ShartDX.DXGI
APICode : DXGI_ERROR_INVALID_CALL/InvalidCall

I need help...

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

Re: Size change Exception

Post by ArctionKestutis » Mon Dec 11, 2017 10:34 am

Hello,

If you using multiple thread, please note that LightningChart updates must be done in UI thread. We don't guarantee operation otherwise. That is the way in WinForms and WPF, practically for all UI controls. All UI stuff must be updated in UI thread, otherwise the application is prone to crashing or doing all kind funny stuff.
In Winforms, use Control.Invoke(), in WPF, use Dispatcher.Invoke() - to execute the specified delegate synchronously on the main thread. Modification of Chart’s properties, data collection/calculation could be done in other Threads.

Therefore, Chart.EndUpdate() MUST be called in UI thread. At least the one that actually renders it (no other pending BeginUpdates). Otherwise the DirectX rendering itself can't work, and it will crash the chart or even the whole system.

If it is not UI thread problem, we would need full stacktrace and whole app (whenever it is possible) send to Arction's support account.

All the best.

Lawrence_Jung
Posts: 14
Joined: Mon Jul 03, 2017 8:43 am

Re: Size change Exception

Post by Lawrence_Jung » Tue Dec 12, 2017 6:12 am

Hi, Kesturis

now, I do check up the Ui thread

thanks for your reply.

Best regards,

Lawrence Jung

Lawrence_Jung
Posts: 14
Joined: Mon Jul 03, 2017 8:43 am

Re: Size change Exception

Post by Lawrence_Jung » Tue Dec 12, 2017 12:30 pm

Hi, Kesturis

I am clear the error

Thanks for your help.

Best regards,

Lawrence Jung

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

Re: Size change Exception

Post by ArctionKestutis » Tue Dec 12, 2017 3:30 pm

You are welcome!

Post Reply