mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
334 stars 171 forks source link

Fixing Resource Leaks identified by Coverity Scan #613

Closed n432sean closed 4 years ago

n432sean commented 4 years ago

These Resource Leaks were identified at https://scan.coverity.com/projects/libgdiplus

dnfclas commented 4 years ago

CLA assistant check
All CLA requirements met.

Tampa commented 4 years ago

This might just be what it found, but there could be more, the latest release is causing massive memory leaks for various mono apps in some cases a couple GB per hour not cleared. Solution? Revert back to distro version which in some cases is 2 versions behind current. This hopefully fixes some of the leaks, it should really be merged asap!

akoeplinger commented 4 years ago

@Tampa do you have some sample code/project which reproduces the leaks you're seeing?

akoeplinger commented 4 years ago

I cherry-picked this commit to master as well.

Tampa commented 4 years ago

OpenSimulator with mono 6.4 and libgdiplus 6.0.4 was 4gb average usage, now within a day 34gb. You can find me on their freenode irc #opensim-dev, setup of that project is a bit difficult would spam this comment box to next week.

akoeplinger commented 4 years ago

Hm that sounds like a quite complicated setup to reproduce the issue, do you think you could create some smaller sample? I don't have a lot of time right now unfortunately.

Tampa commented 4 years ago

I could try to build master and see if I can replace the installed version with that and do testing, if there was a repo I could just add to apt that would make it easier though(not to keen to building on cloud machines). If you need any debug or reports let me know how to generate them, I have a fairly singular testing method to reproduce the leak now.