My Winform application UI hang after taking remote control.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shubhpc93
    New Member
    • Nov 2017
    • 2

    My Winform application UI hang after taking remote control.

    My Winform application run on machine A. After sometime when i took remote control of machine A from machine B. I saw my application execute my script but application UI is in hung state.

    So I used WinDbg(x64) for debug i saw application main thread is stuck with this log

    Code:
    ntdll.dll!NtWaitForSingleObject+0xa
    mswsock.dll!WSPStartup+0x8cd5
    mswsock.dll!WSPStartup+0xad4e
    ws2_32.dll!recv+0x13c
    [Native Frame: IL Method without Metadata]
    [Managed to Unmanaged Transition]
    System.dll!System.Net.Sockets.Socket.Receive+0xfa
    System.dll!System.Net.Sockets.Socket.Receive+0x28
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.SocketStream.Read+0x34
    System.dll!System.Net.StreamFramer.ReadMessage+0x4d
    System.dll!System.Net.Security.NegoState.StartReceiveBlob+0x1e
    System.dll!System.Net.Security.NegoState.StartSendBlob+0x4bb
    System.dll!System.Net.Security.NegoState.ProcessAuthentication+0xc4
    System.dll!System.Net.Security.NegotiateStream.AuthenticateAsClient+0x22
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateAuthenticatedStream+0xca
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateSocketHandler+0x47
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket+0xd0
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.SocketCache.GetSocket+0x1bc
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry+0x162
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.AsyncProcessRequest+0x27
    System.Runtime.Remoting.dll!System.Runtime.Remoting.Channels.BinaryClientFormatterSink.AsyncProcessMessage+0xa8
    mscorlib.dll!System.Runtime.Remoting.Messaging.ClientContextTerminatorSink.AsyncProcessMessageCallback+0x79
    [Unmanaged to Managed Transition]
    clr.dll+0xa7f3
    clr.dll+0xa6de
    clr.dll!CopyPDBs+0x288b
    clr.dll!CopyPDBs+0x2aa2
    clr.dll!CreateApplicationContext+0x1b3e
    [Managed to Unmanaged Transition]
    mscorlib.dll!System.Runtime.Remoting.Messaging.ClientContextTerminatorSink.AsyncProcessMessage+0x29c
    mscorlib.dll!System.Runtime.Remoting.Messaging.EnvoyTerminatorSink.AsyncProcessMessage+0xdc
    mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvokeAsync+0xf6
    mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke+0x5f2
    mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke+0x1f4
    [Unmanaged to Managed Transition]
    clr.dll+0x17292
    clr.dll!CreateApplicationContext+0x137a8
    clr.dll!CreateApplicationContext+0x2456
    clr.dll+0x17194
    [Managed to Unmanaged Transition]
    Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run+0x648
    ExecutionAgent.exe!Cres.Execution.Agent.My.MyApplication.Main+0x5e
    [Unmanaged to Managed Transition]
    clr.dll+0xa7f3
    clr.dll+0xa6de
    clr.dll+0xae76
    clr.dll!CorExeMain+0x35e9
    clr.dll!CorExeMain+0x392e
    clr.dll!CorExeMain+0x3827
    clr.dll!CorExeMain+0x37aa
    clr.dll!CorExeMain+0x3702
    clr.dll!CorExeMain+0x14
    mscoreei.dll!CorExeMain+0x5d
    MSCOREE.DLL!CorExeMain+0x69
    KERNEL32.dll!BaseThreadInitThunk+0xd
    ntdll.dll!RtlUserThreadStart+0x21
    Any ideas on what is causing this problem.

    Thanks
  • shubhpc93
    New Member
    • Nov 2017
    • 2

    #2
    Using STR when i connect or disconnect remote control application UI hang. I have another logs when i debug using WinDbg(x64)

    Code:
    ntdll.dll!ZwWaitForMultipleObjects+0x14
    KERNELBASE.dll!WaitForMultipleObjectsEx+0xf0
    USER32.dll!MsgWaitForMultipleObjectsEx+0x1e0
    combase.dll!Ordinal111+0x63b
    combase.dll!CoGetCurrentLogicalThreadId+0x20f
    combase.dll!CoWaitForMultipleHandles+0xb3
    clr.dll!MetaDataGetDispenser+0xcd4a
    clr.dll!MetaDataGetDispenser+0xccb4
    clr.dll!MetaDataGetDispenser+0x76efd
    clr.dll!MetaDataGetDispenser+0x8f4d5
    [Managed to Unmanaged Transition]
    mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne+0x1b
    mscorlib.dll!System.Threading.WaitHandle.WaitOne+0x2e
    System.Windows.Forms.dll!System.Windows.Forms.Control.WaitForWaitHandle+0x1ed
    System.Windows.Forms.dll!System.Windows.Forms.Control.MarshaledInvoke+0x431
    System.Windows.Forms.dll!System.Windows.Forms.Control.Invoke+0x60
    System.Windows.Forms.dll!System.Windows.Forms.WindowsFormsSynchronizationContext.Send+0x74
    System.dll!SystemEventInvokeInfo.Invoke+0x9c
    System.dll!Microsoft.Win32.SystemEvents.RaiseEvent+0x129
    System.dll!Microsoft.Win32.SystemEvents.OnDisplaySettingsChanging+0x76
    System.dll!Microsoft.Win32.SystemEvents.WindowProc+0x272
    [Unmanaged to Managed Transition]
    [Native Frame: IL Method without Metadata]
    clr.dll+0x21fe
    USER32.dll!CallWindowProcW+0x4d0
    USER32.dll!DispatchMessageW+0x1af
    [Native Frame: IL Method without Metadata]
    [Managed to Unmanaged Transition]
    System.Windows.Forms.dll!ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop+0x33e
    System.Windows.Forms.dll!ThreadContext.RunMessageLoopInner+0x1c6
    System.Windows.Forms.dll!ThreadContext.RunMessageLoop+0x51
    Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun+0xa5
    Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel+0x95
    Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run+0x3ca
    ExecutionAgent.exe!Execution.Agent.My.MyApplication.Main+0x64
    [Unmanaged to Managed Transition]
    clr.dll!LogHelp_LogAssert+0x1bf3
    clr.dll!LogHelp_LogAssert+0x1ac5
    clr.dll!LogHelp_LogAssert+0x27cd
    clr.dll!SetRuntimeInfo+0x1580
    clr.dll!SetRuntimeInfo+0x1dca
    clr.dll!SetRuntimeInfo+0x1c87
    clr.dll!SetRuntimeInfo+0x161d
    clr.dll!SetRuntimeInfo+0x1402
    clr.dll!CorExeMain+0x14
    mscoreei.dll!CorExeMain+0x6d
    MSCOREE.DLL!CorExeMain+0x6c
    KERNEL32.dll!BaseThreadInitThunk+0x14
    ntdll.dll!RtlUserThreadStart+0x21

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Well there is a problem getting data across your network (sockets).

      I'm not 100% sure what is causing this but the first thing I would check is permissions.

      Make sure that the users are permitted to use the resources necessary to run the application across the network like this.

      The reason I suspect permissions is because, in your first post, you are having problems receiving data in the ProcessAuthenti cation method...

      Sorry I can't be much more help.

      Comment

      Working...