Bug 21535 - libgdiplus 2.10.9 built with Clang has font rendering and window size issues
Summary: libgdiplus 2.10.9 built with Clang has font rendering and window size issues
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-23 03:58 UTC by Alessandro Di Federico
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Build log using Clang (71.88 KB, text/x-log)
2014-07-23 03:58 UTC, Alessandro Di Federico
Details
KeePass's open dialog using Clang (16.78 KB, image/png)
2014-07-23 03:59 UTC, Alessandro Di Federico
Details
KeePass's open dialog using GCC (44.31 KB, image/png)
2014-07-23 05:50 UTC, Alessandro Di Federico
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 21535 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Alessandro Di Federico 2014-07-23 03:58:45 UTC
Created attachment 7467 [details]
Build log using Clang

Hi, I'm building libgdiplus from source, and I recently switched from GCC to Clang, the build goes fine, but at runtime the UI is screwed up. Attached you can find the screenshot of the "Open Database" dialog using libgdiplus compiled with GCC and Clang.

Attached the build log which doesn't show anything particularly bad.

When I close KeePass I get this exception:

Unhandled Exception:
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.Graphics.GdipMeasureString (IntPtr graphics, System.String text, System.Drawing.Font font, System.Drawing.RectangleF& layoutRect, IntPtr stringFormat) [0x00000] in <filename unknown>:0
  at System.Drawing.Graphics.MeasureString (System.String text, System.Drawing.Font font, Int32 width, System.Drawing.StringFormat format) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:MeasureString (string,System.Drawing.Font,int,System.Drawing.StringFormat)
  at System.Windows.Forms.TextRenderer.MeasureTextInternal (IDeviceContext dc, System.String text, System.Drawing.Font font, Size proposedSize, TextFormatFlags flags, Boolean useMeasureString) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.TextRenderer.MeasureText (System.String text, System.Drawing.Font font) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripMenuItem.CalculatePreferredSize (Size constrainingSize) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripItem.GetPreferredSize (Size constrainingSize) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripDropDownMenu.OnLayout (System.Windows.Forms.LayoutEventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.PerformLayout (System.Windows.Forms.Control affectedControl, System.String affectedProperty) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.PerformLayout () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:PerformLayout ()
  at System.Windows.Forms.ToolStripItem.OnParentChanged (System.Windows.Forms.ToolStrip oldParent, System.Windows.Forms.ToolStrip newParent) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripItem.set_Parent (System.Windows.Forms.ToolStrip value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:set_Parent (System.Windows.Forms.ToolStrip)
  at System.Windows.Forms.ToolStripItemCollection.Remove (System.Windows.Forms.ToolStripItem value) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripItem.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripDropDownItem.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ToolStripMenuItem.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
  at System.ComponentModel.Component.Finalize () [0x00000] in <filename unknown>:0

If I'm able get more information I'll let you know.
Comment 1 Alessandro Di Federico 2014-07-23 03:59:44 UTC
Created attachment 7468 [details]
KeePass's open dialog using Clang
Comment 2 Alessandro Di Federico 2014-07-23 05:50:33 UTC
Created attachment 7473 [details]
KeePass's open dialog using GCC