Null reference exception on OnPaint Event

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Eskimo
Newbie
Newbie
Posts: 1
Joined: Fri Oct 07, 2016 12:00 am

Null reference exception on OnPaint Event

Post by Eskimo » Fri Apr 28, 2017 9:40 am

Hi

On one PC the teechart works as expected, on an other pc we have sometimes null reference (System.NullReferenceException) exceptions on the TeeChart.TChart.OnPaint, the first method is System.Windows.Forms.NativeWindow.DebuggableCallback. Is there a possibility to log some output for the teechart to find the error. No of our code is in the stack trace but may be it's the cause from wrong values. We use the version 4.1.2017.2145


Stack Trace:

bei Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
2 bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
3 bei System.Windows.Forms.Control.WmPaint(Message& m)
4 bei System.Windows.Forms.Control.WndProc(Message& m)
5 bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Regards
T. Harder

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Null reference exception on OnPaint Event

Post by Christopher » Tue May 02, 2017 7:43 am

Hello,

Do you have any more information on the error, for example, exactly which object is throwing the null reference exception?

Do you get the same error when you set the Graphics3D.BufferStyle to something other than the default, e.g.

Code: Select all

tChart1.Graphics3D.BufferStyle = BufferStyle.DoubleBuffer;
(default is OptimizedBuffer)
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply