[Mono-bugs] [Bug 414146] [Regression] Mono.Mozilla.Base.gluezilla_createBrowserWindow

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 1 04:29:10 EDT 2008


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

User andyhume32 at yahoo.co.uk added comment
https://bugzilla.novell.com/show_bug.cgi?id=414146#c4


Andy Hume <andyhume32 at yahoo.co.uk> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |andyhume32 at yahoo.co.uk




--- Comment #4 from Andy Hume <andyhume32 at yahoo.co.uk>  2008-09-01 02:29:09 MDT ---
I see the (managed) exception in various situations, firstly seen in my
PropertyGrid WinForms exercising app, in a conversion of an accessibility test
app
(http://lists.ximian.com/pipermail/mono-devel-list/2008-August/028895.html), in
IEClone, etc.

A very simple repro app is included below.  Run it and hit <Go>.


Tested only on Windows 2.0 preview (mono-2.0-gtksharp-2.10.4-win32-2.exe).  I
don't have a working Linux 2.0 build or install.  That app works on 1.9 Linux
and Windows.

The following exception occurs -- the URI in it is garbage.  So there are
possibly two bugs, firstly that this exception occurs, and secondly that
garbage strings can be created.

[[
System.UriFormatException: Invalid URI: The format of the URI could not be
determined:
ç'¨ç´â¼ºçœ¯ç·æ´®æ¹¯âµ¯ç‰°æ©¯æ¥â¹´æ½£â½-
at System.Uri..ctor (string,bool) [0x00087] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\System\System\Uri.cs:166
at System.Uri..ctor (string) [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\build\common\Consts.cs:1
at System.Windows.Forms.WebBrowser.OnWebHostLoadStarted
(object,Mono.WebBrowser.LoadStartedEventArgs) [0x00021] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Managed.Windows.Forms\System.Windows.Forms\WebBrowser.cs:573
at Mono.Mozilla.Callback.OnStateChange
(Mono.Mozilla.nsIWebProgress,Mono.Mozilla.nsIRequest,int,uint) [0x000f0] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Mono.WebBrowser\MonoMozilla\Callback.cs:123
at (wrapper native-to-managed) Mono.Mozilla.Callback.OnStateChange
(intptr,intptr,int,uint) <0x002a8>
at (wrapper managed-to-native)
System.Windows.Forms.XplatUIWin32.Win32DispatchMessage
(System.Windows.Forms.MSG&) <0x00004>
at System.Windows.Forms.XplatUIWin32.DispatchMessage
(System.Windows.Forms.MSG&) [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Managed.Windows.Forms\System.Windows.Forms\XplatUIWin32.cs:2118
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&)
[0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Managed.Windows.Forms\System.Windows.Forms\XplatUI.cs:600
at System.Windows.Forms.Application.RunLoop
(bool,System.Windows.Forms.ApplicationContext) [0x00359] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:954
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext) [0x0002e] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:740
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) [0x00000]
in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.0\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:723
at WebBrowserSimple.DoWebBrowse () <0x0014d>
at WebBrowserSimple.Main () <0x00026>
]]


With following code:
[[
using System;
using System.Windows.Forms;
using System.Drawing;
using System.IO;
using System.Text;


class WebBrowserSimple
{
        [STAThread]
        static void Main ()
        {
                try {
                        DoWebBrowse ();
                } catch (Exception ex) {
                        TextWriter wtr;
                        using (wtr = new StreamWriter
("WebBrowserSimple_utf8.txt", false, Encoding.UTF8))
                                wtr.WriteLine (ex);
                        using (wtr = new StreamWriter
("WebBrowserSimple_utf16.txt", false, Encoding.Unicode))
                                wtr.WriteLine (ex);
                        throw;
                }
        }

        static void DoWebBrowse ()
        {
                Form f_ = new Form ();
                f_.Text = "WebBrowserSimple";
                Panel p = new FlowLayoutPanel ();
                p.Dock = DockStyle.Fill;
                f_.Controls.Add (p);
                //
                WebBrowser wb = new WebBrowser ();
                wb.TabIndex = 1;
                p.Controls.Add (wb);
                wb.Size = new Size (p.ClientSize.Width - 40,
p.ClientSize.Height - 40);
                //
                TextBox tb = new TextBox ();
                tb.AutoSize = true;
                tb.Text = "http://www.mono-project.com/";
                EventHandler navigate = delegate {
                        Console.WriteLine ("Calling Navigate...");
                        wb.Navigate (tb.Text);
                        Console.WriteLine ("Done Navigate call.");
                };
                tb.KeyPress += delegate (object sender, KeyPressEventArgs e) {
                        if (e.KeyChar != '\r')
                                return;
                        navigate (sender, EventArgs.Empty);
                };
                tb.TabIndex = 0;
                p.Controls.Add (tb);
                //
                Button b = new Button ();
                b.Text = "Go";
                b.Click += navigate;
                p.Controls.Add (b);
                //
                Application.Run (f_);
        }
}
]]


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