From time to time, my clients gets this error.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly)
at AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry)
at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e)
at System.Web.UI.ScriptManager.RegisterScripts()
at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Comments: I added the suggestion on, http://ajaxcontroltoolkit.codeplex.com/SourceControl/network/Forks/etolmachev/ToolkitScriptManager26752 the lock around the cache. This didnt resolve the issue. The w3wp process hang with 100% cpu. A few long threads gives error below Thread 48 - System ID 58864 Entry point ntdll!RtlUserThreadStart+1d Create time 7-8-2012 8:00:03 Time spent in user mode 0 Days 00:08:10.529 Time spent in kernel mode 0 Days 00:00:09.703 This thread is enumerating a System.Collections.Generic.Dictionary object The thread has evidence of .net exceptions on the stack. Check the Previous .NET Exceptions Report (Exceptions in all .NET Thread Stacks) to view more details of the associated exception .NET Call Stack Function System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].FindEntry(System.__Canon) System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].TryGetValue(System.__Canon, System.__Canon ByRef) AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(System.Reflection.Assembly) AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry) AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(System.Web.UI.ScriptReferenceEventArgs) System.Web.UI.ScriptManager.RegisterScripts() System.Web.UI.ScriptManager.OnPagePreRenderComplete(System.Object, System.EventArgs) System.Web.UI.Page.OnPreRenderComplete(System.EventArgs) System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean) System.Web.UI.Page.ProcessRequest(Boolean, Boolean) System.Web.UI.Page.ProcessRequest() System.Web.UI.Page.ProcessRequest(System.Web.HttpContext) ASP.search_engine_showobject_aspx.ProcessRequest(System.Web.HttpContext) System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef) System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception) System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback) System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext) System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32) System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32) DomainNeutralILStubClass.IL_STUB(Int64, Int64, Int64, Int32) DomainNeutralILStubClass.IL_STUB(IntPtr, System.Web.RequestNotificationStatus ByRef) System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32) System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32) DomainNeutralILStubClass.IL_STUB(Int64, Int64, Int64, Int32) Full Call Stack Function Source mscorlib_ni+30d650 mscorlib_ni+30d544 0x000007ff`00bb5f77 0x000007ff`00bb577a 0x000007ff`00383726 System_Web_Extensions_ni+20e24f System_Web_Extensions_ni+20f498 System_Web_ni+d2a6ae System_Web_ni+29cfc8 System_Web_ni+29bff0 System_Web_ni+29bf1b System_Web_ni+29beb0 0x000007ff`0035d189 System_Web_ni+2a3357 System_Web_ni+26671b System_Web_ni+953971 System_Web_ni+9443b2 System_Web_ni+925df9 System_Web_ni+a4dde1 System_Web_ni+a4d9ab System_Web_ni+a4cc14 mscorwks!UMThunkStubAMD64+7a webengine!W3_MGD_HANDLER::ProcessNotification+107 webengine!W3_MGD_HANDLER::DoWork+312 webengine!RequestDoWork+44e webengine!CMgdEngHttpModule::OnExecuteRequestHandler+24 iiscore!NOTIFICATION_CONTEXT::RequestDoWork+233 iiscore!NOTIFICATION_CONTEXT::CallModulesInternal+174 iiscore!NOTIFICATION_CONTEXT::CallModules+25 iiscore!W3_CONTEXT::DoWork+34d iiscore!W3_CONTEXT::IndicateCompletion+8c webengine!MgdIndicateCompletion+61 mscorwks!DoNDirectCall__PatchGetThreadCall+7b System_Web_ni+94e47b System_Web_ni+a4df10 System_Web_ni+a4d9ab System_Web_ni+a4cc14 mscorwks!UM2MThunk_WrapperHelper+4b mscorwks!UM2MThunk_WrapperWorker+99 mscorwks!UM2MThunk_Wrapper+19 mscorwks!Thread::DoADCallBack+145 mscorwks!UM2MDoADCallBack+90 mscorwks!UMThunkStubAMD64+276 webengine!W3_MGD_HANDLER::ProcessNotification+107 webengine!ProcessNotificationCallback+46 mscorwks!UnManagedPerAppDomainTPCount::DispatchWorkItem+157 mscorwks!ThreadpoolMgr::WorkerThreadStart+1ba mscorwks!Thread::intermediateThreadProc+78 kernel32!BaseThreadInitThunk+d ntdll!RtlUserThreadStart+1d
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly)
at AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry)
at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e)
at System.Web.UI.ScriptManager.RegisterScripts()
at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Comments: I added the suggestion on, http://ajaxcontroltoolkit.codeplex.com/SourceControl/network/Forks/etolmachev/ToolkitScriptManager26752 the lock around the cache. This didnt resolve the issue. The w3wp process hang with 100% cpu. A few long threads gives error below Thread 48 - System ID 58864 Entry point ntdll!RtlUserThreadStart+1d Create time 7-8-2012 8:00:03 Time spent in user mode 0 Days 00:08:10.529 Time spent in kernel mode 0 Days 00:00:09.703 This thread is enumerating a System.Collections.Generic.Dictionary object The thread has evidence of .net exceptions on the stack. Check the Previous .NET Exceptions Report (Exceptions in all .NET Thread Stacks) to view more details of the associated exception .NET Call Stack Function System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].FindEntry(System.__Canon) System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].TryGetValue(System.__Canon, System.__Canon ByRef) AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(System.Reflection.Assembly) AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry) AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(System.Web.UI.ScriptReferenceEventArgs) System.Web.UI.ScriptManager.RegisterScripts() System.Web.UI.ScriptManager.OnPagePreRenderComplete(System.Object, System.EventArgs) System.Web.UI.Page.OnPreRenderComplete(System.EventArgs) System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean) System.Web.UI.Page.ProcessRequest(Boolean, Boolean) System.Web.UI.Page.ProcessRequest() System.Web.UI.Page.ProcessRequest(System.Web.HttpContext) ASP.search_engine_showobject_aspx.ProcessRequest(System.Web.HttpContext) System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef) System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception) System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback) System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext) System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32) System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32) DomainNeutralILStubClass.IL_STUB(Int64, Int64, Int64, Int32) DomainNeutralILStubClass.IL_STUB(IntPtr, System.Web.RequestNotificationStatus ByRef) System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32) System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32) DomainNeutralILStubClass.IL_STUB(Int64, Int64, Int64, Int32) Full Call Stack Function Source mscorlib_ni+30d650 mscorlib_ni+30d544 0x000007ff`00bb5f77 0x000007ff`00bb577a 0x000007ff`00383726 System_Web_Extensions_ni+20e24f System_Web_Extensions_ni+20f498 System_Web_ni+d2a6ae System_Web_ni+29cfc8 System_Web_ni+29bff0 System_Web_ni+29bf1b System_Web_ni+29beb0 0x000007ff`0035d189 System_Web_ni+2a3357 System_Web_ni+26671b System_Web_ni+953971 System_Web_ni+9443b2 System_Web_ni+925df9 System_Web_ni+a4dde1 System_Web_ni+a4d9ab System_Web_ni+a4cc14 mscorwks!UMThunkStubAMD64+7a webengine!W3_MGD_HANDLER::ProcessNotification+107 webengine!W3_MGD_HANDLER::DoWork+312 webengine!RequestDoWork+44e webengine!CMgdEngHttpModule::OnExecuteRequestHandler+24 iiscore!NOTIFICATION_CONTEXT::RequestDoWork+233 iiscore!NOTIFICATION_CONTEXT::CallModulesInternal+174 iiscore!NOTIFICATION_CONTEXT::CallModules+25 iiscore!W3_CONTEXT::DoWork+34d iiscore!W3_CONTEXT::IndicateCompletion+8c webengine!MgdIndicateCompletion+61 mscorwks!DoNDirectCall__PatchGetThreadCall+7b System_Web_ni+94e47b System_Web_ni+a4df10 System_Web_ni+a4d9ab System_Web_ni+a4cc14 mscorwks!UM2MThunk_WrapperHelper+4b mscorwks!UM2MThunk_WrapperWorker+99 mscorwks!UM2MThunk_Wrapper+19 mscorwks!Thread::DoADCallBack+145 mscorwks!UM2MDoADCallBack+90 mscorwks!UMThunkStubAMD64+276 webengine!W3_MGD_HANDLER::ProcessNotification+107 webengine!ProcessNotificationCallback+46 mscorwks!UnManagedPerAppDomainTPCount::DispatchWorkItem+157 mscorwks!ThreadpoolMgr::WorkerThreadStart+1ba mscorwks!Thread::intermediateThreadProc+78 kernel32!BaseThreadInitThunk+d ntdll!RtlUserThreadStart+1d