none
Problems With .NET Framework 1.1, oracle ODP and Windows Server 2003 Enterprise RRS feed

  • Question

  • Dear All,

    I work in a financial software development company.
    We´ve developed a server application that has been crashing due to an strange problem.
    The information we could gather was that something happened during normal execution of the
    server and an exception appears. When the logging tool tries to obtain the exception message
    the stack trace appears corrupted, with entries in null. The applications hangs after this because
    the exception seams unmanageable. (we are no using AppDomains)

    This only happens in windows 2003 server enterprise edition.
    In other platforms we could not reproduce it.

    The .NET frameworks is 1.1 with all its service packs.

    This is the stack trace:

    <log4net.Error>Exception rendering object type [PayTrue.PayStudio.RequestDispatcher.Interface.Error.Exception.RDBugException]<stackTrace>System.NullReferenceException: Object reference not set to an instance of an object.
       at System.Diagnostics.StackTrace.GetStackFramesInternal(StackFrameHelper sfh, Int32 iSkip, Exception e)
       at System.Diagnostics.StackTrace.CaptureStackTrace(Int32 iSkip, Boolean fNeedFileInfo, Thread targetThread, Exception e)
       at System.Diagnostics.StackTrace..ctor(Exception e, Boolean fNeedFileInfo)
       at System.Environment.GetStackTrace(Exception e)
       at System.Environment.GetStackTrace(Exception e)
       at System.Exception.get_StackTrace()
       at System.Exception.ToString()
       at System.Exception.ToString()
       at System.Exception.ToString()
       at System.Exception.ToString()
       at log4net.ObjectRenderer.DefaultRenderer.RenderObject(RendererMap rendererMap, Object obj, TextWriter writer)
       at log4net.ObjectRenderer.RendererMap.FindAndRender(Object obj, TextWriter writer)</stackTrace></log4net.Error


    Hope Someone could help,

    Regards

    German.
    Wednesday, June 4, 2008 7:48 PM

Answers

  • Lets see what we can get out of this stack.
    at System.Exception.ToString()
       at System.Exception.ToString()
       at System.Exception.ToString()
       at System.Exception.ToString()

    You have obviously 4 nested exception objects. The 4th innermost exception (there could be more) has some problem.
    The last exception does call ToString and then tries to append its own stack trace.
       at System.Environment.GetStackTrace(Exception e)
       at System.Environment.GetStackTrace(Exception e)
       at System.Exception.get_StackTrace()
       at System.Exception.ToString()

    The BCL Code looks like this:
       if (this.StackTrace != null)
        {
            str2 = str2 + Environment.NewLine + this.StackTrace;
        }

    And the StackTrace property itself:
    public virtual string StackTrace  
    {  
        get  
        {  
            if (this._stackTraceString == null)  
            {  
                if (this._stackTrace == null)  
                {  
                    return null;  
                }  
                this._stackTraceString = Environment.GetStackTrace(this);  
            }  
            return (this._remoteStackTraceString + this._stackTraceString);  
        }  
    }  
       
     
       
     

    Environment.GetStackTrace itself is not recursive but it is shown twice in the StackTrace. It seems that the code of Environment.GetStackTrace has been corrupted.
    Do you have any unmanaged code parts or custom PInvoke calls to unmanaged code which could overwrite some of your own code by accident?

    Yours,
      Alois Kraus
    • Marked as answer by Bruno Yu Wednesday, June 11, 2008 3:38 AM
    Sunday, June 8, 2008 4:44 PM
  • Most Oracle problems are permissions and platform related because Oracle 9i, 10g and 11g are 64bits by default.  so you need to install the correct Oracle client software and apply relevant permissions to Oracle home folder.  I have covered similar problem in the thread below and start a new thread in that forum if you still need help.


    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3282215&SiteID=1


    An Elliptic curve is modular ~ Taniyama and Shimura
    • Marked as answer by Bruno Yu Wednesday, June 11, 2008 3:38 AM
    Monday, June 9, 2008 7:52 PM
    Moderator

All replies

  • Lets see what we can get out of this stack.
    at System.Exception.ToString()
       at System.Exception.ToString()
       at System.Exception.ToString()
       at System.Exception.ToString()

    You have obviously 4 nested exception objects. The 4th innermost exception (there could be more) has some problem.
    The last exception does call ToString and then tries to append its own stack trace.
       at System.Environment.GetStackTrace(Exception e)
       at System.Environment.GetStackTrace(Exception e)
       at System.Exception.get_StackTrace()
       at System.Exception.ToString()

    The BCL Code looks like this:
       if (this.StackTrace != null)
        {
            str2 = str2 + Environment.NewLine + this.StackTrace;
        }

    And the StackTrace property itself:
    public virtual string StackTrace  
    {  
        get  
        {  
            if (this._stackTraceString == null)  
            {  
                if (this._stackTrace == null)  
                {  
                    return null;  
                }  
                this._stackTraceString = Environment.GetStackTrace(this);  
            }  
            return (this._remoteStackTraceString + this._stackTraceString);  
        }  
    }  
       
     
       
     

    Environment.GetStackTrace itself is not recursive but it is shown twice in the StackTrace. It seems that the code of Environment.GetStackTrace has been corrupted.
    Do you have any unmanaged code parts or custom PInvoke calls to unmanaged code which could overwrite some of your own code by accident?

    Yours,
      Alois Kraus
    • Marked as answer by Bruno Yu Wednesday, June 11, 2008 3:38 AM
    Sunday, June 8, 2008 4:44 PM
  • Most Oracle problems are permissions and platform related because Oracle 9i, 10g and 11g are 64bits by default.  so you need to install the correct Oracle client software and apply relevant permissions to Oracle home folder.  I have covered similar problem in the thread below and start a new thread in that forum if you still need help.


    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3282215&SiteID=1


    An Elliptic curve is modular ~ Taniyama and Shimura
    • Marked as answer by Bruno Yu Wednesday, June 11, 2008 3:38 AM
    Monday, June 9, 2008 7:52 PM
    Moderator