On occasion, openPDC manager will fail to start, with the following exception. In testing, this has occurred about one in fifteen times, on a fresh install.
Ritchie mentioned that "the likely solution is to wrap connectsync function call in a try/catch and ignore both object diposed and null exceptions since these can occur when a thread is trying to process a queued socket request for a socket that is already closed."
Detailed error information follows:
(Inner Exception)
(Inner Exception)
Date and Time: 1/9/2012 9:52:15 AM
Machine Name: VMTESTING1
Machine IP: 172.21.1.104
Machine OS: Microsoft Windows NT 5.1.2600 Service Pack 2
Application Domain: openPDCManager.exe
Assembly Codebase: c:/program files/openpdc/openpdcmanager.exe
Assembly Full Name: openPDCManager, Version=1.4.210.0, Culture=neutral, PublicKeyToken=null
Assembly Version: 1.4.210.0
Assembly Build Date: 12/28/2011 3:01:42 PM
.Net Runtime Version: 4.0.30319.1
Exception Source: System
Exception Type: System.ObjectDisposedException
Exception Message: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
Exception Target Site: BeginConnect
---- Stack Trace ----
System.Net.Sockets.Socket.BeginConnect(remoteEP As EndPoint, callback As AsyncCallback, state As Object)
openPDCManager.exe: N 1775053
TVA.Communication.TcpClient.ConnectAsync()
openPDCManager.exe: N 00427
TVA.Communication.ClientBase.Connect()
openPDCManager.exe: N 00015
TVA.ServiceProcess.ClientHelper.Connect()
openPDCManager.exe: N 00030
TimeSeriesFramework.UI.CommonFunctions.ConnectAsync(state As Object)
openPDCManager.exe: N 00064
(Outer Exception)
Date and Time: 1/9/2012 9:52:15 AM
Machine Name: VMTESTING1
Machine IP: 172.21.1.104
Machine OS: Microsoft Windows NT 5.1.2600 Service Pack 2
Application Domain: openPDCManager.exe
Assembly Codebase: c:/program files/openpdc/openpdcmanager.exe
Assembly Full Name: openPDCManager, Version=1.4.210.0, Culture=neutral, PublicKeyToken=null
Assembly Version: 1.4.210.0
Assembly Build Date: 12/28/2011 3:01:42 PM
.Net Runtime Version: 4.0.30319.1
Exception Source: TimeSeriesFramework.UI
Exception Type: System.ApplicationException
Exception Message: Failed to connect to service: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
Exception Target Site: ConnectAsync
---- Stack Trace ----
TimeSeriesFramework.UI.CommonFunctions.ConnectAsync(state As Object)
openPDCManager.exe: N 00170
System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(state As Object)
openPDCManager.exe: N 00044
System.Threading.ExecutionContext.runTryCode(userData As Object)
openPDCManager.exe: N 00080
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(code As TryCode, backoutCode As CleanupCode, userData As Object)
openPDCManager.exe: N 00000
System.Threading.ExecutionContext.RunInternal(executionContext As ExecutionContext, callback As ContextCallback, state As Object)
openPDCManager.exe: N 00105
System.Threading.ExecutionContext.Run(executionContext As ExecutionContext, callback As ContextCallback, state As Object, ignoreSyncCtx As Boolean)
openPDCManager.exe: N 00125
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
openPDCManager.exe: N 00089
System.Threading.ThreadPoolWorkQueue.Dispatch()
openPDCManager.exe: N 00326
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
openPDCManager.exe: N 00044
(Outer Exception)
Date and Time: 1/9/2012 9:52:15 AM
Machine Name: VMTESTING1
Machine IP: 172.21.1.104
Machine OS: Microsoft Windows NT 5.1.2600 Service Pack 2
Application Domain: openPDCManager.exe
Assembly Codebase: c:/program files/openpdc/openpdcmanager.exe
Assembly Full Name: openPDCManager, Version=1.4.210.0, Culture=neutral, PublicKeyToken=null
Assembly Version: 1.4.210.0
Assembly Build Date: 12/28/2011 3:01:42 PM
.Net Runtime Version: 4.0.30319.1
Exception Source:
Exception Type: System.Exception
Exception Message: UnhandledException
---- Stack Trace ----