Just want to start out with saying how much I love AdvancedHMI.
I wrote an application that will poll data from a dozen different PLCs, summarize the data for management, create an excel document with nice charts of the details for maintenance, and then email it to the production team. I set up this application to run at 6 am and 6 pm at the end of every shift.
For over a year this program has worked flawlessly. Recently our IT team did an update to the computer that was running the program and suddenly it is not working anymore. Unfortunately, our IT team does not know exactly what they changed (they applied a patch update to another program). I can get the program to run manually without any problems on this computer and other computers but it doesn't work when setup as a scheduled task. I'm wondering if there is some sort of dependency or resource setting that I'm missing.
The following two errors show up in the Event Viewer after the scheduled task attempts to run:
Event Viewer Application Error 1:
Faulting application name: AllProductionReport101-105.exe, version: 3.6.0.0, time stamp: 0x5a7e1eb1
Faulting module name: KERNELBASE.dll, version: 6.1.7601.24009, time stamp: 0x5a52408a
Exception code: 0xe0434352
Fault offset: 0x000000000001a06d
Faulting process id: 0x20a4
Faulting application start time: 0x01d3a202caffb958
Faulting application path: C:\ReportingProgram\AllProductionReport101-105.exe
Faulting module path: C:\windows\system32\KERNELBASE.dll
Report Id: 367536b8-0df6-11e8-9b17-6c4b9003dc92
***
Event Viewer Application Error 2:
Application: AllProductionReport101-105.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ComponentModel.Win32Exception
at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs)
at System.Windows.Forms.Label.OnVisibleChanged(System.EventArgs)
at System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs)
at System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs)
at System.Windows.Forms.Form.OnVisibleChanged(System.EventArgs)
at System.Windows.Forms.Control.SetVisibleCore(Boolean)
at System.Windows.Forms.Form.SetVisibleCore(Boolean)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
at MfgControl.AdvancedHMI.My.MyApplication.Main(System.String[])