none
.NET Runtime 2.0 Error Reporting , Event ID: 5000, Application crashes RRS feed

  • Question

  •  

    I have running Desktop Network Application based on .NET Framework 2.0 , Visual Studio 2005 and Sql Server 2000 /2005. It suddenly exits while running without any prior notice. After I look at the Event Log in Windows 2003 Server, found the following Error log. It only happens on the client side, I am not  unable to debug the situation which causes the application to crash. How do i know the exact cause of the crash? kindly help me out.

     

    Event Type: Error

    Event Source: .NET Runtime 2.0 Error Reporting

    Event Category: None

    Event ID: 5000

    Date:  3/20/2008

    Time:  1:50:14 PM

    User:  N/A

    Computer: ALL

    Description:

    EventType clr20r3, P1 servicemain.exe, P2 1.0.0.0, P3 47bae0cd, P4 cat.cass.sockets, P5 1.0.0.0, P6 478202aa, P7 a, P8 3b, P9 system.argumentexception, P10 NIL.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Data:

    0000: 63 00 6c 00 72 00 32 00   c.l.r.2.

    0008: 30 00 72 00 33 00 2c 00   0.r.3.,.

    0010: 20 00 64 00 61 00 74 00    .d.a.t.

    0018: 61 00 62 00 61 00 73 00   a.b.a.s.

    0020: 65 00 73 00 65 00 72 00   e.s.e.r.

    0028: 76 00 69 00 63 00 65 00   v.i.c.e.

    0030: 6d 00 61 00 69 00 6e 00   m.a.i.n.

    0038: 2e 00 65 00 78 00 65 00   ..e.x.e.

    0040: 2c 00 20 00 31 00 2e 00   ,. .1...

    0048: 30 00 2e 00 30 00 2e 00   0...0...

    0050: 30 00 2c 00 20 00 34 00   0.,. .4.

    0058: 37 00 62 00 61 00 65 00   7.b.a.e.

    0060: 30 00 63 00 64 00 2c 00   0.c.d.,.

    0068: 20 00 63 00 61 00 74 00    .c.a.t.

    0070: 61 00 6c 00 79 00 73 00   a.l.y.s.

    0078: 74 00 2e 00 63 00 61 00   t...c.a.

    0080: 74 00 73 00 2e 00 73 00   t.s...s.

    0088: 6f 00 63 00 6b 00 65 00   o.c.k.e.

    0090: 74 00 73 00 2c 00 20 00   t.s.,. .

    0098: 31 00 2e 00 30 00 2e 00   1...0...

    00a0: 30 00 2e 00 30 00 2c 00   0...0.,.

    00a8: 20 00 34 00 37 00 38 00    .4.7.8.

    00b0: 32 00 30 00 32 00 61 00   2.0.2.a.

    00b8: 61 00 2c 00 20 00 61 00   a.,. .a.

    00c0: 2c 00 20 00 33 00 62 00   ,. .3.b.

    00c8: 2c 00 20 00 73 00 79 00   ,. .s.y.

    00d0: 73 00 74 00 65 00 6d 00   s.t.e.m.

    00d8: 2e 00 61 00 72 00 67 00   ..a.r.g.

    00e0: 75 00 6d 00 65 00 6e 00   u.m.e.n.

    00e8: 74 00 65 00 78 00 63 00   t.e.x.c.

    00f0: 65 00 70 00 74 00 69 00   e.p.t.i.

    00f8: 6f 00 6e 00 20 00 4e 00   o.n. .N.

    0100: 49 00 4c 00 0d 00 0a 00   I.L.....

    Friday, April 18, 2008 5:29 AM

Answers

  • You can consider remote debugging using Visual Studio. Hope the following reference can get you started:
    Remote Debugging Setup

    For more questions about Visual Studio debugger, you can post them at
    Visual Studio Debugger.

    Thanks!
    Monday, April 21, 2008 5:39 AM
  • You're not rethrowing ee, just merely begining a new exception flow using the same exception object instance. This will wipe all the stack trace information associated with the exception, so we cannot find the root of the exception using the information you provided.
    For more details about throwing usage in catch block, please visit the following reference:

    Rethrow an exception using throw.

    Thanks!
    Tuesday, April 22, 2008 9:57 AM

