You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Nicko Cadell (JIRA)" <ji...@apache.org> on 2005/06/20 21:20:18 UTC

[jira] Created: (LOG4NET-35) Exception rendering ThreadContextStack if null value pushed into stack

Exception rendering ThreadContextStack if null value pushed into stack
----------------------------------------------------------------------

         Key: LOG4NET-35
         URL: http://issues.apache.org/jira/browse/LOG4NET-35
     Project: Log4net
        Type: Bug
  Components: Core  
    Versions: 1.2.9    
    Reporter: Nicko Cadell
 Assigned to: Nicko Cadell 
     Fix For: 1.2.10


If a null value is pushed into a ThreadContext stack then an internal log4net error is generated when the ThreadContextStack is rendered.
The following error and stack trace are output into the log:

<log4net.Error>Exception rendering object type [log4net.Util.ThreadContextStack]<stackTrace>System.NullReferenceException: Object reference not set to an instance of an object.
   at log4net.Util.StackFrame.get_FullMessage()
   at log4net.Util.ThreadContextStack.GetFullMessage()
   at log4net.Util.ThreadContextStack.ToString()
   at log4net.ObjectRenderer.DefaultRenderer.RenderObject(RendererMap rendererMap, Object obj, TextWriter writer)
   at log4net.ObjectRenderer.RendererMap.FindAndRender(Object obj, TextWriter writer)</stackTrace></log4net.Error>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (LOG4NET-35) Exception rendering ThreadContextStack if null value pushed into stack

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-35?page=all ]
     
Nicko Cadell resolved LOG4NET-35:
---------------------------------

    Resolution: Fixed

Fixed by adding additional check for null parent in ThreadContextStack. Added tests to reproduce issue, and verify fix.

> Exception rendering ThreadContextStack if null value pushed into stack
> ----------------------------------------------------------------------
>
>          Key: LOG4NET-35
>          URL: http://issues.apache.org/jira/browse/LOG4NET-35
>      Project: Log4net
>         Type: Bug
>   Components: Core
>     Versions: 1.2.9
>     Reporter: Nicko Cadell
>     Assignee: Nicko Cadell
>      Fix For: 1.2.10

>
> If a null value is pushed into a ThreadContext stack then an internal log4net error is generated when the ThreadContextStack is rendered.
> The following error and stack trace are output into the log:
> <log4net.Error>Exception rendering object type [log4net.Util.ThreadContextStack]<stackTrace>System.NullReferenceException: Object reference not set to an instance of an object.
>    at log4net.Util.StackFrame.get_FullMessage()
>    at log4net.Util.ThreadContextStack.GetFullMessage()
>    at log4net.Util.ThreadContextStack.ToString()
>    at log4net.ObjectRenderer.DefaultRenderer.RenderObject(RendererMap rendererMap, Object obj, TextWriter writer)
>    at log4net.ObjectRenderer.RendererMap.FindAndRender(Object obj, TextWriter writer)</stackTrace></log4net.Error>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira