System.AccessViolationException exception

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

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

System.AccessViolationException exception

Post by ehdrnsep » Thu Dec 15, 2016 7:30 am

I'm using 7.2.3 version.

I added chart.

Somtimes raised System.AccessViolationException exception in LightningChart ctor.

How to fix?


Graphic card name : Intel(R) HD Graphics 4600

Source : Action.DirectX

StackTrace :
위치: SharpDX.Direct3D11.D3D11.D3D11CreateDevice_(Void* arg0, Int32 arg1, Void* arg2, Int32 arg3, Void* arg4, Int32 arg5, Int32 arg6, Void* arg7, Void* arg8, Void* arg9)
위치: SharpDX.Direct3D11.D3D11.CreateDevice(Adapter adapterRef, DriverType driverType, IntPtr software, DeviceCreationFlags flags, FeatureLevel[] featureLevelsRef, Int32 featureLevels, Int32 sDKVersion, Device deviceOut, FeatureLevel& featureLevelRef, DeviceContext& immediateContextOut)
위치: SharpDX.Direct3D11.Device.CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
위치: SharpDX.Direct3D11.Device..ctor(Adapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
위치: Arction.RenderingEngine11.RenderingEngine11.Initialize(Object parentControl, UInt32& antiAliasFactor, Boolean waitForVSync, Boolean forceDeviceCreateOnResize, DeviceType deviceType, Boolean designMode, Boolean wpfControl, SizeF sizeDPIFactor, Boolean DpiAware, FontsRenderingQuality fontQuality, GPUPreference gpuPreference, Boolean D2DEnabled)
위치: Arction.WinForms.Charting.LightningChartUltimate.LOC()
위치: Arction.WinForms.Charting.LightningChartUltimate.GYB(RenderingSettings A)
위치: Arction.WinForms.Charting.LightningChartUltimate..ctor(String licenseKey)
위치: TLMAnalysis.Shark.View.Controls.LineChart..ctor(String licenseKey, Control parent, Double xRange) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\Chart\LineChart.cs:줄 213
위치: TLMAnalysis.Shark.View.Controls.LineChartControl.CreateChart(Control parent, Double xRange) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\Chart\LineChartControl.cs:줄 249
위치: TLMAnalysis.Shark.View.Controls.LineChartControl.InitChart(IDragAndDrop dragAndDrop) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\Chart\LineChartControl.cs:줄 222
위치: TLMAnalysis.Shark.View.Controls.LineChartControl.Init(IDragAndDrop dragAndDrop) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\Chart\LineChartControl.cs:줄 125
위치: TLMAnalysis.Shark.View.Controls.LineChartControl..ctor(IDragAndDrop dragAndDrop) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\Chart\LineChartControl.cs:줄 116
위치: TLMAnalysis.Shark.View.Controls.RealControlFactory.Create(ControlInfo ctlInfo) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\RealControlFactory.cs:줄 133
위치: TLMAnalysis.Shark.View.Controls.RealControlFactory.Create(ControlType controlType, Point location) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\Realtime\RealControlFactory.cs:줄 62
위치: TLMAnalysis.Shark.View.TabView.CreateControl(ControlType controlType, Point location) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\TabView.cs:줄 327
위치: TLMAnalysis.Shark.View.TabView.DrawPanel_DragDrop(Object sender, DragEventArgs e) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\Controls\TabView.cs:줄 305
위치: System.Windows.Forms.Control.OnDragDrop(DragEventArgs drgevent)
위치: System.Windows.Forms.DropTarget.System.Windows.Forms.UnsafeNativeMethods.IOleDropTarget.OleDrop(Object pDataObj, Int32 grfKeyState, POINTSTRUCT pt, Int32& pdwEffect)
위치: System.Windows.Forms.SafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
위치: System.Windows.Forms.Control.DoDragDrop(Object data, DragDropEffects allowedEffects)
위치: TLMAnalysis.Shark.View.UserControls.ToolboxView.navBarControl1_MouseMove(Object sender, MouseEventArgs e) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\View\UserControls\ToolboxView.cs:줄 148
위치: System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
위치: System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
위치: DevExpress.XtraNavBar.NavBarControl.OnMouseMove(MouseEventArgs ev)
위치: System.Windows.Forms.Control.WmMouseMove(Message& m)
위치: System.Windows.Forms.Control.WndProc(Message& m)
위치: DevExpress.XtraNavBar.NavBarControl.WndProc(Message& m)
위치: System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
위치: System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
위치: System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
위치: System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
위치: System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
위치: TLMAnalysis.Program.Main(String[] arg) 파일 D:\Project\NX\trunk\Source\TLMAnalysisSoftwareDevelopment\TLMAnalysis.Shark\Program.cs:줄 46
위치: System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
위치: System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
위치: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
위치: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
위치: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
위치: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
위치: System.Threading.ThreadHelper.ThreadStart()
Attachments
window event log
window event log
2.png (9.91 KiB) Viewed 12123 times
1.png
1.png (46.56 KiB) Viewed 12123 times

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

Re: System.AccessViolationException exception

Post by ArctionPasi » Thu Dec 15, 2016 1:45 pm

Hello :-)

the GPU is probably running out of graphics resources and therefore causing exception like this.

Please run your application in 64-bit mode (Any CPU) in 64-bit Windows, then it can use more memory.

The chart count in integrated Intel machines can be quite low, like 10. In real GPUs with AMD and Nvidia, it can be > 100.
LightningChart Support Team, PT

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

Re: System.AccessViolationException exception

Post by ehdrnsep » Fri Dec 16, 2016 12:37 am

I'm alreadey run anycpu. ^^:
I did process exception.

Code: Select all

[HandleProcessCorruptedStateExceptionsAttribute()]
public static LightningChartUltimate CreateChart()
{
    try
    {
        return new LightningChartUltimate(ChartLicenseManager.ChartLicenseKey);
    }
    catch (Exception)
    {
         throw new OutOfMemoryException("gpu memory overflow");
    }
}
Thank you for answer!

Post Reply