Author Topic: NullReferenceException in Basic Indicator  (Read 937 times)

GraemeTownsend

  • Newbie
  • *
  • Posts: 29
    • View Profile
NullReferenceException in Basic Indicator
« 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: NullReferenceException in Basic Indicator
« Reply #1 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.
« Last Edit: August 23, 2016, 09:07:44 PM by Archie »

GraemeTownsend

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: NullReferenceException in Basic Indicator
« Reply #2 on: August 23, 2016, 09:17:06 PM »
Thanks Archie, that fixed it.