System.AccessViolationException

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

ehdrnsep
Posts: 48
Joined: Mon Jan 12, 2015 6:52 am

System.AccessViolationException

Post by ehdrnsep » Thu Apr 27, 2017 4:13 am

Hello.
My program referred to v7.2.4 LightningChart.
When redrawing the chart, an AccessViolationException occurred in client computer.
Client computer graphic card is Radeon HD 7690M...... :oops:
Is it a problem because the graphics card is not good?

예외 정보:System.AccessViolationException
위치: SharpDX.Direct3D9.Device.DrawPrimitiveUP(SharpDX.Direct3D9.PrimitiveType, Int32, IntPtr, Int32)
위치: SharpDX.Direct3D9.Device.DrawUserPrimitives[[A.CD, Arction.RenderingEngine9, Version=7.2.4.4003, Culture=neutral, PublicKeyToken=6484d7bb14b95dd3]](SharpDX.Direct3D9.PrimitiveType, Int32, Int32, A.CD[])
위치: Arction.RenderingEngine9.RenderingEngine9.SB[[A.CD, Arction.RenderingEngine9, Version=7.2.4.4003, Culture=neutral, PublicKeyToken=6484d7bb14b95dd3]](SharpDX.Direct3D9.PrimitiveType, A.CD[])
위치: Arction.RenderingEngine9.RenderingEngine9.DrawWithDrawData(Arction.RenderingEngine.DrawData)
위치: Arction.WinForms.Charting.LightningChartUltimate.KUC(Boolean, Boolean)
위치: Arction.WinForms.Charting.LightningChartUltimate.NSC()
위치: Arction.WinForms.Charting.LightningChartUltimate.QLC()
위치: Arction.WinForms.Charting.LightningChartUltimate.LLC()
위치: Arction.WinForms.Charting.LightningChartUltimate.EndUpdate()
위치: TLMAnalysis.Shark.View.Controls.LineChart.ReDraw()
위치: TLMAnalysis.Shark.View.Controls.Realtime.TableLineChartControl.RefreshControl()
위치: TLMAnalysis.Shark.View.TabView.<timerReDrawChart_Tick>b__70_0()

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

Re: System.AccessViolationException

Post by ArctionKestutis » Thu Apr 27, 2017 2:31 pm

Hello,

Is this comes from real device or Virtual Machine?
We seen several reports like this, and current hypothesis that something is not right with graphic drivers. The crash comes from drawing xAxis. Somehow drawing rectangle and primitive type causes the exception. We know that some graphics cards (e.g. Intel) don’t support Dx9 LineListPrimitives type. The easiest solution is change RenderingDevice type to HardwareOnly11

Code: Select all

chart.ChartRenderOptions.DeviceType = RendererDeviceType.HardwareOnly11;
Radeon HD 7690M support DirectX11. In addition, setting the DeviceType to SotwareOnly11 should also remove exception.

In any case it will not harm if you update you adapter drivers.

If you want further investigation please send DxDiag (DirectX Diagnostic Tool) output from that system and application (if possible) to Arction's support email.

All the best.

ehdrnsep
Posts: 48
Joined: Mon Jan 12, 2015 6:52 am

Re: System.AccessViolationException

Post by ehdrnsep » Fri Apr 28, 2017 12:38 am

Customer computer is actual device.
I will try to get the customer DxDiag output.

I am using DirectX9 for performance reasons.
Does DirectX 11 never cause this kind of problem?

And is there a recommended graphics card?
For example, it should be higher than nvidia gtx660.

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

Re: System.AccessViolationException

Post by ArctionKestutis » Fri Apr 28, 2017 8:31 am

This kind of problem is/was difficult to reproduce. From three report it is difficult to draw conclusions. It is not about particular graphic card. It is more about overall machine settings/drivers. We are incline to think that type of exception come due to DirectX PrimitiveType or VertexType not supported in particular device. Therefore, we recommend keeping Display Devices drivers up to date.
Switching to DirectX 11 helped in one case, still waiting for feedback from another report.

LightningChart has fallback to DirectX11/DirectX10 WARP software rendering when GPU is not accessible. Therefore, graphics card is not absolutely required. However, better graphic card, better performance. What kind of resources is essential depend on your app. Please do some profiling, e.g. run "Process Explorer" (https://technet.microsoft.com/en-us/sys ... lorer.aspx ) for reading usage of GPU, CPU, memory. This will give you approximate answer how target machine should looks like.