Please fix the GDI memory leak

Jungle Ide Home Forums Jungle Ide Jungle Ide Bug reports Please fix the GDI memory leak

This topic contains 4 replies, has 2 voices, and was last updated by  Ziggy 5 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #5295


    I was in the middle of doing stuff and the GDI count got to 9999 then proceeded to crash.

    Just so my computer isn’t put into question, take a look for yourself: – GPU:



    I see you put a possible fix for the elusive GDI memory leak. However, I don’t think it’s the same thing. The GDI object count is still going up wildly on the new version. I say wildly, because it’s actually worse than it was some time back. At one point you had actually fixed it, but then the bug reappeared some time later.

    The only thing I can confirm is that whenever an intellisense box pops up, even one that has popped up before, the GDI object count just keeps steadily rising and never goes down.

    As I write this, I’ve had Jungle open for about 30 minutes and the GDI count is up to 1,043 objects. What I’ve been dealing with recently is only after a few hours (anywhere from 3~5), then Jungle either crashes or the graphics go crazy.



    I *think* the GDI leak is caused by a bug on a internal component we’re using for Jungle Ide. The problem is that we’re unable to replicate it here. Even working with GDIView and other GDI debug tools, the issue does not replicate. That does not means that there is not an issue, it just means that we can’t produce it here. So, we’ll implement a new code completion system. That’s a big change so it may be included as an optional experimental feature in next Jungle Ide versions. I’ll keep you informed on any progress we do.



    You’ve never been able to replicate it? I’ve been able to replicate it on 4 different computers and 2 different virtual machines. If you have any ways I can help you, I’m more than willing.

    Also, I’m about to restart Jungle since I noticed it started slowing down. Here were some pictures I took regarding the GDI count and such.
    From Task Manager

    From GDIView

    I thought you might find it interesting that in GDIView it shows that there are only 3000 or so active and the other 5000 are just sort-of floating around in memory not getting cleaned up.

    I’m assuming that when drawing was happening something like this was happening…

    protected override void OnPaint(PaintEventArgs e)
        SolidBrush acolor = new SolidBrush(Color.White);
        // and then they forgot to dispose of objects
        // acolor.Dispose();


    I love it was this simple! JungleIde uses native unmanaged GDI for text rendering. I’ve checked code lots and lots of times and haven’t found (yet) any possible leak. But I’m still analyzing everything. I’m sure it has to be a very simple thing.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.