http://bugs.winehq.org/show_bug.cgi?id=30951
Bug #: 30951 Summary: mono's GraphicsPathTest.AddString_NegativeSize test fails Product: Wine Version: 1.5.4 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, regression, source, testcase Severity: normal Priority: P2 Component: gdiplus AssignedTo: wine-bugs@winehq.org ReportedBy: madewokherd@gmail.com CC: dmitry@baikal.ru Classification: Unclassified Regression SHA1: 2c93bf7e4e469b36d3244f5a5f3c3c0ca0e0d897
This is a new failure that came up today when I ran the Mono System.Drawing tests:
28) MonoTests.System.Drawing.Drawing2D.GraphicsPathTest.AddString_NegativeSize : System.ArgumentException : A null reference or invalid value was found [GDI+ status: InvalidParameter] at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0 at System.Drawing.Drawing2D.GraphicsPath.AddString (System.String s, System.Drawing.FontFamily family, Int32 style, Single emSize, Rectangle layoutRect, System.Drawing.StringFormat format) [0x00000] in <filename unknown>:0 at System.Drawing.Drawing2D.GraphicsPath.AddString (System.String s, System.Drawing.FontFamily family, Int32 style, Single emSize, Point origin, System.Drawing.StringFormat format) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.Drawing.Drawing2D.GraphicsPath:AddString (string,System.Drawing.FontFamily,int,single,System.Drawing.Point,System.Drawing.StringFormat) at MonoTests.System.Drawing.Drawing2D.GraphicsPathTest.AddString_NegativeSize () [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Here's the code for that test:
public void AddString_NegativeSize () { GraphicsPath gp = new GraphicsPath (); FontFamily ff = GetFontFamily (); gp.AddString ("mono", ff, 0, -10, new Point (10, 10), StringFormat.GenericDefault); Assert.IsTrue (gp.PointCount > 0, "PointCount"); }
Bisecting gave me this:
2c93bf7e4e469b36d3244f5a5f3c3c0ca0e0d897 is the first bad commit commit 2c93bf7e4e469b36d3244f5a5f3c3c0ca0e0d897 Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri May 11 19:19:21 2012 +0900
gdiplus: Retrieve LOGFONT from a GpFont using GdipGetLogFontW instead of accessing it directly.
It seems it's valid to call GdipAddPathString with a negative font size. This fails now because GdipCreateFont doesn't accept a negative font size, but I don't know if it's correct for GdipAddPathString to call GdipCreateFont.
I can provide a compiled version of the System.Drawing tests if that would help.