[Mono-bugs] [Bug 80682][Nor] Changed - [2.0] Swallowed NRE from SessionStateModule
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Mar 5 20:49:11 EST 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by miguel at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80682
--- shadow/80682 2007-02-19 15:38:59.000000000 -0500
+++ shadow/80682.tmp.5118 2007-03-05 20:49:11.000000000 -0500
@@ -2,13 +2,13 @@
Product: Mono: Class Libraries
Version: unspecified
OS: All
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: robertj at gmx.net
QAContact: mono-bugs at ximian.com
TargetMilestone: 2_0
@@ -26,6 +26,80 @@
in runtime's exception handler.
IP 02F600E2 at offset 0x12 of method
System.Web.SessionState.SessionStateModule:CreateContainer(string,System.Web.SessionState.SessionStateStoreData,bool,bool)
(02F600D0 02F60160)[domain 025F39C0 - ASPHOST_ecf9673d]
/usr/src/mono/head/mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateModule.cs:349
+
+------- Additional Comments From miguel at ximian.com 2007-03-05 20:49 -------
+This happens here:
+
+Here: System.NullReferenceException: Object reference not set to an
+instance of an object
+ at System.Web.SessionState.SessionStateModule.CreateContainer
+(System.String sessionId,
+System.Web.SessionState.SessionStateStoreData data, Boolean isNew,
+Boolean isReadOnly) [0x00000]
+ at System.Web.SessionState.SessionStateModule.CreateContainer ()
+ at System.Web.SessionState.SessionStateModule.OnSessionExpired ()
+ at System.MulticastDelegate.invoke_void_string_SessionStateStoreData ()
+ at System.Web.SessionState.SessionInProcHandler.OnSessionRemoved ()
+ at
+System.MulticastDelegate.invoke_void_string_object_CacheItemRemovedReason
+()
+ at System.Web.Caching.Cache.Remove ()
+ at System.Web.Caching.Cache.Remove ()
+ at System.Web.SessionState.SessionInProcHandler.ResetItemTimeout ()
+ at System.Web.SessionState.SessionStateModule.OnReleaseRequestState ()
+ at System.MulticastDelegate.invoke_void_object_EventArgs ()
+ at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext ()
+ at System.Web.HttpApplication+<>c__CompilerGenerated3.MoveNext ()
+ at System.Web.HttpApplication.Tick ()
+ at System.Web.HttpApplication.Start ()
+ at
+System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest
+()
+ at System.Web.HttpRuntime.RealProcessRequest ()
+ at System.Web.HttpRuntime.ProcessRequest ()
+ at Mono.WebServer.MonoWorkerRequest.ProcessRequest ()
+ at Mono.WebServer.BaseApplicationHost.ProcessRequest ()
+ at Mono.WebServer.XSPApplicationHost.ProcessRequest ()
+ at Mono.WebServer.XSPWorker.RunInternal ()
+ at System.MulticastDelegate.invoke_void_object ()
+
+The SessionStateStoreData argument (the second parameter) is null when
+we invoke that function.
+
+The null happens because in
+System.Web.SessionState.SessionInProcHandler.OnSessionRemoved (in
+System.Web.SessionState_2.0/SessionInProcHandler.cs) we do this call:
+
+ expireCallback (key, value as SessionStateStoreData);
+
+The "value" though is of type System.Web.SessionState.InProcSessionItem
+
+Since this seems to happen only when we are shutting down the session,
+it seems like the HttpSessionStateContainer is only used temporarily,
+if that is the case, the following patch would do the trick, but is
+this correct?
+
+Index: System.Web.SessionState_2.0/SessionStateModule.cs
+===================================================================
+--- System.Web.SessionState_2.0/SessionStateModule.cs (revision 73325)
++++ System.Web.SessionState_2.0/SessionStateModule.cs (working copy)
+@@ -346,6 +346,11 @@
+ }
+
+ HttpSessionStateContainer CreateContainer (string
+sessionId, SessionStateStoreData data, bool isNew, bool isReadOnly) {
++ if (data == null)
++ return new HttpSessionStateContainer (
++ sessionId, null, null, 0, isNew,
++ config.Cookieless,
+config.Mode, isReadOnly);
++
+ return new HttpSessionStateContainer (
+ sessionId,
+ data.Items,
+
+This code was originally introduced by Konstantin Triger
+
More information about the mono-bugs
mailing list