Bug Report Committed memory leak causing by Realtek Audios ?! (finally not by browser pages)

Psebcool

Member
Hi,

I have an issue since few months about a committed memory leak.

The committed memory leak growing more and more, hour by hour to the limit. When the limit is reached, all applications crash.

But I discover these days, that is the fault of Browser page(s) of OBS Studio. When I close OBS Studio, the committed memory leak stop growing ! I think it's a leak because it don't decrease after that, so I need to restart the computer...

I already tried to uninstall and reinstall OBS, but the issue still there when I use OBS Studio.

I wanted to share this issue...

OBS Studio 24.0.3
Windows 10 Pro x64 v1903 (18362.535)
i7 5820k
MSI X99 Gaming 7
16Go DDR4
GTX 970

Resume:
- Before launch OBS Studio, my commited memory was 12,1/18Gb
- After ~45min with OBS Studio (without record or streaming), my commited memory was 13,5/18Gb.
- After close OBS Studio, the committed don't decrease. So I can't use OBS Studio too long otherwise my committed memory goes saturated and all apps crash. It's not normal.
- The log : https://obsproject.com/logs/b4CCq4eOyi9w-dvs
 
Last edited:

R1CH

Forum Admin
Developer
All memory from user-mode applications is reclaimed when the app is terminated. If you're seeing a memory leak even after an app is closed, this is a kernel driver that is leaking, most likely 3rd party antivirus or other security software is to blame.
 

Banyarola

Active Member
I have had a similar problem until I discovered it was advertising pop ups on the site I use all the time to stream my weather.
I solved it by making the width and height in browser properties to the size I only need leaving out the offending advertising.
Prior to that I was cropping it in OBS..Which didn't work..
It has worked fine ever since..
 

Psebcool

Member
I don't think it's a kernel / drivers issue... Because I have this issue ONLY with OBS Studio. Not with others softwares.

Investigation continues... Maybe it's the Twitch linked account into OBS Studio causing it. I'm remember before to link it last year, I didn't have any issue with OBS (before the integrations of Twitch docks). But it's complicated because I need twitch...

I know that Twitch docks (chat, title, stats...) use many browser pages which can be the cause of my problem, but I have them on another "profile" not active, can it still interfere ?
 
Last edited:

Psebcool

Member
Okay my investigation found something...

As I know that the memory leak starts when I use OBS Studio, I looked among my sources & scenes.

Here are my notes:
Code:
[committed memory - hour:min]

29,1 - 16:41] = remove all audio sources (realtek & voicemeeter sources) from my scenes.
29,3 - 17:04]
29,6 - 18:34] = NO LEAK !

**reset my scenes collection**

[29,7 - 18:38] = copy and duplicate audio sources among my scenes instead reference.
[31,0 - 18:58] = LEAK !

**reset my scenes collection**

[31,7 - 19:21] = remove browser chrome scene & set sample audio 44.1khz in settings.
[32,8 - 19:49] = LEAK !

**reset my scenes collection**

[32,8 - 19:50] = remove virtual cable source (VB-Audio) from my audio sources.
[36,8 - 21:37] = LEAK !

**reset my scenes collection**

[37,3 - 22:14] = remove all voicemeeter audio sources from my scenes.
[39,1 - 22:56] = LEAK !

**reset my scenes collection**

[39,2 - 22:57] = remove only realtek audio sources from my scenes.
[38,5 - 23:30]
[38,6 - 23:52]
[38,6 - 00:00] 
[38,5 - 00:22] = NO LEAK !

The issue seems to be my Realtek audio sources. Maybe a bad drivers installed ? I will try to install another drivers in the next days.
 
Last edited:

BluePeer

Member
it is like prepostet
if obs terminated and the leak still there
its not obs its a driver like the realtek or the voicemeeter/audicable there injected into realtek if you use them or not if the install of that "virtuals" broken or not correct the realtek can leak (wrong settings in voicemeeter can make that too)

audio drivers are not simple like it sounds that are a complex core part
 

GlutenFreeVapes

