Bug 925 - NRE at System.Web.SessionState.SessionInProcHandler.GetItemInternal(..)
Summary: NRE at System.Web.SessionState.SessionInProcHandler.GetItemInternal(..)
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-09-20 06:19 UTC by Pablo Ruiz García
Modified: 2011-09-26 08:10 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Test case (7.09 KB, application/x-gzip)
2011-09-26 08:07 UTC, Nikita Tsukanov

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 925 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Pablo Ruiz García 2011-09-20 06:19:30 UTC
Randomly an ASP/ASP.MVC application running on mono throws the following exception:

System.NullReferenceException: Object reference not set to an instance of an object
  at System.Web.SessionState.SessionInProcHandler.GetItemInternal (System.Web.HttpContext context, System.String id, System.Boolean& locked, System.TimeSpan& lockAge, System.Object& lockId, System.Web.SessionState.SessionStateActions& actions, Boolean exclusive) [0x00054] in mono-2.10.2/mcs/class/System.Web/System.Web.SessionState_2.0/SessionInProcHandler.cs:166

This bug is related (but not the same) to: https://bugzilla.novell.com/show_bug.cgi?id=669807

From looking at the code looks like the session item object has been disposed before entering GetItemInternal.. and as there is a missing item.rwlock == null check, however due to the complexity of the code I'm not sure which should be the optimal fix (assume already locked?  to
Comment 1 Nikita Tsukanov 2011-09-26 08:07:33 UTC
Created attachment 490 [details]
Test case

I have the same problem, but I've managed to create some kind of test case that reproduces it quickly.

Just start it and click the button several times.
Comment 2 Nikita Tsukanov 2011-09-26 08:10:50 UTC
Oh, sorry, this "test case" is already exists in the bug report from your link. I've not seen it, because I get here when tried to report the same bug and saw it in possible duplicates list.