All replies

  • Hi,

     

    Kindly do not post duplicate threads on the same topic. A similar thread was found over here and deleted.

     

    HTH,
    Suprotim Agarwal

     

    Friday, April 18, 2008 5:55 AM
    Moderator
  • EventType clr20r3, P1 servicemain.exe, P2 1.0.0.0, P3 47bae0cd, P4 cat.cass.sockets, P5 1.0.0.0, P6 478202aa, P7 a, P8 3b, P9 system.argumentexception, P10 NIL.


    Basically this means an exception has thrown from application servicemain.exe in method a, IL offset 3b of assembly cat.cass.sockets. The  name of the exception is system.argumentexception.

     

    I would suggest you to fire up VS or other debugger and attach to the services and find out what is wrong. Using a debugger is much easier than just looking at this information. If this application is not developed by yourself. Please contact the vendor of it for a solution.


    Thanks!

     

    Monday, April 21, 2008 4:03 AM
  •  

    Hi  Feng Chen,

     Thanks for your response. This situation is only occur at the client side.We are running this application on Windows 2003 Server locally on our development area without such crash.How do i attach debugger on the client side?

     

    The thing I am considering that this application is built on Windows XP and deployed on Windows 2003 Server editions, I hope there is no problem with that?  

     

     

    Monday, April 21, 2008 5:18 AM
  • You can consider remote debugging using Visual Studio. Hope the following reference can get you started:
    Remote Debugging Setup

    For more questions about Visual Studio debugger, you can post them at
    Visual Studio Debugger.

    Thanks!
    Monday, April 21, 2008 5:39 AM
  • Thanks for your reply. I have check my code . Exception handling is applied.

    For more help I inserted to handle any unhandled exception and write to the log.

    What I get on crash is the following:

     

    Computer : DBSERVER
    Date  : 11:40:40 AM
    Time  : 4/22/2008
    Message  : //////////UnHandled Exception//////////////
    ^^-------------------------------------------------------------------^^
    Computer : DBSERVER
    Date  : 11:40:40 AM
    Time  : 4/22/2008
    Message  : at Catalyst.CATS.Sockets.UdpClient.ThreadMethod()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    ^^-------------------------------------------------------------------^^
    Computer : DBSERVER
    Date  : 11:40:40 AM
    Time  : 4/22/2008
    Message  : System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
       at Catalyst.CATS.Sockets.UdpClient.ThreadMethod()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    ^^-------------------------------------------------------------------^^
    Computer : DBSERVER
    Date  : 11:40:40 AM
    Time  : 4/22/2008
    Message  : //////////////////Unhandled Exception////////////////
    ^^-------------------------------------------------------------------^^
    Computer : DBSERVER
    Date  : 11:40:40 AM
    Time  : 4/22/2008
    Message  : at Catalyst.CATS.Sockets.UdpClient.ThreadMethod()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    ^^-------------------------------------------------------------------^^

     

    Process is crashed after this unhandled exception.

    I am not understanding , I have inserted all the code in the exception handling block, but still getting this unhandled exception.

    Please help me out.

     

     

    Thanks for your support once again!

     

     

    Tuesday, April 22, 2008 7:42 AM
  • The stack trace information clearly pointed out that the exception was thrown from inside the Catalyst.CATS.Sockets.UdpClient.ThreadMethod function bacause of a invalid array argument passed into this function. Please check it, or you can post the code here.
    Tuesday, April 22, 2008 8:19 AM
  • Hi,

    For your reference I have inserted the code below:

     

    private void ThreadMethod()

    {

    byte []bytes;

    string packet = string.Empty;

    while (true)

    {

    try

    {

    bytes = udpClient.Receive(ref endPoint);                          //// System.Net.Sockets.UdpClient udpClient;

    packet = Encoding.ASCII.GetString(bytes);

     

    if(packet != null && packet.Length >0)                  

         packetsReceived.Enqueue(packet);        //// packetReceived is a queue

     

    }

    catch (Exception ee)

    {

    throw ee;                                                             //// Handle on the calling side

    }

    }

    }

     

     

     

    Tuesday, April 22, 2008 8:56 AM
  • You're not rethrowing ee, just merely begining a new exception flow using the same exception object instance. This will wipe all the stack trace information associated with the exception, so we cannot find the root of the exception using the information you provided.
    For more details about throwing usage in catch block, please visit the following reference:

    Rethrow an exception using throw.

    Thanks!
    Tuesday, April 22, 2008 9:57 AM
  • Ok. I totally understand. I will try using  throw statement.But before rethrowing the exception I have added to write stacktrace in log file. I have deployed to the client side. Let see what we get.

     

    Thanks!

     

     

    Tuesday, April 22, 2008 12:12 PM
  • Hi, Feng Chen

    Today after deploying on the client side. I found the following exception in err log, on receiving the packets from UdpClient.

     

    ^-------------------------------------------------------------------^^
    Computer : MAINSERVER
    Date  : 9:55:57 AM
    Time  : 4/23/2008
    Message  : In UdpClient in General Exception Catch
    ^^-------------------------------------------------------------------^^
    Computer : MAINSERVER
    Date  : 9:55:57 AM
    Time  : 4/23/2008
    Message  : System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
       at System.Threading.Thread.Sleep(Int32 millisecondsTimeout)
       at Catalyst.CATS.DBService.DBBranch.capFeedReader()
    ^^-------------------------------------------------------------------^^
    Machine  : MAINSERVER
    Source  : mscorlib
    Date  : 9:55:57 AM
    Time  : 4/23/2008
    Error Type : System.Threading.ThreadAbortException
    Error Msg : Thread was being aborted.
    Method  : SleepInternal
    Line#  : at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
       at System.Threading.Thread.Sleep(Int32 millisecondsTimeout)
       at Catalyst.CATS.DBService.DBBranch.pingMessageReader()
    Stack Trace : at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
       at System.Threading.Thread.Sleep(Int32 millisecondsTimeout)
       at Catalyst.CATS.DBService.DBBranch.pingMessageReader()
    ^^-------------------------------------------------------------------^^
    Computer : MAINSERVER
    Date  : 9:55:57 AM
    Time  : 4/23/2008
    Message  : at System.Net.UnsafeNclNativeMethods.OSSOCK.recvfrom(IntPtr socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags, Byte[] socketAddress, Int32& socketAddressSize)
       at System.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP)
       at System.Net.Sockets.UdpClient.Receive(IPEndPoint& remoteEP)
       at Catalyst.CATS.Sockets.UdpClient.ThreadMethod()
    ^^-------------------------------------------------------------------^^

     

    This exception aborts the running thread. I see there are two packet recieved at the same time.

    Which causes this exception? because I have tested the recieved packets in our local tesing enivronment it works fine.

    Your suggestion is needy here. Waiting for your response.

     

    Thanks

     

    Wednesday, April 23, 2008 6:58 AM
  • When a call is made to the Thread.Abort Method method to destroy a thread, the common language runtime throws a ThreadAbortException.

    For Socket programming issue, you open a new thread at
    .NET Framework Networking and Communication. forum.

    Thanks!


    Thursday, April 24, 2008 7:05 AM