New Member
I have the same problem. On 2 completely different computers, one with amd, the other one with intel. So I am very excited right now because I found a solution to this issue, which has been bugging me for years! (I think it's the same issue, this is the closest thing I found on google)
The problem occurs because both obs and voicemeeter may be using WDM.

I found the memory leak ends up creating tons of handles for the svchost.exe responsible for the windows audio service
1646217697772.png

1646217701807.png


The memory leak occurs in the windows audio svchost.exe and the handle count will increase indefinitely, until the pc and programs will say "computer low on ram".
The hotfix is to restart the windows audio service through the task manager, which will reset the handles.
my computesr lose responsiveness at ~20k handles.


To fully fix this problem go to voicemeteeter and set all input and output devices to something other than WDM
1646217860394.png




Now this is clearly a problem with OBS, I hope some dev or some random nerd can see this and reproduce this issue using the following:
1. install voicemeeter
2. install obs
3. add some audio sources in OBS
4. Add hardware inputs using WDM with voicemeeter.
5. Find the svchost.exe which belongs to windows audio service using task manager
6. Enable handle count in task manager detail view
7. watch as the handles go up over time (usually around 1 handle per 5 seconds)

This will allow you to have the memory leak on your very own device(s).
maybe someone can fix this, because WDM is usually the lower latency stable method of input and output in voicemeeter and OBS does not have a choice (as far as I know)


I gotta be honest I have no clue what WDM even is or what a handle is or what any of this even means, so I am probably wrong about this and also never contact me here or anywhere else about this, as I will not be able to provide any help or more information about this, such as logs.

Hopefully this helps soneone else who has anything like this as well (the following for SEO):
OBS memory leak.
OBS memory leak audio .
OBS Voicemeeter memory leak.
OBS and voicemeeter memory leak.
Windows audio service handle count increasing OBS.
Handle count memory leak OBS Voicemeeter.
 

cyclemat

Active Member
now the question i didnt have the problem with my USB interface when i use it with obs ! is it an driver problem or a OBs problem or a voicemeter problem or the complete situation ?
 

Silver0002

New Member
I have the same problem. On 2 completely different computers, one with amd, the other one with intel. So I am very excited right now because I found a solution to this issue, which has been bugging me for years! (I think it's the same issue, this is the closest thing I found on google)
The problem occurs because both obs and voicemeeter may be using WDM.

I found the memory leak ends up creating tons of handles for the svchost.exe responsible for the windows audio service
View attachment 81181
View attachment 81182

The memory leak occurs in the windows audio svchost.exe and the handle count will increase indefinitely, until the pc and programs will say "computer low on ram".
The hotfix is to restart the windows audio service through the task manager, which will reset the handles.
my computesr lose responsiveness at ~20k handles.


To fully fix this problem go to voicemeteeter and set all input and output devices to something other than WDM
View attachment 81183



Now this is clearly a problem with OBS, I hope some dev or some random nerd can see this and reproduce this issue using the following:
1. install voicemeeter
2. install obs
3. add some audio sources in OBS
4. Add hardware inputs using WDM with voicemeeter.
5. Find the svchost.exe which belongs to windows audio service using task manager
6. Enable handle count in task manager detail view
7. watch as the handles go up over time (usually around 1 handle per 5 seconds)

This will allow you to have the memory leak on your very own device(s).
maybe someone can fix this, because WDM is usually the lower latency stable method of input and output in voicemeeter and OBS does not have a choice (as far as I know)


I gotta be honest I have no clue what WDM even is or what a handle is or what any of this even means, so I am probably wrong about this and also never contact me here or anywhere else about this, as I will not be able to provide any help or more information about this, such as logs.

Hopefully this helps soneone else who has anything like this as well (the following for SEO):
OBS memory leak.
OBS memory leak audio .
OBS Voicemeeter memory leak.
OBS and voicemeeter memory leak.
Windows audio service handle count increasing OBS.
Handle count memory leak OBS Voicemeeter.

So, as it turns out, having been dealing with random OBS crashes for several months where it seemed to be insufficient memory issue, spending $800 on upgrades for my stream PC to resolve that, and getting nowhere with support in the forums and discord, the issue turns out to have been this exact same problem, all along.

In my case, I use Voicemeter for VBAN, so I can send my audio from my main computer to the stream PC and vice-versa while maintaining separate audio channels. This means I don't have audio devices specified on the incoming channels, so I presume that means they're ultimately using WDM by default. Picture below:

VoicemeterVBAN.PNG


This entire setup is fine on the Stream PC, up until OBS is opened, under almost every circumstance I can imagine and have tested. The number of handles being used by the svchost.exe process associated with the AudioSRV service hovers around 400 or so handles and seems to be stable, with committed memory not rising beyond what appears to be just what the PC needs at the time.

Once OBS is opened, however, things change.

The process begins generating several handles a minute until it ultimately reaches around 13,000 of them, which corresponds with commited memory rising to the maximum of 32GB, at which point OBS becomes unstable, and ultimately crashes with a breakpoint exception error, and tends to take most other programs with it (Streamavatars, Explorer, Streamlabels, etc.)

svchostHandles.PNG


AudioSRVPID.PNG



Just to note: Prior to OBS crashing, the below statistic was around 31GB out of 31.9GB. After OBS crashed and released the 800 or so MB it was using, it became the following:

CommitedMemory.PNG


After testing this several times, I was able to conclude and prove that these are incidental and connected. Restarting the AudioSRV process clears all the handles, and also releases the committed memory. The issue can be replicated very easily now that I identified it, and thankfully, after some searching, I came across this thread and the above, quoted posts' documented steps as well.

So I can absolutely confirm this issue. OBS appears to be creating a memory leak by fighting with Voicemeter over WDM and generating thousands of unresolved handles via the AudioSRV service. Unfortunately, there's no way to change voicemeter's audio sources to MME when using VBAN, nor should you really be inclined to since WDM is the more normal latency, stable option, as the above mentioned.

And I should again say that this has been going on for months, ever since I setup my stream PC last year, and it seems like a cursory search of my symptoms show several other forum posts with people experiencing similar problems dating back to 2019.

Something needs to be done about this ASAP
 

WizardCM

Forum Moderator
Community Helper
Per R1ch's original comment, it's caused by a kernel driver. OBS does not have a kernel driver, but VoiceMeeter does due to how audio works. Your best bet would be reaching out to them.

In my own testing with 2 other types of virtual cable (VB-Cable and Virtual Audio Cable), adding an audio device in OBS adds 2 handles to AudioSrv for each audio device, and correctly removes them when the device is deselected. This confirms that it's likely not on the OBS side.
 

cyclemat

Active Member
little tip try this setup !
voicemeter.png


or try this


you can try to use NDI to send the audio to your stream PC or when you use a capture card you can use the HDMI audio !


is it an amd System update bios and try to disable the FTMP modul in bios !!



Check you windows files

Start CMD as Admin

type in

dism /Online /Cleanup-Image /ScanHealth

when finished

sfc /scannow
 
Last edited:

Silver0002

New Member
Per R1ch's original comment, it's caused by a kernel driver. OBS does not have a kernel driver, but VoiceMeeter does due to how audio works. Your best bet would be reaching out to them.

In my own testing with 2 other types of virtual cable (VB-Cable and Virtual Audio Cable), adding an audio device in OBS adds 2 handles to AudioSrv for each audio device, and correctly removes them when the device is deselected. This confirms that it's likely not on the OBS side.

With all due respect, R1ch's comment was in response to the suggestion that this had something to do with Browser Sources and Realtek Drivers, and suggested it was an anti-virus, of all things, so I don't think that holds up here. Also, there's a bit of fallacious logic in there: Even if we accept the statement as is, the memory leak persists after closing Voicemeter Potato, as well, so by R1ch's, and by extension your own conditions in the statement above, that would mean it's not Voicemeter's doing.

But frankly it'd be foolish to not look more into this, especially since we know better, right? This's something happening with the AudioSRV service when these two programs are using WDM sources, and only then. I don't think trying to fob it off with "Oh, it's something else" and washing our hands of it is the right way to go when we've clearly demonstrated that a memory leak is evidently tied to OBS in at least some capacity, with my personal opinion as a 10-year IT industry veteran being that it is strongly tied.

Look, I might be a bit frustrated, but in all the months and money I've put into trying to solve this issue, it really does seem like the largest majority of support I've received has largely been deflection, half-logics, and little-to-no-effort basic troubleshooting. I know this is freeware, and I get that. I sympathize truly, and I don't expect miracles... but even if it can't be corrected immediately, or if there is some kind of conflict with Voicemeter that needs to be indicated and therefore it can't be fixed without that dev's involvement, why does it seem like every effort is taken to try and avoid addressing this and other problems here? Especially now, when you have a clear trail of replicable incidents from multiple users and the problem has been defined ever clearer than before?

Just as an example of what I'm talking about: that test you're mentioning doesn't seem to prove anything relevant to this issue. The issue at hand is that the handles increase erratically, and aren't resolved, when two specific programs are actively using WDM audio sources, not when you're adding some random sources to OBS. It has never been that OBS, when under any other normal circumstance besides the listed one, produces more handles than usual. Of course, OBS functions normally when not in this scenario. So does Voicemeter.


little tip try this setup ! View attachment 81935

or try this


you can try to use NDI to send the audio to your stream PC or when you use a capture card you can use the HDMI audio !


is it an amd System update bios and try to disable the FTMP modul in bios !!



Check you windows files

Start CMD as Admin

type in

dism /Online /Cleanup-Image /ScanHealth

when finished

sfc /scannow

I appreciate your efforts, sir, but I am not sure what you're asking me to do, or rather, why you're asking me to do it. This seems like a generic response with a lot of suggestions that I am not sure are relevant to the issue.
 

cyclemat

Active Member
1st when its an problem with the virtual audio cables it can help to try another software /Driver Virtual Audio cable is an Kernel Driver !!


and what i mean was try to send not so many vban streams !

have you contact the Vcable guys with this problem ?

other people dont have this problem with realtek drivers an so one a friend has a vban setup too but no problems

1000 other people have a working system with voicemeter you are the only with the problem in the moment.

you are a " 10-year IT industry veteran " you are a Kid not a veteran i am 35 years old have build my first PC with 9 it was an 468DX266 and with 18 i open my first shop you call yourself an veteran. ;)


have test the same setup here no problems !!!!
Main PC
INTEL I9900K
RTX 2070OC
32GB RAM
Voicemeter Potato Fresh install
Vcable A B C D used

Stream PC
amd ryzen 5 5600g
RTX2060
16 GB RAM
Voicemeter Potato Fresh install

did you see the the problem i have no problems !

but did you try the other virtual cable cable ?

did you try disable vban. same problem too ?

when was you last full fresh windows instalation !


NETWORK/sound DRIVER UP2DATE ? fresh instalation from the manufacture site of the chipset has windows select the right Network/sound driver? often you must select the new driver manually !


OR BE A PRO BUY AN HARDWARE DIGITAL MIXER AND 2 INTERFACES ;) my normal audio setup has only cost 600€
USED DDX3216
2x UMC 1820
 
