Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 523

Summary: NullReferenceException in SeriesMarks.ConvertTo2D
Product: .NET TeeChart Reporter: dses
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: major CC: chris
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description dses 2013-12-20 04:16:03 EST
A NullReferenceException is thrown on mouse event in SeriesMarks.ConvertTo2D:

System.NullReferenceException: Object reference not set to an instance of an object.
at Steema.TeeChart.Styles.SeriesMarks.ConvertTo2D(Position aPos, Point& p) at Steema.TeeChart.Styles.SeriesMarks.Clicked(Int32 x, Int32 y) at Steema.TeeChart.Tools.DragMarks.CheckCursorSeries(Series s, Int32 x, Int32 y) at Steema.TeeChart.Tools.DragMarks.CheckCursor(Cursor& c, Int32 x, Int32 y) at Steema.TeeChart.Tools.DragMarks.MouseMove(MouseEventArgs e, Cursor& c) at Steema.TeeChart.Tools.DragMarks.MouseEvent(MouseEventKinds kind, MouseEventArgs e, Cursor& c) at Steema.TeeChart.Chart.BroadcastMouseEvent(MouseEventKinds kind, MouseEventArgs e, Cursor& c) at Steema.TeeChart.Chart.BroadcastMouseEvent(MouseEventKinds kind, MouseEventArgs e, Keys modKeys, Cursor& c) at Steema.TeeChart.TChart.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Our application code is not involved here so I cannot give more information about this exception. Commenting out all our code regarding DragMarks, the exception could not be reproduced. 

We use one instance of TeeChart. The user can select one of a list of different charts, which should be displayed. The exception is thrown after switching from one chart to another. But not in all cases. Sometimes on 3rd switch, sometimes on 50th switch.
Comment 1 dses 2013-12-20 04:18:20 EST
We use TeeChart.dll Version v4.0.30319 with Visual Studio 2010. Operation System is Windows 7 64-bit
Comment 2 christopher ireland 2013-12-20 05:05:55 EST
Unfortunately I haven't been able to reproduce this problem here. However, looking at the SeriesMarks.ConvertTo2D I see that there are only three different object references used within in. This being so, I have added null checking for all these objects before the routines are called. I hope this resolves the problem.