Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
UltraGrid A generic error occurred in GDI+(red X)
posted

Hi

I use UltraGrid control to show data, if the data in the cell is very long,the application will randomly throw a generic error occured in gdi+, and then all the controls in my form will be a red X.


Error played only in Win 8

UltraWinGrid version :14.1.20141.2035




Could you help me?

TestApplication.rar
Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The big red X means that there was an exception raised during the painting of the control. Usually, the grid will show the details of the exception in addition to the X. So if you could post the call stack or a screen shot of the exception, it might help narrow down what's causing it.

    Typical causes of the big red X are:

    1) Threading issues - is your application using multiple threads, a background worker thread, or anything like that?

    2) Images that are disposed - of you assign an image to the grid and then dispose of the image that the grid still needs, it can cause an exception.

    3) Since you mention long text - how long are you talking about here? The TextBox control has a limit to how much text it will draw before it blows up. There are also limits to the amount of text you can draw in a single string using GDI or GDI+. The grid should be handling these limits and just failing to draw all of the text as opposed to crashing, but it's possible this is a case the grid is not handling.

Children