[Mono-bugs] [Bug 581627] New: Windows: WebBrowser.Navigate crashes with NullReferenceException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Feb 21 06:42:28 EST 2010


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

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


           Summary: Windows:  WebBrowser.Navigate crashes with
                    NullReferenceException
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jmoon5ftm at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8)
Gecko/20100202 Firefox/3.5.8 GTB6

Example Code:

    public static void Main ()
    {
        Form f = new Form();
        WebBrowser b = new WebBrowser();
        b.Parent = f;
        f.Show();
        b.Navigate("http://www.google.com/");
        Application.Run(f);
    }

Moving the Navigate call into the Form.Load event does not resolve the problem.

Exception details:

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object

  at System.Windows.Forms.WebBrowser.Navigate (System.String urlString)
[0x0000e] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\Managed.Windows.Forms\System.Windows.Forms\WebBrowser.cs:298 

  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.WebBrowser:Navigate (string)

  at test.app.Main () [0x00019] in I:\stuff\C# Projects\test\test\main.cs:27 

The application exited with code: 1

Reproducible: Always

Steps to Reproduce:
1. Create a form with a WebBrowser.
2. Try to Navigate the WebBrowser.

Actual Results:  
NullReferenceException

Expected Results:  
WebBrowser displays the web page.

-- 
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