[Mono-bugs] [Bug 80918][Nor] New - When selecting certain fonts with Styles different to the standard 4 an Exception is thrown and the Dialog closes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Feb 21 00:43:55 EST 2007


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 xmattxuk at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80918

--- shadow/80918	2007-02-21 00:43:55.000000000 -0500
+++ shadow/80918.tmp.6369	2007-02-21 00:43:55.000000000 -0500
@@ -0,0 +1,144 @@
+Bug#: 80918
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: Windows XP SP2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: xmattxuk at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: When selecting certain fonts with Styles different to the standard 4  an Exception is thrown and the Dialog closes
+
+Description of Problem:
+When selecting certain fonts with less than the standard 4 font
+styles(Regular/Bold/Italic/Bold Italic) an Exception is thrown and the
+dialog closes.
+
+Steps to reproduce the problem:
+1. Run a program with a System.Windows.Form.FontDialog in it (Example below)
+2. Open the font dialog
+3. Select the Font 'Monotype Corsiva' the dialog disappears 
+4. See Exception in cmd console
+
+Fonts that cause fault too:
+Berlin Sans FB Demi, Brush Script MT, Harlow Solid Italic, Magneto, Palace
+Script MT, Vivaldi.
+
+Actual Results:
+Exception
+[log]
+
+System.Exception: Unknown Error.
+  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x000f1] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\System.Drawing\System.Drawing\gdipFunctions.cs:236
+
+  at System.Drawing.Font..ctor (System.Drawing.FontFamily family, Single
+emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean
+isVertical) [0x00048] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\System.Drawing\System.Drawing\Font.cs:339
+
+  at System.Drawing.Font..ctor (System.Drawing.FontFamily family, Single
+emSize, FontStyle style) [0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\System.Drawing\System.Drawing\Font.cs:316
+
+  at (wrapper remoting-invoke-with-check) System.Drawing.Font:.ctor
+(System.Drawing.FontFamily,single,System.Drawing.FontStyle)
+  at System.Windows.Forms.FontDialog.UpdateExamplePanel () [0x00017] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\FontDialog.cs:1075
+
+  at System.Windows.Forms.FontDialog.OnSelectedIndexChangedFontListBox
+(System.Object sender, System.EventArgs e) [0x00066] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\FontDialog.cs:793
+
+  at (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
+  at System.Windows.Forms.ListBox.OnSelectedIndexChanged (System.EventArgs
+e) [0x00023] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ListBox.cs:898
+
+  at System.Windows.Forms.ListBox.OnItemClick (Int32 index) [0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ListBox.cs:1490
+
+  at System.Windows.Forms.ListBox.OnMouseUpLB (System.Object sender,
+System.Windows.Forms.MouseEventArgs e) [0x00052] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ListBox.cs:1614
+
+  at (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_MouseEventArgs
+(object,System.Windows.Forms.MouseEventArgs)
+  at System.Windows.Forms.Control.OnMouseUp
+(System.Windows.Forms.MouseEventArgs e) [0x0001c] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5151
+
+  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
+[0x0027f] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:4477
+
+  at System.Windows.Forms.ListBox.WndProc (System.Windows.Forms.Message& m)
+[0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ListBox.cs:1004
+
+  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
+(System.Windows.Forms.Message& m) [0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:196
+
+  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg,
+IntPtr wParam, IntPtr lParam) [0x0006b] in
+C:\cygwin\tmp\scratch\mono-1.2.3\mcs\class\Managed.Windows.Forms\System.Windows.Forms\NativeWindow.cs:171
+
+
+[/log]
+
+Expected Results:
+Display selected font in the dialog
+
+How often does this happen? 
+Always
+
+Additional Information:
+
+Mono Version Dump:
+
+Mono JIT compiler version 1.2.3, (C) 2002-2006 Novell, Inc and
+Contributors. www.mono-project.com
+	TLS:           normal
+	GC:            Included Boehm (with typed GC)
+	SIGSEGV:       normal
+	Architecture:  x86
+	Disabled:      none
+
+
+Source Code, Sample Test App:
+
+[Code]
+
+using System.Windows.Forms;
+public class SimpleHelloWorld : Form
+{
+    private System.Windows.Forms.FontDialog fontDialog1;
+ 
+    public static void Main()
+    {
+        Application.Run(new SimpleHelloWorld());
+    }
+   
+    public SimpleHelloWorld()
+    {
+        Text = "Hello, WindowsForms!";
+	this.fontDialog1 = new System.Windows.Forms.FontDialog();
+	fontDialog1.ShowDialog();	
+
+    }
+}
+        
+[/Code]
+
+Note:- To compile from cmd use:
+mcs -r:System.Windows.Forms What_Ever_You_Want.cs


More information about the mono-bugs mailing list