Nevron Forum

ArgumentException

https://www.nevron.com/Forum/Topic4817.aspx

By Sachin Karadgi - Tuesday, February 1, 2011

Hello,

 

I am using Nevron charts (Nevron 2009 Vol 1 VS2008) in my application.  Nowadays the application crashes due to “ArgumentException”. I tried to handle the exception in my code (i.e. catch(ArgumentException)), but unsuccessful.

 

Following are the additional information about the exception:

 

DATA: {System.Collections.ListDictionaryInternal}

MESSAGE: Parameter is not valid.

STACK TRACE:

  at System.Drawing.Graphics.get_PageUnit()

   at Nevron.GraphicsCore.lII11llI1.Attach(Graphics graphics, NResolution resolution)

   at Nevron.GraphicsCore.N2DDeviceGDI.Attach(Graphics graphics, NResolution resolution)

   at Nevron.GraphicsGL.GLBitmapRenderSurface.Activate()

   at Nevron.GraphicsGL.l1lIlI1Ill.l11lll1(Boolean l1I11l1l1l)

   at Nevron.GraphicsGL.l1lIlI1Ill.ClearDeviceSpecificResources()

   at Nevron.GraphicsGL.l1lIlI1Ill.Dispose()

   at Nevron.Chart.NChartRenderingContext3D.Dispose(Boolean disposing)

   at Nevron.Chart.NChartRenderingContext.Finalize()

 

Is there any solution, like need to upgrade to new version or ... ? Please do let me know.

 

Warm Regards,

Sachin

By Nevron Support - Wednesday, February 2, 2011

Hi Sachin,

This problem is fixed in later versions of the control. You can try to call the Dispose method of the control explicitly to workaround the problem.

By soundara lakshmi - Friday, September 14, 2012

Hi ,
I am soundara,
i am also getting same Argument Exception issue while running the project,
i am using Version Nevron 2009 for VS2008,


By Nevron Support - Friday, September 14, 2012

Hi Soundard,

As stated above the problem has been resolved in later versions  of the control...

By soundara lakshmi - Monday, September 17, 2012

ChartRenderer.cs

namespace KLATencor.Charts
{
public abstract class ChartRenderer : IDisposable
{
public abstract ChartBase Chart
{
get;
set;
}

public ChartControlBase ChartControl
{
get { return this.Chart.MyControl; }
}

public abstract void Dispose();
}
}

SurfaceChartLegendRenderer.cs
public class SurfaceChartLegendRenderer : SurfaceChartRenderer, IChartClipboardable
{

this.ChartControl.MouseDown += new MouseEventHandler(ChartControl_MouseDown);


void ChartControl_MouseDown(object sender, MouseEventArgs e)
{
NHitTestResult hitTestResult = this.ChartControl.HitTest(e.X, e.Y);

if (e.Button == MouseButtons.Right &&
hitTestResult.Legend == this.Legend)
{
....// context menu for legend (Auto Scale/ Set Scale).
}
}
}

hi,
i am using above code to add the "Context Menu" to the Legend
it throwing exception in line NHitTestResult hitTestResult = this.ChartControl.HitTest(e.X, e.Y);

its working fine panel size is small ,
but i when expand the panel it could recognized the whether its legend/ chart

can you help in resolving the problem
By soundara lakshmi - Monday, September 17, 2012

hi,

please can you tell me a latest version of the control to resolve the above problem.

Thanks,
Soundara
By Nevron Support - Monday, September 17, 2012

Hi Soundara,

You can download 2012 Vol1 from our website - it should be fixing this issue...