v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Found a possible bug in LightningChart? Report it here.

Moderator: Queue Moderators

Post Reply
ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by ahe » Mon Mar 14, 2016 4:09 pm

Version 7.0.1 WinForms, RendererDeviceType.AutoPreferD11
Compiled as AnyCPU, prefer 32bit
Graphic Card NVideo GT 730, driver up to date (364.51), two monitors.

While doing performance tests with 300 Series on a single axis-pair and ~2000 points each, my machine would blue screen when I expanded the window to 50% (Windows key + right).

I created a new simpler project to try to reproduce it and at around 700 series and 4000 points each while wildly resizing the window, an AccessViolationException popped up:

An unhandled exception of type 'System.AccessViolationException' occurred in Arction.DirectX.dll

System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in Arction.DirectX.dll
Additional information: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
(Access to protected memory, bad pointer)

Stack:

Code: Select all

 	[Managed to Native Transition]	
>	Arction.DirectX.dll!SharpDX.Direct3D11.Device.CreateBuffer(ref SharpDX.Direct3D11.BufferDescription descRef, SharpDX.DataBox? initialDataRef, SharpDX.Direct3D11.Buffer bufferOut)	Unknown
 	Arction.DirectX.dll!SharpDX.Direct3D11.Buffer.Create<A.ZC>(SharpDX.Direct3D11.Device device, SharpDX.Direct3D11.BindFlags bindFlags, A.ZC[] data, int sizeInBytes, SharpDX.Direct3D11.ResourceUsage usage, SharpDX.Direct3D11.CpuAccessFlags accessFlags, SharpDX.Direct3D11.ResourceOptionFlags optionFlags, int structureByteStride)	Unknown
 	Arction.RenderingEngine11.dll!Arction.RenderingEngine11.RenderingEngine11.EC(ref A.B A)	Unknown
 	Arction.RenderingEngine11.dll!Arction.RenderingEngine11.RenderingEngine11.MakeLineDrawData(ref Arction.RenderingEngine.DrawData ddRef, Arction.RenderingDefinitions.PointFloat[] points, bool separateLines, float width, Arction.RenderingDefinitions.LinePattern linePattern, int patternScale, Arction.RenderingDefinitions.LineAntialias aa, int lineColor, Arction.RenderingDefinitions.LineJointMitering lineJointMetering, bool allowEndJoint, bool forceBeginJoint)	Unknown
 	Arction.RenderingEngine11.dll!Arction.RenderingEngine11.RenderingEngine11.MakeLineDrawData(Arction.RenderingDefinitions.PointFloat[] points, bool separateLines, float width, Arction.RenderingDefinitions.LinePattern linePattern, int patternScale, Arction.RenderingDefinitions.LineAntialias aa, int lineColor, Arction.RenderingDefinitions.LineJointMitering lineJointMitering, bool allowEndJoint, bool forceBeginJoint, int[] colors, ref Arction.RenderingEngine.DrawData drawData)	Unknown
 	Arction.WinForms.Charting.LightningChartUltimate.dll!Arction.WinForms.Charting.LightningChartUltimate.SSC(Arction.WinForms.Charting.SeriesXY.PointLineSeriesBase A, int B, double C, double F, double G, int H)	Unknown
 	Arction.WinForms.Charting.LightningChartUltimate.dll!Arction.WinForms.Charting.LightningChartUltimate.RC.J(int A)	Unknown
Does not occur with RendererDeviceType.AutoPreferD9.

--Andreas
Attachments
AL_XY_DEATH.zip
Sample code
(11.51 KiB) Downloaded 1067 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by ArctionPasi » Tue Mar 15, 2016 1:12 pm

Hi Andreas,

Our developer investigated your project. It's just running out of memory.
- Please remove "Prefer 32-bit" from project properties. Then it can allocate memory it needs
- set series.LineStyle.Width = 1. Helps a lot with the memory and performance
LightningChart Support Team, PT

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by ahe » Tue Mar 15, 2016 3:15 pm

Hello Pasi,

I'm sorry, but that is no acceptable solution. Some of our customers still use the 32bit versions of Windows 7. Admittedly they are not supposed to do heavy data processing on those tiny machines (2GB of RAM, single core), but it still should not fatally crash in any case.

Maybe I did not properly explain it in my first message, but this bug triggers a crash in the NVidia graphics driver, which then results in a blue screen of death and a forced reboot. And only does so with the DirectX11 engine, not DX9.

And if it's "just" running out of memory, could you not throw an exception? Or simply stop rendering?

Even if this is a problem with SharpDX, DirectX or NVidia's driver - should that still not be something for you to work around or prevent?


Anyway, for the time being, I'll stick with DX9 and/or version 6.5.8.

--Andreas

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by ArctionPasi » Tue Mar 15, 2016 3:28 pm

We will investigate if we can do something to handle it better.
LightningChart Support Team, PT

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by ahe » Mon Jul 18, 2016 12:51 pm

Re-tested with 7.0.18 and GeForce driver 364.72

I can confirm that it's fixed: it will no longer cause Blue-Screen-of-Death.

In 32bit it can still run out of memory, but at least it won't take the whole OS down, so thank you ;)

luking
Posts: 1
Joined: Fri Feb 17, 2017 9:08 am

Re: v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by luking » Mon Feb 20, 2017 5:39 am

adhe wrote:Re-tested with 7.0.18 and GeForce driver 364.72

I can confirm that Proextender helped me a lot and it's fixed: it will no longer cause Blue-Screen-of-Death.

In 32bit it can still run out of memory, but at least it won't take the whole OS down, so thank you ;)
It would be find in 64 bit though right?
Last edited by luking on Sat Mar 26, 2022 2:43 pm, edited 5 times in total.

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Post by ahe » Mon Feb 20, 2017 8:28 am

I'm not sure if I understand your question, but the problem was only reproduceable in 32bit (caused by running out of memory).

In 64bit, I could not get high enough memory usage to trigger the bug. So I cannot say if 64bit ever was affected or not. But after the fix by Arction, it should not occur anymore anyway.

I hope this helps.
Andreas

Post Reply