[Mono-bugs] [Bug 620411] New: RewritePath crashes with an unidentified null reference exeption in PostAcquireRequestState

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 7 06:17:05 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=620411

http://bugzilla.novell.com/show_bug.cgi?id=620411#c0


           Summary: RewritePath crashes with an unidentified null
                    reference exeption in PostAcquireRequestState
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86-64
        OS/Version: SLES 11
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: s.winkler at studdex.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6)
Gecko/20100625 Firefox/3.6.6

As stated in the summary, as of recent, we have the problem that
HttpApplication.Context.RewritePath crashes on our Linux server running our web
application via mod-mono. Something turns to null while the EventHandler
System.Web.Handlers.ScriptModule.PostAcquireRequestState is executed.

The circumstances are very strange: 
First off, the error only occurs if the virtual path in the mod-mono
configuration says "/", i.e. points to the root directory. If we set it to
something else, like "/testblabla/" or whatever, it works. No one knows why,
though.

Second, it used to work fine before, until we made one little change: We added
only one simple line ( <%@ Import Namespace="System.IO" %> ) to an aspx page
that didn't work before, because this part was missing (a few days before that
we converted our solution from a .NET Web Site to a Web Application and we
missed that page before). After that change has been commited to svn and pushed
to the server (we're updating our server via svn) the error started to occur.
We removed that line again, but it didn't help, the error always occured since
then, something must have been corrupted, but there is no evidence whatsoever
what might be causing this strange behaviour. Only a rollback to the old svn
version (the one that was commited before that change mentioned above was made)
helped for the moment, but now we can't update our website without killing the
URL-rewriting. 

We're developing on a Windows machine with Visual Studio and everything works
fine locally. That's why I assume that whatever happened to our web application
at that specific point is a problem that's only affecting mono and is therefore
a bug worthy of being posted here. We hope that someone will look into the
RewritePath implementation and find out under which circumstances an error like
this could occur and why it doesn't happen on IIS / VisualStudio Development
Server.

By the way, the target url is definitely not the problem, when replacing
RewritePath with Response.Redirect it goes to the correct location.

Here is the error with the stack trace:

System.NullReferenceException: Object reference not set to an instance of an
object
  at System.Web.Handlers.ScriptModule.PostAcquireRequestState (System.Object
sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication+<RunHooks>c__Iterator1.MoveNext () [0x00000] in
<filename unknown>:0 
  at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00000] in
<filename unknown>:0 
  at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0 

Reproducible: Always

Steps to Reproduce:
1. Create .NET Web Application that uses RewritePath in global.asax if the url
contains a certain keyword. Then create a svn-repository for it.
2. Take a linux web server running apache and mod-mono, and make a svn-checkout
pointing to that repository in a folder on that server. Then set up a vhost for
that directory.
3. Create an aspx page without a codebehind file (using a <script
runat="server">-block instead) that tries to read a file and put it on the
server. The page will crash because it doesn't know System.IO
4. Add the import command for System.IO to that page, commit it to svn and make
an svn up on the server.
5. Check if the URL with the rewriting-keyword works - if doesn't crash with
the error mentioned above, the error can't be replicated because the source of
the problem is so specific, that it only affects our web application (which
contains hundreds of files and thousands of lines of code, so we can't really
provide an example here).
Actual Results:  
If performing the steps above really leads to the same error that bugs us, you
will see the error message provided under "Details". 
(If not, I'm afraid the error isn't really reproduceable and has to be solved
by searching the code for omissions like forgotten "if (something ==
null)"-checks etc.)

Expected Results:  
Correct URL-rewriting.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list