[Bug 30951] New: mono's GraphicsPathTest.AddString_NegativeSize test fails
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(a)winehq.org ReportedBy: madewokherd(a)gmail.com CC: dmitry(a)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(a)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. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30951 Vincent Povirk <madewokherd(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30951 --- Comment #1 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-06-20 04:43:49 CDT --- (In reply to comment #0)
Bisecting gave me this:
2c93bf7e4e469b36d3244f5a5f3c3c0ca0e0d897 is the first bad commit commit 2c93bf7e4e469b36d3244f5a5f3c3c0ca0e0d897 Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri May 11 19:19:21 2012 +0900
gdiplus: Retrieve LOGFONT from a GpFont using GdipGetLogFontW instead of accessing it directly.
This is probably wrong commit. The problem with above commit is - hfont = CreateFontIndirectW(&font->lfw); + status = GdipGetLogFontW((GpFont *)font, NULL, &lfw); + if (status != Ok) return status; + hfont = CreateFontIndirectW(&lfw); which passed NULL graphics to GdipGetLogFontW, which was fixed in a later patch.
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've added a test which shows that GdipCreateFont is supposed to fail for a negative emSize. The check in GdipCreateFont was added in the commit c626528a91505292487a4a3b72721122dd68f951 The problem is not in the patch which makes GdipCreateFont fail, but in GdipAddPathString implementation. I'd say that technically it's not a regression, GdipAddPathString was broken before my changes. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30951 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression | -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30951 Vincent Povirk <madewokherd(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |cae52d078a871f184653da7ff17 | |1b337b2848e21 Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Vincent Povirk <madewokherd(a)gmail.com> 2012-06-25 10:37:58 CDT --- Fix't. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30951 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> 2012-07-03 14:13:56 CDT --- Closing bugs fixed in 1.5.8. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30951 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|2c93bf7e4e469b36d3244f5a5f3 | |c3c0ca0e0d897 | --- Comment #2 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-06-21 02:09:03 CDT --- Removing wrong regression sha1, probably keyword 'regression' should be also removed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org