Author Topic: graphicIndicator exception  (Read 1195 times)

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
graphicIndicator exception
« on: November 24, 2015, 11:24:00 AM »
AdvancedHMI V3.99a. I have a tabcontrol with 4 tabs. A graphicIndicator is on the 2nd tab.

If I exit the application without activate tab #2 at least once, system throws exception on exit. For testing, I moved the graphicIndicator to the tab #1 which is the default startup tab, no exception on exit.

The exception is in GraphicIndicator.vb in the Finally block.
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing Then
                If SubScriptions IsNot Nothing Then
                    SubScriptions.dispose()
                End If
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

Exception details:
System.NullReferenceException was unhandled
  HResult=-2147467261
  Message=Object reference not set to an instance of an object.
  Source=MfgControl.AdvancedHMI.Controls
  StackTrace:
       at MfgControl.AdvancedHMI.Controls.GraphicIndicator.Dispose(Boolean disposing)
       at AdvancedHMIControls.GraphicIndicator.Dispose(Boolean disposing) in H:\Devel\HRS\VS\AdvancedHMI\AdvancedHMIControls\Controls\GraphicIndicator.vb:line 135
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at System.Windows.Forms.TabControl.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at System.Windows.Forms.Form.Dispose(Boolean disposing)
       at HRS_CAN.FormMain.Dispose(Boolean disposing) in H:\Devel\HRS\VS\HRS_CAN\FormMain.Designer.cs:line 20
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Form.WmClose(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam)
       at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam)
       at System.Windows.Forms.Form.Close()
       at HRS_CAN.FormMain.buttonExit_Click(Object sender, EventArgs e) in H:\Devel\HRS\VS\HRS_CAN\FormMain.cs:line 546
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at HRS_CAN.Program.Main() in H:\Devel\HRS\VS\HRS_CAN\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:


bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: graphicIndicator exception
« Reply #1 on: November 24, 2015, 03:49:38 PM »
I created two tabs, put graphicindicator on tab2, tested without any exceptions.
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: graphicIndicator exception
« Reply #2 on: November 25, 2015, 10:24:48 AM »
This is weird. I created a new win form, add tabcontrol, add graphicIndicator to tab #2. No other clicks and no code.

case 1: Run, close, exception.
case 2: Run, click tab #2, close, no exception.

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: graphicIndicator exception
« Reply #3 on: November 25, 2015, 01:48:49 PM »
Try reset your toolbox, or remove reference of GraphicIndicator, I dont think VisualStudio come with GraphicIndicator control.
Or as a last resort, try repairing or reinstalling V.S.
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================