AdvancedHMI Software

General Category => Support Questions => Topic started by: GraemeTownsend on August 23, 2016, 09:00:49 PM

Title: NullReferenceException in Basic Indicator
Post by: GraemeTownsend on August 23, 2016, 09:00:49 PM
Hi,

I'm getting the following error on application shutdown: An unhandled exception of type 'System.NullReferenceException' occurred in MfgControl.AdvancedHMI.Controls.dll.

I can't easily see which part of my code this is coming fro? any advice? I'm running AdvancedHMI 3.99n.

Image of error below.

Regards,
Graeme.
Title: Re: NullReferenceException in Basic Indicator
Post by: Archie on August 23, 2016, 09:04:54 PM
I have seen this on the Tank also. The quick fix is to wrap the line of code in a Try-Catch, like this
Code: [Select]
Try
  MyBase.Dispose(disposing)
catch
End Try


Or you could simply comment out that line of code because the base is not a disposable type anyway.
Title: Re: NullReferenceException in Basic Indicator
Post by: GraemeTownsend on August 23, 2016, 09:17:06 PM
Thanks Archie, that fixed it.