Home Comments

Thread Abort Error In C#

manannanmanannan Member Andrew LayOrganization: N/AProject: To learn how to use Ice to call JavaScript browser app from C#


I am receiving the following error in my C# Ice Server:
!! 8/07/2020 19:09:37:480 error: exception in endpoint host resolver thread Ice.HostResolver:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout, Boolean exitContext)
at IceInternal.EndpointHostResolver.run() in C:\Users\vagrant\workspace\ice-dist\3.7\dist-utils\build\ice\builds\ice-v142\csharp\src\Ice\EndpointHostResolver.cs:line 102
at IceInternal.EndpointHostResolver.HelperThread.Run() in C:\Users\vagrant\workspace\ice-dist\3.7\dist-utils\build\ice\builds\ice-v142\csharp\src\Ice\EndpointHostResolver.cs:line 253
!! 8/07/2020 19:09:37:488 error: exception in `Ice.ThreadPool.Client' thread Ice.ThreadPool.Client-0:

I searched the forums and found this:

However I do not know what 'abort a thread while it is inside the run time' means. I guessed that it means aborting a thread inside an 'I' class or something that it calls.

Therefore as a debugging step I simplified my 'I' class to be:

public class ScummWebServerI : ScummWebServerDisp_
    public override void Init(string gameName, string gameId, string signalRConnectionId, Dictionary<string, byte[]> saveStorage, Current current = null)
            int x = 4;

My logic here that that the simple setting of x to 4 will not abort any threads.

I called 'Init' from two different clients and got the same behaviour. The client call to 'Init' returned after a LONG time, but 'Init' was never called and the above error was logged.

I feel that because calling from either of the clients, a JS client and a C# client, cause the same behaviour then it it probably an issue with the server.

Please let me know what else you need.


  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Andrew,

    Can you try running your server with the debugger attached and get the stack of all threads, this will give us a clue to figure this why Abort is being called.


  • manannanmanannan Member Andrew LayOrganization: N/AProject: To learn how to use Ice to call JavaScript browser app from C#
    edited July 2020

    I am now withdrawing this question and apologise for wasting you're time.

    The issue was caused by a simple 'port is already is use error' which was hidden somewhere else.

    Please resolve or remove this question.


Sign In or Register to comment.