Last edited:

Silver0002

New Member
1st when its an problem with the virtual audio cables it can help to try another software /Driver Virtual Audio cable is an Kernel Driver !!


and what i mean was try to send not so many vban streams !

have you contact the Vcable guys with this problem ?

other people dont have this problem with realtek drivers an so one a friend has a vban setup too but no problems

1000 other people have a working system with voicemeter you are the only with the problem in the moment.

you are a " 10-year IT industry veteran " you are a Kid not a veteran i am 35 years old have build my first PC with 9 it was an 468DX266 and with 18 i open my first shop you call yourself an veteran. ;)


have test the same setup here no problems !!!!
Main PC
INTEL I9900K
RTX 2070OC
32GB RAM
Voicemeter Potato Fresh install
Vcable A B C D used

Stream PC
amd ryzen 5 5600g
RTX2060
16 GB RAM
Voicemeter Potato Fresh install

did you see the the problem i have no problems !

but did you try the other virtual cable cable ?

did you try disable vban. same problem too ?

when was you last full fresh windows instalation !


NETWORK/sound DRIVER UP2DATE ? fresh instalation from the manufacture site of the chipset has windows select the right Network/sound driver? often you must select the new driver manually !


OR BE A PRO BUY AN HARDWARE DIGITAL MIXER AND 2 INTERFACES ;) my normal audio setup has only cost 600€
USED DDX3216
2x UMC 1820

First off, considering that we have two posts in this thread, both detailing the exact same issue down to a fault with the specific process, and any number of other threads that sit unresolved with similar symptoms going back to 2019 or further, I'd say it's definitely not just me. I don't know about you, but if there is one thing that IT has taught me, it's that generally speaking there are very few coincidences, especially when they are detailing exactly the same problem.

Second, I'm 33, and my day job is Level 2 SysAdmin. You can call me a kid if you like, I guess, but frankly, going on about what you consider a veteran or not is just noise, here. If it bothers you so much, feel free to call up my boss and ask her to review my certs again. Perhaps she'll appreciate the opinion of some guy running the local desktop repair/wipe service in town.

The realtek drivers haven't been relevant since the initial post. Also, you seem to be treating this thread as an opportunity to try and flex about your equipment almost as much as you have been contributing, to the issue at hand, and to the aforementioned experience with support. As an aside, I've got you beat, soundly, by the by, on both counts with the PCs.

Thanks for confirming what I said about trying to get anything done around here. I've corrected the issue on my own by now with quickfix plugin I spent a few hours on. You guys have fun pretending it isn't your problem.
 

JuniorGamingTime

New Member
First off, considering that we have two posts in this thread, both detailing the exact same issue down to a fault with the specific process, and any number of other threads that sit unresolved with similar symptoms going back to 2019 or further, I'd say it's definitely not just me. I don't know about you, but if there is one thing that IT has taught me, it's that generally speaking there are very few coincidences, especially when they are detailing exactly the same problem.

Second, I'm 33, and my day job is Level 2 SysAdmin. You can call me a kid if you like, I guess, but frankly, going on about what you consider a veteran or not is just noise, here. If it bothers you so much, feel free to call up my boss and ask her to review my certs again. Perhaps she'll appreciate the opinion of some guy running the local desktop repair/wipe service in town.

The realtek drivers haven't been relevant since the initial post. Also, you seem to be treating this thread as an opportunity to try and flex about your equipment almost as much as you have been contributing, to the issue at hand, and to the aforementioned experience with support. As an aside, I've got you beat, soundly, by the by, on both counts with the PCs.

Thanks for confirming what I said about trying to get anything done around here. I've corrected the issue on my own by now with quickfix plugin I spent a few hours on. You guys have fun pretending it isn't your problem.
What plugin did you make? Is it too help with the memory leak? If so could you send a dm to my Discord? JuniorGamingTime#4823
 

Tric

New Member
I have the EXACT issues as described by Silver0002, and I really the OBS guys listen, because this has been a plague to figure out for years now. Silver0002, I also sent you a DM, in the hopes that the plugin you made will work for me as well. Here's hoping you see this.
 

neverusedid

New Member
Hi, i have exact the same error with obs and voicemeteer. After 3-4 Hours there is no memory left.

I think we have a missunderstanding here, because experts sometimes mess up with the wording. I think both sides, which are discussing here, are right. OBS can't create such memory leaks AND its an obs problem. In my opinion its not a memory leak, but obs is creating new handles non stop and the audio service of window needs to allocate ram for it. So after some time there is no memory left and windows kills less important processes, instead of the audio service. So to fix it, "we" need to prevend obs from creating these handles.

Sadly i need to restart my computer since month after streaming for around 4 hours, as long as i am using voicemeteer audio sources with obs. If i do not use obs and onyl voicemeteer i can use my PC with Games forever.

It could be a voicemeteer bug too, but i have'nt had any problems with this so far.
 

SovietRaven

New Member
First off, considering that we have two posts in this thread, both detailing the exact same issue down to a fault with the specific process, and any number of other threads that sit unresolved with similar symptoms going back to 2019 or further, I'd say it's definitely not just me. I don't know about you, but if there is one thing that IT has taught me, it's that generally speaking there are very few coincidences, especially when they are detailing exactly the same problem.

Second, I'm 33, and my day job is Level 2 SysAdmin. You can call me a kid if you like, I guess, but frankly, going on about what you consider a veteran or not is just noise, here. If it bothers you so much, feel free to call up my boss and ask her to review my certs again. Perhaps she'll appreciate the opinion of some guy running the local desktop repair/wipe service in town.

The realtek drivers haven't been relevant since the initial post. Also, you seem to be treating this thread as an opportunity to try and flex about your equipment almost as much as you have been contributing, to the issue at hand, and to the aforementioned experience with support. As an aside, I've got you beat, soundly, by the by, on both counts with the PCs.

Thanks for confirming what I said about trying to get anything done around here. I've corrected the issue on my own by now with quickfix plugin I spent a few hours on. You guys have fun pretending it isn't your problem.
Thank you so much for finding out this is an issue!
Ive spent many years with ram issues pulling hair out after stress testing drivers, checking ram health different ways, and even upgrading/replacing my ram.

I only found this post after all this time after a crash when obs wasnt even recording so I thought to look up posts relating to Voicemeter instead.


Given that OBS seems to not have cared about this issue over the years and you were able to cobble together a plugin to fix the issue, it would be amazing if you could post a link to this plugin somewhere as it would help a good handful of people out and maybe keep everyone from asking you to personally send it over.


I know this is somewhat of a necro at this point, but I appreciate your findings even after all these years. Maybe it can give this issue a little bit of a bump as well.
 
Top