Page 1 of 1

NullReferenceException on form close

Posted: Mon Nov 08, 2010 8:43 pm
by 13047073
Hello,

I'm programming in c# .net framework 2.0.

I have recently added a series of teecharts to a form and some are not in view (you need to scroll to see them). If you close the form before scrolling to see the chart, I get this exception from the form1.designer.cs page on this function:

Code: Select all

protected override void Dispose(bool disposing)
{
       if (disposing && (components != null))
       {
           components.Dispose();
       }
       base.Dispose(disposing);   //<--------error here--------
}
I am almost certain everything is initialized properly. The form and charts work great otherwise. Any suggestions or help would be much appreciate.

Regards,

Nick

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 8:11 am
by narcis
Hi Nick,

Can you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Aside. Footnote plaque, Support team, Steema Software. This post marks as the 50,000th post on the Steema forums!

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 1:44 pm
by 13047073
Hello,

I added the program "Error app" in the attachment.

Thanks

Nick

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 2:26 pm
by narcis
Hi Nick,

Thanks for the example project. I'm not able to reproduce the issue here using latest TeeChart for .NET v3 release available at the client area, which is buil 3.5.3700.30574/5. Which TeeChart version are you using? Which are the exact steps I should follow with the example project to reproduce the problem?

Thanks in advance.

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 2:47 pm
by 13047073
We are using version 3 as well but I am not sure what build we are using.

With program, once it is started, then immediately closed without looking at the second graph, it goes to the dispose() function for the designer.cs and throws the null reference exception.

I will download and install the latest version of teechart and see what happens.

Thanks

Nick

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 3:00 pm
by narcis
Hi Nick,

Yes, please, give last version a go because I can't reproduce the issue here either in debug mode nor in release mode. I'm just executing the application and closing it without further action. I have checked the application goes successfully through the line you said the code crashed.

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 3:31 pm
by 13047073
Hello,

I'm just waiting on an email to get my customer number because I misplaced mine. I was, however, able to find the current build that I am using.

Build 3.2.2574.30545

Nick

Re: NullReferenceException on form close

Posted: Tue Nov 09, 2010 5:02 pm
by 13047073
Hello NarcĂ­s,

I updated the dll and teechart and it now works! Thank you for your help. It was much appreciated.


Regards,

Nick

Re: NullReferenceException on form close

Posted: Wed Nov 10, 2010 8:11 am
by narcis
Hi Nick,

You're very welcome, I'm glad to hear that.