bazukas / obs-linuxbrowser

OBS Linux Browser Plugin
GNU General Public License v2.0
499 stars 48 forks source link

Apparent Memory Leak with 24.0.3(via apt) On Ubuntu 18.04 (NOT a duplicate) #126

Open starcrashr opened 4 years ago

starcrashr commented 4 years ago

Issue #120 starts upon adding a source from this plugin. This issue begins as soon as I start OBS 24.0.3(via apt) on Ubuntu 18.04 after installing the plugin. The RAM usage increases until the system crashes, without even adding sources. Shutting down OBS stops the growth, but does not free up all of the used RAM. Furthermore, once OBS has been run with the plugin installed, removing the plugin does not solve the problem. The problem persists until the ~/.config/obs-studio directory is purged, suggesting that the plugin is writing a line to a configuration file that 24.0.3 does not read correctly. I can't pinpoint the exact process or processes that are filling the RAM because no single process is standing out as using a lot of RAM, and I don't see any new processes being created.

It worked great for months, and then suddenly this problem started. I may have upgraded OBS without thinking about it. This problem does not appear to be present when used with OBS 24.0.2(via apt) or 24.0.6(via snap), however, the plugin remains unusable under 24.0.6 due to Issue #120 . Log files not attached, because they got deleted while I was removing things to try to troubleshoot this issue and I'm not willing to risk crashing my system again to get another log, but I had noted that log output appeared to be identical between working and non-working tests except that sometimes(not always) the last line of the logs from non-working tests said, "memory leaks: 1."

If you're having this issue, you can restore full functionality with the following workaround... Export your scene collections, roll back to 24.0.2, delete ~/.config/obs-studio, then import your scene collections.

MichaelTunnell commented 4 years ago

The RAM overload is not from this plugin based on my testing. I have had RAM overload in OBS without this plugin installed. My issue might be different from yours but it sounds similar.

Linux browser is totally the cause of excessive CPU usage to absurd degrees, because it loads all browser sources whether they are being used or not . . . yes even if they are set to only load when active, they still load. That's a problem.

However, the RAM thing started only recently within the past few weeks due to an update of my system. It seems like there is a conflict between OBS and the Kernel or Mesa drivers that is causing the massive memory leak.

I was able to find a workaround with the AppImage version of OBS. Using the AppImage causes no memory leaks and it works with having updated system components. :+1:

NexAdn commented 4 years ago

The plugin should not be the root cause of this problem. It seems to be specific to a certain OBS version. Also, the only OBS-specific thing obs-linuxbrowser “writes” (through OBS) are the settings of the source instances. Apart from memory leaks (which I have fixed some time ago) there can't be anything happening. Even if there was a memory leak, it would only occur as often as the settings are updated, which is a manual process.