Exception when zooming on chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Magus
Newbie
Newbie
Posts: 3
Joined: Mon Jun 10, 2013 12:00 am

Exception when zooming on chart

Post by Magus » Tue Jul 09, 2013 1:28 pm

We recently upgraded from TChart.WPF 3.5.3700.30575 to 4.1.2013.05282. We face the following problem:

For some of our xy cartesian charts we add event handler methods for the event 'AfterDraw' to draw some custom graphics. Since upgrading to the new TChart, the following exception is thrown when zooming on a chart where 'AfterDraw' event handlers have been added:

"A first chance exception of type 'System.NullReferenceException' occurred in TeeChart.WPF.dll
Additional information: Object reference not set to an instance of an object."

We can reproduce it everytime. If we zoom on a chart where no 'AfterDraw' event handler method is added, all good. However, if we add 'AfterDraw' event handler methods, zooming on the chart causes the exception. I even made our 'AfterDraw' event handler method body empty (basically do nothing), and still zooming causes the exception.

Are you able to reproduce this on your side?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Exception when zooming on chart

Post by Sandra » Tue Jul 09, 2013 2:15 pm

Hello Magus,

Can you arrange for us a simple project, because we can reproduce your problem here and try to find a solution for you?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Magus
Newbie
Newbie
Posts: 3
Joined: Mon Jun 10, 2013 12:00 am

Re: Exception when zooming on chart

Post by Magus » Wed Jul 10, 2013 7:41 am

Please find attached a small test program reproducing the bug.

If you zoom on the chart, TChart throws an exception. As soon as you remove the 'AfterDraw' event handler methods (See ChartUtils.cs in the attached project), no more crash.

Also, the Graphics3D object received in the 'AfterDraw' event handler method returns ''g.FontHeight' threw an exception of type 'System.NullReferenceException''.
Attachments
TChartTest.zip
Test Project
(18.25 KiB) Downloaded 390 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Exception when zooming on chart

Post by Sandra » Wed Jul 10, 2013 11:59 am

Hello Magus,

Many thanks for your code. Finally, I have reproduced your problem and I have added it in bug list report with number[TW16016637]. We will try to fix it to upcoming maintenance releases of TeeChartFor.Net.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Magus
Newbie
Newbie
Posts: 3
Joined: Mon Jun 10, 2013 12:00 am

Re: Exception when zooming on chart

Post by Magus » Wed Jul 10, 2013 12:05 pm

Glad you reproduced the problem. When can we expect the next maintenance release?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Exception when zooming on chart

Post by Sandra » Wed Jul 10, 2013 2:04 pm

Hello Magus,

I can not give you an estimate date but I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply