Profile Picture

HitTest / PreOrderPaint null exception

Posted By K DR 14 Years Ago
Author
Message
K DR
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 5, Visits: 1
Hi,

I encounter a random issue with the HitTest method of NChartControl (Nevron 2010, DLL version is 10.3.31.12) . It raises a NullException and it's very difficult to reproduce. The chart is displaying a line plot and the hit test was done on coordinate (x,y) = (65,105). The context of the PreOrder paint didn't seem to contain null members (see content of the structure at the end).

CALLSTACK:

Nevron.Chart.dll!Nevron.Chart.NLineSeries.Render2D(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.Chart.l1I1Ill1l1 rf = RenderAll) + 0xa7 bytes
Nevron.Chart.dll!Nevron.Chart.l1I1111l1I.lI1llII1II(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.Chart.l1I1Ill1l1 rf = RenderAll, int lIII1l11II = 3, int lIII1l1Ill = 0, int lIII1l1Il1 = -1) + 0xa5 bytes
Nevron.Chart.dll!Nevron.Chart.l1I1111l1I.Render2D(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.Chart.l1I1Ill1l1 rf = RenderAll) + 0xa0 bytes
Nevron.Chart.dll!Nevron.Chart.NChart.RenderSeries2D(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}) + 0x61 bytes
Nevron.Chart.dll!Nevron.Chart.NCartesianChart.lIl1I1IIll(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}) + 0x14a bytes
Nevron.Chart.dll!Nevron.Chart.NChart.PreOrderPaint2D(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}) + 0x5b bytes
Nevron.Chart.dll!Nevron.Chart.NCartesianChart.PreOrderPaint2D(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}) + 0x5e bytes
xxx.Standard.dll!xxx.Standard.CartesianChart.PreOrderPaint2D(Nevron.Chart.NChartRenderingContext2D context = {Nevron.Chart.NChartRenderingContext2D}) Line 73 + 0xc bytes C#
Nevron.Chart.dll!Nevron.Chart.NContentPanel.RenderInternal(Nevron.Chart.NChartRenderingContext context = {Nevron.Chart.NChartRenderingContext2D}) + 0x18a bytes
Nevron.Chart.dll!Nevron.Chart.NPanel.PartialRender(Nevron.Chart.NChartRenderingContext context = {Nevron.Chart.NChartRenderingContext2D}) + 0x136 bytes
Nevron.Chart.dll!Nevron.Chart.NPanel.UpdateImageMap(Nevron.Chart.NChartRenderingContext context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.GraphicsCore.lI111l11 imageMap = null) + 0xb9 bytes
Nevron.Chart.dll!Nevron.Chart.NChart.HitTest(Nevron.Chart.NChartRenderingContext context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.GraphicsCore.NPointF pt = {X=62,Y=105}) + 0xca bytes
Nevron.Chart.dll!Nevron.Chart.NDocument.HitTest(Nevron.Chart.NChartRenderingContext context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.GraphicsCore.NPointF point = {X=62,Y=105}) + 0xe3 bytes
Nevron.Chart.dll!Nevron.Chart.NDocument.lIlII11Il1(Nevron.Chart.NChartRenderingContext context = {Nevron.Chart.NChartRenderingContext2D}, Nevron.GraphicsCore.NPointF point = {X=62,Y=105}) + 0x35 bytes
Nevron.Chart.WinForm.dll!Nevron.Chart.WinForm.NChartControl.HitTest(int x = 62, int y = 105) + 0x82 bytes
> xxx.Standard.dll!xxx.Standard.DataPlot.HitTest(int x = 62, int y = 105) Line 5592 + 0x1c bytes C#


Content of NChartRenderingContext2D (for PreOrderPaint2D).

