logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Favre (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-537) Crash on log during AssemblyLoad event
Date Wed, 30 Nov 2016 13:12:58 GMT

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

Guillaume Favre commented on LOG4NET-537:
-----------------------------------------

Thank you for your answer.
Here is the stack trace.



	mscorlib.dll!System.Diagnostics.Assert.Fail(string conditionString, string message, string
windowTitle, int exitCode, System.Diagnostics.StackTrace.TraceFormat stackTraceFormat, int
numStackFramesToSkip)	Unknown
 	mscorlib.dll!System.Environment.ResourceHelper.GetResourceStringCode(object userDataIn)
Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Environment.ResourceHelper.GetResourceString(string key, System.Globalization.CultureInfo
culture)	Unknown
 	mscorlib.dll!System.Environment.ResourceHelper.GetResourceString(string key)	Unknown
 	mscorlib.dll!System.Environment.GetResourceStringLocal(string key)	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Diagnostics.StackTrace.ToString(System.Diagnostics.StackTrace.TraceFormat
traceFormat)	Unknown
 	mscorlib.dll!System.Environment.GetStackTrace(System.Exception e, bool needFileInfo)	Unknown
 	mscorlib.dll!System.Exception.GetStackTrace(bool needFileInfo)	Unknown
 	mscorlib.dll!System.Exception.ToString(bool needFileLineInfo, bool needMessage)	Unknown
 	mscorlib.dll!System.Exception.ToString()	Unknown
 	log4net.dll!log4net.Util.LogLog.Error(System.Type source, string message, System.Exception
exception)	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.Log(System.Type callerStackBoundaryDeclaringType,
log4net.Core.Level level, object message, System.Exception exception)	Unknown
 	log4net.dll!log4net.Core.LogImpl.Debug(object message)	Unknown
 	BugLog4Net.exe!BugLog4Net.Program.CurrentDomainAssemblyLoad(object sender, System.AssemblyLoadEventArgs
args) Line 35	C#
 	mscorlib.dll!System.AppDomain.OnAssemblyLoadEvent(System.Reflection.RuntimeAssembly LoadedAssembly)
Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(string name,
System.Globalization.CultureInfo culture, System.Version version, bool throwOnFileNotFound,
ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo
lookForCulture, ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo
culture, System.Collections.Generic.Dictionary<string,System.Resources.ResourceSet>
localResourceSets, bool tryParents, bool createIfNotExists, ref System.Threading.StackCrawlMark
stackMark)	Unknown
 	mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo
requestedCulture, bool createIfNotExists, bool tryParents, ref System.Threading.StackCrawlMark
stackMark)	Unknown
 	mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo
culture, bool createIfNotExists, bool tryParents)	Unknown
 	mscorlib.dll!System.Resources.ResourceManager.GetString(string name, System.Globalization.CultureInfo
culture)	Unknown
 	System.Core.dll!System.SR.GetString(string name)	Unknown
 	System.Core.dll!System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(System.Threading.ReaderWriterLockSlim.TimeoutTracker
timeout)	Unknown
 	System.Core.dll!System.Threading.ReaderWriterLockSlim.TryEnterReadLock(System.Threading.ReaderWriterLockSlim.TimeoutTracker
timeout)	Unknown
 	log4net.dll!log4net.Util.ReaderWriterLock.AcquireReaderLock()	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent
loggingEvent)	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.ForcedLog(System.Type callerStackBoundaryDeclaringType,
log4net.Core.Level level, object message, System.Exception exception)	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.Log(System.Type callerStackBoundaryDeclaringType,
log4net.Core.Level level, object message, System.Exception exception)	Unknown
 	log4net.dll!log4net.Core.LogImpl.Debug(object message)	Unknown
 	BugLog4Net.exe!BugLog4Net.Program.CurrentDomainAssemblyLoad(object sender, System.AssemblyLoadEventArgs
args) Line 35	C#
 	mscorlib.dll!System.AppDomain.OnAssemblyLoadEvent(System.Reflection.RuntimeAssembly LoadedAssembly)
Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(string name,
System.Globalization.CultureInfo culture, System.Version version, bool throwOnFileNotFound,
ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo
lookForCulture, ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo
culture, System.Collections.Generic.Dictionary<string,System.Resources.ResourceSet>
localResourceSets, bool tryParents, bool createIfNotExists, ref System.Threading.StackCrawlMark
stackMark)	Unknown
 	mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo
