GDI count increasing

Posted by: kbs on 8 September 2017, 5:50 am EST

  • Posted 8 September 2017, 5:50 am EST

    We are using version 6.

    During  operation of Farpoint spread, It occured error message like below.

    "Unable to render - low memory"

    At this point, allocated GDI count reached at system limitation (9993) and spread could not draw anymore.

    I think, version 6 does not release allocated GDI, so GDI handle is incremented steady.

    This is very fatal to out project and we can not get tally from our client.

    This error is easy to reappear, If you made refresh event continually and check the GDI count from the task manager.

  • Posted 8 September 2017, 5:50 am EST

    Hi,

    Please post a small sample reproducing the behavior you are seeing.

    The error you describe, "Unable to render - low memory" can happen when an exception is thrown during the painting; for example, if you have a class which implements FarPoint.Win.Spread.CellType.IRenderer.PaintCell set to the Cell.Renderer and it throws an exception.  We need to reproduce the problem here to determine the cause.

  • Posted 8 September 2017, 5:50 am EST

    Hi,

    This is an example code. I don't have a class wich implements Farpoint.Win.SpreadCellType.IRenderer.PaintCell. I think that, the GDI object leak, due to your own code, with RichTextCell Rendering.

    if you build the attachment project, and run then scroll up and down, once more, then you can see the GDI Object Leak using the Task Manager.

    And, I want to know when the RTF Rendering bug will be fixed.

    http://www.clubfarpoint.com/Forums/forums/thread/100798.aspx

    2011/12/RTFRendering.zip
  • Posted 8 September 2017, 5:50 am EST

    Hi~~~

    I think this error comes from the FarPoint Spread Control.

    Here is a sample project.

    I don't have any class which implements 'IRenderer.PaintCell class.'

    Build the sample and run, and keep scrolling the spread up and down,

    you will find the GDI OBJECT LEAK with Task Manager.

    And, I want to know the progress of 

    "The Rendering Problem of some font in a cell of RichTextCellType." which I posted and you admited it as bug.

     Thank you

    2011/12/RTFRendering-2.zip
  • Posted 8 September 2017, 5:50 am EST

    Hello,

    I was able to replicate the issue at my end. I am working on the same, but I was not able to get to the cause of the issue. I have escalated the issue and I would get back to you soon. I would like you to know that the font rendering bug(#99923529) is not fixed yet, the development team is working on the same.

    Thanks,

    Manpreet Kaur.

     

  • Posted 8 September 2017, 5:50 am EST

    Hello,

    I would like you to know that the issue has been reported as a bug, the bug number for the same is #99923964. It would be fixed in the next maintenance release. However, we are looking for a workaround to resolve the issue, we will let you know if we are able to find one.

    Thanks,

    Manpreet Kaur.

  • Posted 8 September 2017, 5:50 am EST

    Hello,

    I would like you to know that unfortunately, there is no workaround for this issue right now. However, the issue is fixed and would be available in the next maintenance release.

    Thanks,

    Manpreet Kaur.

     

  • Posted 25 June 2018, 3:23 am EST

    We have a real time trading application in which we are getting red cross very much less randomly on a screen which has too many data updates coming from exchange. Customer has raised Critical issue for which we require to release fix at earliest.

    Kindly please provide your help at earliest.

    we are getting the same error of GDI continuously increasing and after the application hangs and start giving out of memory error.

    We are using the latest version of spread 11. Is it not fixed in that still ?

    Can you help me with some work around and its causing big embarrassment in front of customer

  • Posted 25 June 2018, 3:34 pm EST

    Hello,

    1. This typically happens in multi-threaded apps that don’t lock the component properly, when one thread is painting and another is deleting rows for example. Is this a threaded application? Do you have a stack trace?

    2. This can also be caused by unhandled exceptions in the OwnerDraw event of the grid.

      If in case you are using OwnerDraw then I would suggest wrapping the event code in a try/catch block so you can detect the cause of the red cross.

    3. Can you isolate the problem in a small sample and send it to us so we can study it further? Also, we have updated builds of the control on the following site:

      https://www.grapecity.com/en/download/spreadnet

    You may want to test with the latest version to see if the problem is resolved.

    Thanks,

    Reeva

  • Posted 25 June 2018, 4:48 pm EST

    Hi Reeva,

    We are bought latest version for Grapecity V11.1 for winforms.

    This is not replicated easily but we easily the GDI count increasing drastically

    with the screen have this spread control. This does not happen for other screesn of winforms where spread control is not present.

    What is the solution to this problem ? Once GDI count goes to 9000 the application becomes slow and once it reaches 10000 the application gets freezed and not responding and then the red cross comes giving out of memory exception.

  • Posted 25 June 2018, 5:46 pm EST

    Attached is the stack trace

    at System.Drawing.Graphics.FromHdcInternal(IntPtr hdc)

    at System.Drawing.Font.ToLogFont(Object logFont)

    at System.Drawing.Font.ToHfont()

    at System.Windows.Forms.Control.FontHandleWrapper…ctor(Font font)

    at System.Windows.Forms.Control.get_FontHandle()

    at System.Windows.Forms.Control.SetWindowFont()

    at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)

    at System.Windows.Forms.TextBoxBase.OnHandleCreated(EventArgs e)

    at System.Windows.Forms.TextBox.OnHandleCreated(EventArgs e)

    at System.Windows.Forms.Control.WmCreate(Message& m)

    at System.Windows.Forms.Control.WndProc(Message& m)

    at System.Windows.Forms.TextBoxBase.WndProc(Message& m)

    at System.Windows.Forms.TextBox.WndProc(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • Posted 28 June 2018, 3:00 pm EST

    Hello Sanket,

    We apologies for the delayed response. We are already discussing your issue with our development team and we will get back to you as soon as we hear anything from them.

    Tracking id for your issue is #260087

    Thanks,

    Reeva

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels