[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


https://bugzilla.novell.com/show_bug.cgi?id=333898

           Summary: NullReferenceException in
                    SessionInProcHandler.SetAndReleaseItemExclusive
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: 32bit
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        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 1.2.5.1 (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 1.2.5.1(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 

Stack Trace: 
System.NullReferenceException: Object reference not set to an instance of an
object
at System.Web.SessionState.SessionInProcHandler.SetAndReleaseItemExclusive
(System.Web.HttpContext context, System.String id,
System.Web.SessionState.SessionStateStoreData item, System.Object lockId,
Boolean newItem) [0x000e1] in
/tmp/monobuild/build/BUILD/mono-1.2.5.1/mcs/class/System.Web/
System.Web.SessionState_2.0/SessionInProcHandler.cs:304 


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 1.2.5.1 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
this:
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 mailing list