requestedCulture, bool createIfNotExists, bool tryParents, ref System.Threading.StackCrawlMark
stackMark)	Unknown
 	mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo
culture, bool createIfNotExists, bool tryParents)	Unknown
 	mscorlib.dll!System.Resources.ResourceManager.GetString(string name, System.Globalization.CultureInfo
culture)	Unknown
 	mscorlib.dll!System.Environment.ResourceHelper.GetResourceStringCode(object userDataIn)
Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Environment.ResourceHelper.GetResourceString(string key, System.Globalization.CultureInfo
culture)	Unknown
 	mscorlib.dll!System.Environment.ResourceHelper.GetResourceString(string key)	Unknown
 	mscorlib.dll!System.Environment.GetResourceStringLocal(string key)	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Diagnostics.StackTrace.ToString(System.Diagnostics.StackTrace.TraceFormat
traceFormat)	Unknown
 	mscorlib.dll!System.Environment.GetStackTrace(System.Exception e, bool needFileInfo)	Unknown
 	mscorlib.dll!System.Exception.GetStackTrace(bool needFileInfo)	Unknown
 	mscorlib.dll!System.Exception.ToString(bool needFileLineInfo, bool needMessage)	Unknown
 	mscorlib.dll!System.Exception.ToString()	Unknown
 	log4net.dll!log4net.ObjectRenderer.DefaultRenderer.RenderObject(log4net.ObjectRenderer.RendererMap
rendererMap, object obj, System.IO.TextWriter writer)	Unknown
 	log4net.dll!log4net.ObjectRenderer.RendererMap.FindAndRender(object obj, System.IO.TextWriter
writer)	Unknown
 	log4net.dll!log4net.ObjectRenderer.RendererMap.FindAndRender(object obj)	Unknown
 	log4net.dll!log4net.Core.LoggingEvent.GetExceptionString()	Unknown
 	log4net.dll!log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter writer,
log4net.Core.LoggingEvent loggingEvent)	Unknown
 	log4net.dll!log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent
loggingEvent)	Unknown
 	log4net.dll!log4net.Appender.ConsoleAppender.Append(log4net.Core.LoggingEvent loggingEvent)
Unknown
 	log4net.dll!log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent loggingEvent)
Unknown
 	log4net.dll!log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent
loggingEvent)	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent
loggingEvent)	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.ForcedLog(System.Type callerStackBoundaryDeclaringType,
log4net.Core.Level level, object message, System.Exception exception)	Unknown
 	log4net.dll!log4net.Repository.Hierarchy.Logger.Log(System.Type callerStackBoundaryDeclaringType,
log4net.Core.Level level, object message, System.Exception exception)	Unknown
 	log4net.dll!log4net.Core.LogImpl.Error(object message, System.Exception exception)	Unknown
 	BugLog4Net.exe!BugLog4Net.Program.Main(string[] args) Line 26	C#


> Crash on log during AssemblyLoad event
> --------------------------------------
>
>                 Key: LOG4NET-537
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-537
>             Project: Log4net
>          Issue Type: Bug
>    Affects Versions: 1.2.15
>         Environment: Visual Studio 2013,C#, Dot.Net 4.61
> nuget  : <package id="log4net" version="2.0.5" targetFramework="net461" />
>            Reporter: Guillaume Favre
>
> Hello,
> the following code cause the program to crash.
> class Program
>     {
>         private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
>         static void Main(string[] args)
>         {
>             try
>             {
>                 AppDomain.CurrentDomain.AssemblyLoad += CurrentDomainAssemblyLoad;
>                 log4net.Config.BasicConfigurator.Configure();
>                 Exception e = new Exception("Toto");
>                 throw e;
>             }
>             catch (Exception e)
>             {
>                 Log.Error("Error ", e);
>             }
>         }
>         private static void CurrentDomainAssemblyLoad(object sender, AssemblyLoadEventArgs
args)
>         {
>             Log.Debug("COUCOU");
>         }
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message