Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=76639 --- shadow/76639 2005-11-07 06:42:49.000000000 -0500 +++ shadow/76639.tmp.18619 2005-11-07 06:42:49.000000000 -0500 @@ -0,0 +1,121 @@ +Bug#: 76639 +Product: Mono: Class Libraries +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: OpenFileDialog crash if you use filter property + +Please fill in this template when reporting a bug, unless you know what you are doing. +Description of Problem: +If you set Filter property on a OpenDialog the app crash. + +Steps to reproduce the problem: +1. use this class and Mono 1.1.9.1 for Mac OX X (original winform) + +using System; +using System.Windows.Forms; + +public class Form1 : System.Windows.Forms.Form + { + private System.Windows.Forms.MainMenu mainMenu1; + private System.Windows.Forms.OpenFileDialog openImageDialog; + private System.Windows.Forms.MenuItem menuItemOuvrirImage; + private System.Windows.Forms.MenuItem menuItemFichier; + + + public Form1() + { + InitializeComponent(); + } + + [STAThread] + public static void Main(string[] args) + { + Application.Run(new Form1()); + } + + #region Windows Forms Designer generated code + private void InitializeComponent() { + this.menuItemFichier = new System.Windows.Forms.MenuItem(); + this.menuItemOuvrirImage = new System.Windows.Forms.MenuItem(); + this.openImageDialog = new System.Windows.Forms.OpenFileDialog(); + this.mainMenu1 = new System.Windows.Forms.MainMenu(); + // + // menuItemFichier + // + this.menuItemFichier.Index = 0; + this.menuItemFichier.MenuItems.AddRange(new +System.Windows.Forms.MenuItem[] { + this.menuItemOuvrirImage}); + this.menuItemFichier.Text = "Fichier"; + // + // menuItemOuvrirImage + // + this.menuItemOuvrirImage.Index = 0; + this.menuItemOuvrirImage.Text = "Ouvrir Image"; + // + // mainMenu1 + // + this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItemFichier}); + + this.openImageDialog.Filter = "Fichier txt|*.txt"; + // + // Form1 + // + this.Menu = this.mainMenu1; + this.Name = "Form1"; + this.Text = "Form1"; + } + #endregion + } +2. lunch + +Actual Results: +Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of +an object +in <0x00000> <unknown method> +in (wrapper managed-to-native) System.Windows.Forms.XplatUIX11:GetFontMetrics +(intptr,intptr,int&,int&) +in <0x00060> System.Windows.Forms.XplatUIX11:GetFontMetrics (System.Drawing.Graphics g, +System.Drawing.Font font, System.Int32 ascent, System.Int32 descent) +in <0x00058> System.Windows.Forms.XplatUI:GetFontMetrics (System.Drawing.Graphics g, +System.Drawing.Font font, System.Int32 ascent, System.Int32 descent) +in <0x00434> System.Windows.Forms.Line:RecalculateLine (System.Drawing.Graphics g, +System.Windows.Forms.Document doc) +in <0x000fc> System.Windows.Forms.Document:RecalculateDocument +(System.Drawing.Graphics g, Int32 start, Int32 end, Boolean optimize) +in <0x0002c> System.Windows.Forms.Document:RecalculateDocument +(System.Drawing.Graphics g) +in <0x0003c> System.Windows.Forms.Document:owner_HandleCreated (System.Object sender, +System.EventArgs e) +in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs +(object,System.EventArgs) +in <0x00048> System.Windows.Forms.Control:OnHandleCreated (System.EventArgs e) +in <0x0001c> System.Windows.Forms.TextBoxBase:OnHandleCreated (System.EventArgs e) +in <0x0001c> System.Windows.Forms.TextBox:OnHandleCreated (System.EventArgs e) +in <0x001fc> System.Windows.Forms.Control:CreateHandle () +in <0x00014> System.Windows.Forms.TextBoxBase:CreateHandle () +in <0x00044> System.Windows.Forms.Control:get_Handle () +in (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle () +in <0x00078> System.Windows.Forms.Document:PositionCaret (System.Windows.Forms.Line +line, Int32 pos) +in <0x003f8> System.Windows.Forms.TextBoxBase:set_Text (System.String value) +in <0x0001c> System.Windows.Forms.TextBox:set_Text (System.String value) +in <0x0003c> System.Windows.Forms.ComboBox:SetControlText (System.String s) +in <0x000e0> System.Windows.Forms.ComboBox:set_SelectedIndex (Int32 value) +in <0x002c4> System.Windows.Forms.FileDialog+FileDialogPanel:UpdateFilters () +in (wrapper remoting-invoke-with-check) FileDialogPanel:UpdateFilters () +in <0x00074> System.Windows.Forms.FileDialog:set_Filter (System.String value) +in (wrapper remoting-invoke-with-check) System.Windows.Forms.FileDialog:set_Filter (string) _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