- context {Nevron.Chart.NChartRenderingContext2D} Nevron.Chart.NChartRenderingContext2D
- base {Nevron.Chart.NChartRenderingContext2D} Nevron.Chart.NChartRenderingContext {Nevron.Chart.NChartRenderingContext2D}
lIl111l1I1 false bool
+ lIl111l1II {Width=522,Height=549} Nevron.GraphicsCore.NSize
+ lIl111lIll {DpiX=96, DpiY=96} Nevron.GraphicsCore.NResolution
+ RenderSurface {Nevron.GraphicsCore.lI1I111l} Nevron.GraphicsCore.l1Ill1lI {Nevron.GraphicsCore.lI1I111l}
+ Non-Public members
- Device {Nevron.GraphicsCore.lII1lIlI} Nevron.GraphicsCore.lIIIIllI {Nevron.GraphicsCore.lII1lIlI}
+ [Nevron.GraphicsCore.lII1lIlI] {Nevron.GraphicsCore.lII1lIlI} Nevron.GraphicsCore.lII1lIlI
+ AnimationBounds {X=0, Y=0, Width=0, Height=0} Nevron.GraphicsCore.NRectangleF
+ AnimationsStyle null Nevron.GraphicsCore.NAnimationsStyle
AutoAnimations false bool
+ ClipBounds {X=-1E+08, Y=-1E+08, Width=2E+08, Height=2E+08} Nevron.GraphicsCore.NRectangleF
ClipInfo null Nevron.GraphicsCore.l1III11l
DashMode Cycle Nevron.GraphicsCore.DeviceDashMode
DashOffset 0.0 float
ExcludedRegionFromImageFilters null System.Drawing.Region
+ FillStyle null Nevron.GraphicsCore.NFillStyle
+ FontStyle {Nevron.GraphicsCore.NFontStyle} Nevron.GraphicsCore.NFontStyle
+ GDIObjectsCache {Nevron.GraphicsCore.NGDIObjectsCache} Nevron.GraphicsCore.NGDIObjectsCache
ImageFiltersBoundsProvider null Nevron.GraphicsCore.lIIIIII1
ImageFiltersStyle null Nevron.GraphicsCore.NImageFiltersStyle
ImageRenderingMode Default Nevron.GraphicsCore.ImageRenderingMode
+ MeasurementUnit {Pixel} Nevron.GraphicsCore.NMeasurementUnit {Nevron.GraphicsCore.NPixelGraphicsUnit}
PageScale 1.0 float
PageUnit Display System.Drawing.GraphicsUnit
+ Painter {Nevron.GraphicsCore.lI1lII1I} Nevron.GraphicsCore.lIIIIl1I {Nevron.GraphicsCore.lI1lII1I}
+ ReusableGraphicsPath {System.Drawing.Drawing2D.GraphicsPath} System.Drawing.Drawing2D.GraphicsPath
ShapeRenderingMode Default Nevron.GraphicsCore.ShapeRenderingMode
+ SharedFont {Nevron.GraphicsCore.lIl1l1I1} Nevron.GraphicsCore.lIl1l1I1
+ SharedStringFormat {Nevron.GraphicsCore.l1I1ll1I} Nevron.GraphicsCore.l1I1ll1I
+ StringFormatStyle {Nevron.GraphicsCore.NStringFormatStyle} Nevron.GraphicsCore.NStringFormatStyle
+ StrokeStyle null Nevron.GraphicsCore.NStrokeStyle
SupportsAnimation false bool
TextRenderingMode Auto Nevron.GraphicsCore.TextRenderingMode
TextureBoundsProvider null Nevron.GraphicsCore.lIIIIII1
TextureMappingOrientation 0.0 float
+ Transform {System.Drawing.Drawing2D.Matrix} System.Drawing.Drawing2D.Matrix
+ ShadowDevice {Nevron.GraphicsCore.lI1lI1I1} Nevron.GraphicsCore.IN2DShadowDevice {Nevron.GraphicsCore.lI1lI1I1}
+ Non-Public members


Some add. info that I obtained with mdbg:

[p#:0, t#:0] mdbg> p
local_0=Nevron.GraphicsCore.DeviceDashMode
local_1=
this=Nevron.Chart.NLineSeries
context=Nevron.Chart.NChartRenderingContext2D
rf=Nevron.Chart.l1I1Ill1l1


bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi,

Can you post the state of the control in XML format:

nChartControl1.Serializer.SaveControlStateToFile("c:\\temp\\state.xml", Nevron.Serialization.PersistencyFormat.XML, null);

I just tested the control hit testing in a simple case:

private void Form1_Load(object sender, EventArgs e)
{
 NChart chart = nChartControl1.Charts[0];
 NLineSeries line = new NLineSeries();
 line.DataLabelStyle.Visible = false;

 for (int i = 0; i < 100; i++)
 {
         line.Values.Add(i);
 }

 chart.Series.Add(line);
}

private void nChartControl1_MouseMove(object sender, MouseEventArgs e)
{
 NHitTestResult result = nChartControl1.HitTest(e.X, e.Y);

 textBox1.Text = result.ChartElement.ToString();
 nChartControl1.Refresh();
}

but was not able to replicate any problems...

Best regards,
Bob





Similar Topics


Reading This Topic