Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

[BUG] uVNC produces memory leaks in some applications

Post Reply
BlackAbyss
Posts: 1
Joined: 2021-06-24 07:25

[BUG] uVNC produces memory leaks in some applications

Post by BlackAbyss »

We noticed that some applications started increasing in memory usage as soon as someone connected to the machine (just to make this clear, this took us several days to pin this problem down to uVNC).
We also noticed, if the System HookDll option on the server is selected, this phenomenon appears on some machines. So reproducing it is still not consistently possible, which is why we believe it is a bug in the first place. But if this option is not selected, the memory increase consistently stops.

After that, we took a look into the applications which were affected. All of them had something in common: They were all Windows Forms applications written in C# which added and removed controls regularly (rather specific, but this is what we found).

From here on we can only guess what is happening, but we think, that by hooking into the messaging system, on some way the .NET Garbage Collector is still finding references to the already disposed control objects and refuses to remove these objects from memory. I think uVNC tries to remove these hooks after the controls are disposed but in some occasions this seems to fail.

All this is running on Windows 10 64 bit, 64 bit UltraVNC installations.

Thanks for looking into it.
Post Reply