Hello,
I am having pretty much the same problem that was covered your
September 2009 thread that can be found at
http://groups.google.com/group/nhprof/browse_thread/thread/1d8cf8a7009e5d1b/c784c4efe9aebd3b.
Basically I have a working application that runs in Visual Studio
2010 under .NET 3.5. When I upgrade to .NET 4.0, I get a
System.ExecutionEngineException. When I comment out the
NHibernateProfiler initialize line of code everything works properly
in .NET 4.0.
I updated to NHProf build 693 (the Appender DLL modified date is
6/17/2010) and still get the same error.
Below is the exception call stack:
> mscorlib.dll!System.RuntimeMethodHandle.Value.get() + 0x24 bytes
HibernatingRhinos.NHibernate.Profiler.Appender.DLL!
HibernatingRhinos.NHibernate.Profiler.Appender.StackTraceGenerator.MethodHandleAndILOffset.Create(System.RuntimeMethodHandle[]
methods, int[] offsets) + 0x80 bytes
[Lightweight Function]
HibernatingRhinos.NHibernate.Profiler.Appender.DLL!
HibernatingRhinos.NHibernate.Profiler.Appender.StackTraceGenerator.CheatClrAndUseDynamicMethodsToGetStackTraceFast.AnonymousMethod__2()
+ 0x25 bytes
HibernatingRhinos.NHibernate.Profiler.Appender.DLL!
HibernatingRhinos.NHibernate.Profiler.Appender.StackTraceGenerator.StackTraceCache.GetStackTace()
+ 0x4c bytes
HibernatingRhinos.NHibernate.Profiler.Appender.DLL!
HibernatingRhinos.NHibernate.Profiler.Appender.StackTraceGenerator.GetStackTrace()
+ 0x23 bytes
HibernatingRhinos.NHibernate.Profiler.Appender.DLL!
HibernatingRhinos.NHibernate.Profiler.Appender.AbstractNHibernateProfilerAppender.GetStackTrace(string
logger, string message, log4net.Core.Level level) + 0xa9 bytes
HibernatingRhinos.NHibernate.Profiler.Appender.DLL!
HibernatingRhinos.NHibernate.Profiler.Appender.AbstractNHibernateProfilerAppender.Append(log4net.Core.LoggingEvent
loggingEvent) + 0x2c7 bytes
log4net.DLL!
log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent
loggingEvent) + 0x14f bytes
log4net.DLL!
log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent
loggingEvent) + 0x129 bytes
log4net.DLL!
log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent
loggingEvent) + 0xfe bytes
log4net.DLL!
log4net.Repository.Hierarchy.Logger.ForcedLog(System.Type
callerStackBoundaryDeclaringType, log4net.Core.Level level, object
message, System.Exception exception) + 0x78 bytes
log4net.DLL!log4net.Repository.Hierarchy.Logger.Log(System.Type
callerStackBoundaryDeclaringType, log4net.Core.Level level, object
message, System.Exception exception) + 0xa8 bytes
log4net.DLL!log4net.Core.LogImpl.Debug(object message) + 0x43 bytes
NHibernate.DLL!
NHibernate.Transaction.AdoTransaction.Begin(System.Data.IsolationLevel
isolationLevel) + 0x115 bytes
NHibernate.DLL!NHibernate.Transaction.AdoTransaction.Begin() + 0x21
bytes
NHibernate.DLL!
NHibernate.AdoNet.ConnectionManager.BeginTransaction() + 0x2c bytes
NHibernate.DLL!NHibernate.Impl.SessionImpl.BeginTransaction() + 0xad
bytes
UCDArch.Data.DLL!
UCDArch.Data.NHibernate.DbContext.BeginTransaction() + 0x36 bytes
UCDArch.Web.DLL!
UCDArch.Web.Attributes.UseTransactionsByDefaultAttribute.OnActionExecuting(System.Web.Mvc.ActionExecutingContext
filterContext) + 0x81 bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(System.Web.Mvc.IActionFilter
filter, System.Web.Mvc.ActionExecutingContext preContext,
System.Func<System.Web.Mvc.ActionExecutedContext> continuation) + 0x52
bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters.AnonymousMethod__c()
+ 0x3e bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(System.Web.Mvc.IActionFilter
filter, System.Web.Mvc.ActionExecutingContext preContext,
System.Func<System.Web.Mvc.ActionExecutedContext> continuation) + 0xe4
bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters.AnonymousMethod__c()
+ 0x3e bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(System.Web.Mvc.IActionFilter
filter, System.Web.Mvc.ActionExecutingContext preContext,
System.Func<System.Web.Mvc.ActionExecutedContext> continuation) + 0xe4
bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters.AnonymousMethod__c()
+ 0x3e bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(System.Web.Mvc.ControllerContext
controllerContext,
System.Collections.Generic.IList<System.Web.Mvc.IActionFilter>
filters, System.Web.Mvc.ActionDescriptor actionDescriptor,
System.Collections.Generic.IDictionary<string,object> parameters) +
0x132 bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerActionInvoker.InvokeAction(System.Web.Mvc.ControllerContext
controllerContext, string actionName) + 0x259 bytes
System.Web.Mvc.dll!System.Web.Mvc.Controller.ExecuteCore() + 0x89
bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerBase.Execute(System.Web.Routing.RequestContext
requestContext) + 0x70 bytes
System.Web.Mvc.dll!
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(System.Web.Routing.RequestContext
requestContext) + 0x28 bytes
System.Web.Mvc.dll!
System.Web.Mvc.MvcHandler.BeginProcessRequest.AnonymousMethod__4() +
0x42 bytes