logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Psenner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-403) LocalDataStoreSlot exception when using log4net in Dispose method
Date Thu, 31 Oct 2013 07:11:25 GMT

    [ https://issues.apache.org/jira/browse/LOG4NET-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13809992#comment-13809992
] 

Dominik Psenner commented on LOG4NET-403:
-----------------------------------------

Is "ILog _log" a static property or attribute?

> LocalDataStoreSlot exception when using log4net in Dispose method
> -----------------------------------------------------------------
>
>                 Key: LOG4NET-403
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-403
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.11
>         Environment: Windows 7 64 bit
>            Reporter: PiotrG
>            Priority: Critical
>
> Setting ThreadContext property in Dispose method called by GC thread throws Exception:
> LocalDataStoreSlot storage has been freed
> Stacktrace:
>    w System.LocalDataStore.GetData(LocalDataStoreSlot slot)
>    w System.Threading.Thread.GetData(LocalDataStoreSlot slot)
>    w log4net.Util.ThreadContextProperties.GetProperties(Boolean create)
>    w log4net.Util.ThreadContextProperties.set_Item(String key, Object value)
>    w xxx.Dispose(Boolean freeAlsoManagedObjects)
>    w xxx.Finalize()
> Code:
>   private void Dispose(bool freeAlsoManagedObjects)
>         {
>           
>             if (_log.IsErrorEnabled) 
> ThreadContext.Properties["method"] = "Dispose"; // throws Exception
>            



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message