[Mono-bugs] [Bug 471782] New: NRE in WebConnectionStream.Close()

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 2 21:01:16 EST 2009


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


           Summary: NRE in WebConnectionStream.Close()
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: x86-64
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mmorano at mikeandwan.us
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5)
Gecko/2008121300 SUSE/3.0.5-2.5 Firefox/3.0.5

Previously, I had a website that was leveraging a third party dll that wrapped
http api calls to their service.  This worked in an earlier version of mono,
and now I am getting null reference exceptions when trying to access these
services.  The trace below seems to indicate the error - a call to KillBuffer
is occuring, and then the Close method is called.  KillBuffer sets writeBuffer
to null, and at the end of the Close method (around line 658), there is a check
as such:
if (length != -1 && length > writeBuffer.Length)

In this case, writeBuffer would be null, and believe this is the offending
line.  Here is the trace:


mmorano at aeris:~/Desktop/QuickBaseClientTestHarness/bin> mono
--trace=T:System.Net.WebConnectionStream QuickBaseClientTestHarness.exe 
EXCEPTION handling: FileNotFoundException
EXCEPTION handling: ConfigurationException
EXCEPTION handling: FormatException
[0x7f0e6df19950: 0.00000 0] ENTER: System.Net.WebConnectionStream:.cctor ()()
[0x7f0e6df19950: 0.00004 0] LEAVE: System.Net.WebConnectionStream:.cctor ()
[0x7f0e6df19950: 0.00005 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection,System.Net.HttpWebRequest)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebConnection:0x7f0e736405a0],
[System.Net.HttpWebRequest:0x7f0e7356fea0], )
[0x7f0e6df19950: 0.00017 1] ENTER: System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection,System.Net.HttpWebRequest)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebConnection:0x7f0e736405a0],
[System.Net.HttpWebRequest:0x7f0e7356fea0], )
[0x7f0e6df19950: 0.00035 1] LEAVE: System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection,System.Net.HttpWebRequest)
[0x7f0e6df19950: 0.00037 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection,System.Net.HttpWebRequest)
[0x7f0e6df19950: 0.00269 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:SetHeaders
(byte[],int,int)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e78b2a8c0, 0, 163, )
[0x7f0e6df19950: 0.00282 1] ENTER: System.Net.WebConnectionStream:SetHeaders
(byte[],int,int)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e78b2a8c0, 0, 163, )
[0x7f0e6df19950: 0.00284 1] LEAVE: System.Net.WebConnectionStream:SetHeaders
(byte[],int,int)
[0x7f0e6df19950: 0.00285 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:SetHeaders (byte[],int,int)
[0x7f0e78cfd730: 0.00345 0] ENTER: System.Net.WebConnectionStream:Write
(byte[],int,int)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e78b32000, 0, 157, )
[0x7f0e78cfd730: 0.00386 1] ENTER: System.Net.WebConnectionStream:BeginWrite
(byte[],int,int,System.AsyncCallback,object)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e78b32000, 0, 157,
[System.AsyncCallback:0x7f0e73563958], (nil), )
[0x7f0e78cfd730: 0.00410 2] ENTER:
System.Net.WebConnectionStream:WriteCallbackWrapper
(System.IAsyncResult)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebAsyncResult:0x7f0e73625af0], )
[0x7f0e78cfd730: 0.00439 3] ENTER: System.Net.WebConnectionStream:EndWrite
(System.IAsyncResult)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebAsyncResult:0x7f0e73625af0], )
[0x7f0e78cfd730: 0.00442 3] LEAVE: System.Net.WebConnectionStream:EndWrite
(System.IAsyncResult)
[0x7f0e78cfd730: 0.00444 2] LEAVE:
System.Net.WebConnectionStream:WriteCallbackWrapper (System.IAsyncResult)
[0x7f0e78cfd730: 0.00447 1] LEAVE: System.Net.WebConnectionStream:BeginWrite
(byte[],int,int,System.AsyncCallback,object)[System.Net.WebAsyncResult:0x7f0e73625af0]
[0x7f0e78cfd730: 0.00449 1] ENTER: System.Net.WebConnectionStream:EndWrite
(System.IAsyncResult)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebAsyncResult:0x7f0e73625af0], )
[0x7f0e78cfd730: 0.00452 1] LEAVE: System.Net.WebConnectionStream:EndWrite
(System.IAsyncResult)
[0x7f0e78cfd730: 0.00454 0] LEAVE: System.Net.WebConnectionStream:Write
(byte[],int,int)
[0x7f0e78cfd730: 0.00483 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:get_WriteBufferLength
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e78cfd730: 0.00489 1] ENTER:
System.Net.WebConnectionStream:get_WriteBufferLength
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e78cfd730: 0.00492 1] LEAVE:
System.Net.WebConnectionStream:get_WriteBufferLength ()result=157
[0x7f0e78cfd730: 0.00494 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:get_WriteBufferLength ()result=157
[0x7f0e78cfd730: 0.00500 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:WriteRequest
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e78cfd730: 0.00521 1] ENTER: System.Net.WebConnectionStream:WriteRequest
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e78cfd730: 0.00537 2] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:SetHeaders
(byte[],int,int)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e78b2a700, 0, 163, )
[0x7f0e78cfd730: 0.00537 3] ENTER: System.Net.WebConnectionStream:SetHeaders
(byte[],int,int)(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e78b2a700, 0, 163, )
[0x7f0e78cfd730: 0.00538 3] LEAVE: System.Net.WebConnectionStream:SetHeaders
(byte[],int,int)
[0x7f0e78cfd730: 0.00539 2] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:SetHeaders (byte[],int,int)
[0x7f0e78cfd730: 0.32315 1] LEAVE: System.Net.WebConnectionStream:WriteRequest
()
[0x7f0e78cfd730: 0.32322 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:WriteRequest ()
[0x7f0e6ca05950: 0.43330 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection)(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebConnection:0x7f0e736405a0], )
[0x7f0e6ca05950: 0.43349 1] ENTER: System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection)(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], [System.Net.WebConnection:0x7f0e736405a0], )
[0x7f0e6ca05950: 0.43371 1] LEAVE: System.Net.WebConnectionStream:.ctor
(System.Net.WebConnection)
[0x7f0e6ca05950: 0.43372 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:.ctor (System.Net.WebConnection)
[0x7f0e6ca05950: 0.43377 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:set_ReadBuffer
(byte[])(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e73684000, )
[0x7f0e6ca05950: 0.43380 1] ENTER:
System.Net.WebConnectionStream:set_ReadBuffer
(byte[])(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 0x7f0e73684000, )
[0x7f0e6ca05950: 0.43381 1] LEAVE:
System.Net.WebConnectionStream:set_ReadBuffer (byte[])
[0x7f0e6ca05950: 0.43382 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:set_ReadBuffer (byte[])
[0x7f0e6ca05950: 0.43386 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:set_ReadBufferOffset
(int)(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 617, )
[0x7f0e6ca05950: 0.43389 1] ENTER:
System.Net.WebConnectionStream:set_ReadBufferOffset
(int)(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 617, )
[0x7f0e6ca05950: 0.43389 1] LEAVE:
System.Net.WebConnectionStream:set_ReadBufferOffset (int)
[0x7f0e6ca05950: 0.43390 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:set_ReadBufferOffset (int)
[0x7f0e6ca05950: 0.43394 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:set_ReadBufferSize
(int)(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 879, )
[0x7f0e6ca05950: 0.43396 1] ENTER:
System.Net.WebConnectionStream:set_ReadBufferSize
(int)(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], 879, )
[0x7f0e6ca05950: 0.43397 1] LEAVE:
System.Net.WebConnectionStream:set_ReadBufferSize (int)
[0x7f0e6ca05950: 0.43398 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:set_ReadBufferSize (int)
[0x7f0e6ca05950: 0.43401 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:CheckResponseInBuffer
()(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e6ca05950: 0.43405 1] ENTER:
System.Net.WebConnectionStream:CheckResponseInBuffer
()(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e6ca05950: 0.43414 2] ENTER: System.Net.WebConnectionStream:IsNtlmAuth
()(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
EXCEPTION handling: FormatException
[0x7f0e6ca05950: 0.43422 2] LEAVE: System.Net.WebConnectionStream:IsNtlmAuth
()FALSE
[0x7f0e6ca05950: 0.43444 2] ENTER: System.Net.WebConnectionStream:ReadAll
()(this:0x7f0e735a1780[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e6ca05950: 0.43469 2] LEAVE: System.Net.WebConnectionStream:ReadAll ()
[0x7f0e6ca05950: 0.43469 1] LEAVE:
System.Net.WebConnectionStream:CheckResponseInBuffer ()
[0x7f0e6ca05950: 0.43470 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:CheckResponseInBuffer ()
[0x7f0e6ca05950: 0.43673 0] ENTER: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:KillBuffer
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e6ca05950: 0.43677 1] ENTER: System.Net.WebConnectionStream:KillBuffer
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
[0x7f0e6ca05950: 0.43678 1] LEAVE: System.Net.WebConnectionStream:KillBuffer ()
[0x7f0e6ca05950: 0.43679 0] LEAVE: (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:KillBuffer ()
[0x7f0e78cfd730: 0.43702 0] ENTER: System.Net.WebConnectionStream:Close
()(this:0x7f0e7383e880[System.Net.WebConnectionStream
QuickBaseClientTestHarness.exe], )
EXCEPTION handling: NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an
object
  at System.Net.WebConnectionStream.Close () [0x00000] 
  at QuickBaseClient.QuickBaseClient.APIXMLPost (System.String dbid,
System.String action, System.Xml.XmlDocument& xmlQDBRequest, Boolean useHTTPS)
[0x00000] 
  at QuickBaseClient.QuickBaseClient.FindDBByName (System.String dbname)
[0x00000] 
  at QuickBaseClientTestHarness.TestPanel.cmdSubmit_Click (System.Object
eventSender, System.EventArgs eventArgs) [0x00000] 
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] 
  at System.Windows.Forms.ButtonBase.OnMouseUp
(System.Windows.Forms.MouseEventArgs mevent) [0x00000] 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs
mevent) [0x00000] 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000] 
mmorano at aeris:~/Desktop/QuickBaseClientTestHarness/bin> mono --version
Mono JIT compiler version 2.2 (tarball Fri Jan  9 17:41:19 UTC 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    GC:            Included Boehm (with typed GC)
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none

Unfortunately, I do not believe I am at liberty to share the test application
above.

This app works on a ms .net machine.

Thanks,
Mike

Reproducible: Always

Steps to Reproduce:
1. run the test app
2. try to access the online service by clicking on winform button

Actual Results:  
NRE - app crashes

Expected Results:  
get a valid response from the server

-- 
Configure bugmail: https://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