[Mono-bugs] [Bug 677257] New: Missing ArgumentException when creating invalid Fonts leads to GDI+ crash

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Mar 6 12:13:14 EST 2011


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

https://bugzilla.novell.com/show_bug.cgi?id=677257#c0


           Summary: Missing ArgumentException when creating invalid Fonts
                    leads to GDI+ crash
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andreas.flucke at t-online.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=417728)
 --> (http://bugzilla.novell.com/attachment.cgi?id=417728)
Testcase and outputs

User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;
Media Center PC 6.0; .NET4.0C; .NET4.0E)

I've accidentally created a Font with Size NaN (see attachment).
This doesn't actually leads to the excpected ArgumentException.
Instead when the Font is used while painting, a GDI+ Error occurs 
(under Windows, Linux does nothing)
The appropriate .Net Exception when trying to create this invalid Font is
similar to
System.ArgumentException "Der Wert n. def. ist für emSize ungültig. emSize muss
größer als 0 und kleiner als oder gleich System.Single.MaxValue sein."
(emSize must be greater than 0 and lesser or equal to Single.MaxValue)

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

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