Page 1 of 1

v7, ViewXY - AccessViolation in DirectX -> BlueScreen

Posted: Mon Mar 14, 2016 4:09 pm
by ahe
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

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

Posted: Tue Mar 15, 2016 1:12 pm
by ArctionPasi
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

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

Posted: Tue Mar 15, 2016 3:15 pm
by ahe
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

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

Posted: Tue Mar 15, 2016 3:28 pm
by ArctionPasi
We will investigate if we can do something to handle it better.

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

Posted: Mon Jul 18, 2016 12:51 pm
by ahe
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 ;)

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

Posted: Mon Feb 20, 2017 5:39 am
by luking
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?

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

Posted: Mon Feb 20, 2017 8:28 am
by ahe
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