Page 1 of 1

Exception when zooming on chart

Posted: Tue Jul 09, 2013 1:28 pm
by 15666211
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?

Re: Exception when zooming on chart

Posted: Tue Jul 09, 2013 2:15 pm
by 10050769
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,

Re: Exception when zooming on chart

Posted: Wed Jul 10, 2013 7:41 am
by 15666211
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''.

Re: Exception when zooming on chart

Posted: Wed Jul 10, 2013 11:59 am
by 10050769
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,

Re: Exception when zooming on chart

Posted: Wed Jul 10, 2013 12:05 pm
by 15666211
Glad you reproduced the problem. When can we expect the next maintenance release?

Re: Exception when zooming on chart

Posted: Wed Jul 10, 2013 2:04 pm
by 10050769
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,