GDI+ exception in FillRectangle under Windows 7 RRS feed

  • Question

  • Hi,

    Since we have migrated our WinForms based application to .Net 4, we'r getting strange "A generic error occurred in GDI+" errors under windows 7 x64, all coming from System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height) method. These errors originate from different controls, third party ones and from OOB winforms controls (like a menu). I have tried searching the web to see whether others faced this problem however what i have found so far is that some state that this is a known bug in .NET framework. I have tried to search msdn and the web to find anything about this "known" bug with no success yet. Does anyone have any information regarding this?

    Thanks in advance.


    • Moved by SamAgain Tuesday, September 21, 2010 9:41 AM not bcl question (From:.NET Base Class Library)
    Monday, September 13, 2010 8:44 AM

All replies

  • Hi.

    Are you able to isolate any reproducible specific instances where this happens, in particular with the standard controls?

    Also, do you only see it with 64-bit Windows 7, or with .NET 4 apps on other operating systems?


    Monday, September 13, 2010 8:39 PM
  • Hi,

    Here is some further information (i kept investigating):

    • No one seen this when we were using .Net 2.0. (Neither developers, testers or users)
    • We have not found any ways to produce this error, however it does happen unexpectedly from various controls.
    • It seems that this happens mostly when running our application with VS2010 debugger attached.
    • This problem occurs not only on Win7 x64 but on all versions of Win7. (i was wrong in my previous post, i got information from Win7 x32 using collegues who also got these). Windows XP user collegues did not see this (yet ?).

    Thanks for any help in advance.

    Tuesday, September 14, 2010 9:28 AM
  • I know this is an old post but just in case you are still getting emails about it...

    Did you ever find a solution for this.

    I'm seeing similar thing with LinkLabels (standard .NET winforms control) that is happening in the System.Drawing.Graphics.MeasureCharacterRanges( ... ) method.

    Monday, November 17, 2014 9:22 AM