[Mono-bugs] [Bug 333898] New: NullReferenceException in SessionInProcHandler. SetAndReleaseItemExclusive
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Oct 15 09:35:16 EDT 2007
Summary: NullReferenceException in
Product: Mono: Class Libraries
Priority: P5 - None
AssignedTo: mhabersack at novell.com
ReportedBy: jim.matysczak at metier.com
QAContact: mono-bugs at ximian.com
Found By: Third Party Developer/Partner
I have an application that I am converting from .NET 1.1 to .NET 2.0 and from
Mono 1.2.2 (mod_mono/xsp) to 188.8.131.52 (mod_mono/xsp2). I am on Fedora Core 6.
Several pages which work correctly in Mono 1.2.2 (xsp) return the following
error in 184.108.40.206(xsp2):
Object reference not set to an instance of an object
Description: Error processing request.
Error Message: HTTP 500. System.NullReferenceException: Object reference not
set to an instance of an object
System.NullReferenceException: Object reference not set to an instance of an
(System.Web.HttpContext context, System.String id,
System.Web.SessionState.SessionStateStoreData item, System.Object lockId,
Boolean newItem) [0x000e1] in
I am not able to create an example app to provide you - the examples apps that
I created do not return this error.
This is how the page in my application that exhibits this error is setup:
-> Page "A" has two iframes. Each iframe loads a page (page "B" and page "C").
-> Page "C" has an iframe that loads page "D".
When I load page "A", page "A" loads correctly. Pages "C" and "D" usually load
correctly, but "B" will return with the above NullReferenceException.
I looked through the code at line 304 in the 220.127.116.11 version of
SessionInProcHandler.cs. The line is:
inProcItem.items = item.Items;
Since "inProcItem" gets used on previous lines and "item" doesn't. It appears
that "item" is null. Meaning SetAndReleaseItemExclusive is being called with a
null SessionStateStoreData. Which from my read of the spec should never happen.
Also, in looking through my application's log file the pages (A to C) load like
1) Page "A" - Fully renders. (Page.Render finishes)
2) Page "C" - Partial renders. (Page.OnInit is running)
3) Page "B" - Partial renders. (Page.OnInit is running)
The NullReferenceException usually occurs here.
4) Page "B" - Appears again in the log as being requested with a URI of my
application's error page instead of the page's actual URI. Also, I checked the
http traffic and page "B" is not requested by my browser. So it appears that
after the error, page "B" is just being rendered again. Both page "B"'s and
page "C"'s "Page.Render" finishes.
5) Page "D" - Fully renders. (Page.Render finishes)
What I find odd about this is that pages "B" and "C" have overlapping
processing. According to my read of the spec this should only happen if both
pages' "EnableSessionState" property is set to "ReadOnly" - which it is not.
The "EnableSessionState" property is not set - so a default of "true" should
apply. So the SessionStateModule should not allow the overlap. In the above
case, the SessionStateModule should block on page "B" until page "C" finishes.
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs