Bug Report High ram usage

kittykiller

New Member
In the latest version (0.541) when I stream Minecraft my ram usage for java.exe goes through the roof. After about 50 minutes of streaming java.exe was using around 15GB and causing my game to stutter.

Here is the log from the stream and yes I know this is from the test version but this is still happening in the final release.
Previous versions never had this issue.
Code:
19:54:29: Open Broadcaster Software v0.52.08b aquaman build - 64bit ( ^ω^)
19:54:29: -------------------------------
19:54:29: CPU Name: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
19:54:29: CPU Speed: 4076MHz
19:54:29: Physical Memory:  32716MB Total, 27198MB Free
19:54:29: stepping id: 7, model 13, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 12, total cores 6
19:54:29: monitor 1: pos={0, 0}, size={1920, 1080}
19:54:29: Windows Version: 6.1 Build 7601 S
19:54:29: Aero is Disabled
19:54:29: -------------------------------
19:54:29: OBS Modules:
19:54:29: Base Address     Module
19:54:29: 000000003FBC0000 OBS.exe
19:54:29: 00000000F0800000 OBSApi.dll
19:54:29: 00000000F8A10000 DShowPlugin.dll
19:54:29: 00000000F89E0000 GraphicsCapture.dll
19:54:29: 00000000F89C0000 NoiseGate.dll
19:54:29: 00000000F89A0000 PSVPlugin.dll
19:54:29: ------------------------------------------
19:54:29: Adapter 1
19:54:29:   Video Adapter: NVIDIA GeForce GTX 690
19:54:29:   Video Adapter Dedicated Video Memory: 2062221312
19:54:29:   Video Adapter Shared System Memory: 2147807232
19:54:29: =====Stream Start: 2013-07-07, 19:54:29===============================================
19:54:29:   Multithreaded optimizations: On
19:54:29:   Base resolution: 1920x1080
19:54:29:   Output resolution: 1280x720
19:54:29: ------------------------------------------
19:54:29: Loading up D3D10...
19:54:30: Playback device Default
19:54:30: ------------------------------------------
19:54:30: Using desktop audio input: Speakers (Sound Blaster Z)
19:54:30: Using 5.1 speaker setup
19:54:30: ------------------------------------------
19:54:30: Using auxilary audio input: Microphone (Sound Blaster Z)
19:54:30: ------------------------------------------
19:54:30: Audio Encoding: AAC
19:54:30:     bitrate: 192
19:54:30: Using graphics capture
19:54:30: ------------------------------------------
19:54:30: Video Encoding: x264
19:54:30:     fps: 60
19:54:30:     width: 1280, height: 720
19:54:30:     preset: faster
19:54:30:     CBR: yes
19:54:30:     CFR: no
19:54:30:     max bitrate: 5000
19:54:30: ------------------------------------------
19:54:30: SharedTexCapture hooked
19:54:47: Total frames rendered: 1049, number of frames that lagged: 2 (0.19%) (it's okay for some frames to lag)
19:54:47: =====Stream End: 2013-07-07, 19:54:47=================================================
19:54:49: =====Stream Start: 2013-07-07, 19:54:49===============================================
19:54:49:   Multithreaded optimizations: On
19:54:49:   Base resolution: 1920x1080
19:54:49:   Output resolution: 1280x720
19:54:49: ------------------------------------------
19:54:49: Loading up D3D10...
19:54:49: Playback device Default
19:54:49: ------------------------------------------
19:54:49: Using desktop audio input: Speakers (Sound Blaster Z)
19:54:49: Using 5.1 speaker setup
19:54:49: ------------------------------------------
19:54:49: Using auxilary audio input: Microphone (Sound Blaster Z)
19:54:49: ------------------------------------------
19:54:49: Audio Encoding: AAC
19:54:49:     bitrate: 192
19:54:49: Using graphics capture
19:54:49: ------------------------------------------
19:54:49: Video Encoding: x264
19:54:49:     fps: 60
19:54:49:     width: 1280, height: 720
19:54:49:     preset: faster
19:54:49:     CBR: yes
19:54:49:     CFR: no
19:54:49:     max bitrate: 5000
19:54:49: ------------------------------------------
19:54:49: SharedTexCapture hooked
19:54:51: Using RTMP service: Twitch / Justin.tv
19:54:51:   Server selection: rtmp://live-jfk.justin.tv/app
19:54:52: SO_SNDBUF was at 8192
19:54:52: SO_SNDBUF is now 65536
20:46:31: Total frames rendered: 185994, number of frames that lagged: 11 (0.01%) (it's okay for some frames to lag)
20:46:31: RTMPPublisher::SocketLoop: Aborting due to bStopping
20:46:31: Number of times waited to send: 0, Waited for a total of 0 bytes
20:46:31: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
20:46:31: =====Stream End: 2013-07-07, 20:46:31=================================================
20:46:31: 
20:46:31: Profiler results:
20:46:31: 
20:46:31: ==============================================================
20:46:31: frame - [100%] [avg time: 1.218 ms (cpu time: avg 1.185 ms, total 221709 ms)] [avg calls per frame: 1] [children: 82.2%] [unaccounted: 17.8%]
20:46:31: | scene->Preprocess - [0.0821%] [avg time: 0.001 ms (cpu time: avg 0.002 ms, total 436.802 ms)] [avg calls per frame: 1]
20:46:31: | video encoding and uploading - [82.1%] [avg time: 1 ms (cpu time: avg 0.974 ms, total 182209 ms)] [avg calls per frame: 1] [children: 79.9%] [unaccounted: 2.22%]
20:46:31: | | CopyResource - [1.07%] [avg time: 0.013 ms (cpu time: avg 0.013 ms, total 2449.21 ms)] [avg calls per frame: 0]
20:46:31: | | conversion to 4:2:0 - [0.493%] [avg time: 0.006 ms (cpu time: avg 0.007 ms, total 1357.21 ms)] [avg calls per frame: 0]
20:46:31: | | call to encoder - [77.1%] [avg time: 0.939 ms (cpu time: avg 0.932 ms, total 174456 ms)] [avg calls per frame: 0]
20:46:31: | | sending stuff out - [1.23%] [avg time: 0.015 ms (cpu time: avg 0.014 ms, total 2652.02 ms)] [avg calls per frame: 0]
20:46:31: | Convert444Threads - [5.47e+003%] [avg time: 66.677 ms (cpu time: avg 1.247 ms, total 233284 ms)] [avg calls per frame: 3]
20:46:31: ==============================================================
20:46:31:
 

Kharay

Member
Given the fact java.exe is the runtime executable for ... well... Java and not for OBS, I don't see why this need to be reported here on the OBS forum. Yes, Java is involved in Minecraft but that still does not make it an OBS bug. First and foremost I'd actually suggest simply updating your Java to the latest version to rule out any obvious memory leaks. As this obviously is a memory leak.
 

kittykiller

New Member
Well the only time it happens is when streaming with OBS (0.541) and when I stop streaming the ram usage drops. So I think that is more than a coincidence.
 

Kharay

Member
It may be more than a coincidence but as Java is not under development by the OBS crew it is not something the OBS crew can fix. You are the first that I know of to report this particular issue. Consequently it is reasonably safe to assume it is something unique to your situation.

And, consequently, it is reasonably safe to start by trying to solve the issue on your end and not assume it is a bug with OBS. So, I repeat my original suggestion -- update Java.
 

kittykiller

New Member
I was using Java 7u40 Build b31 and I downgraded to 7u25 Build b17 and still have the same issue. But this time I come with screenshots :)

After 10 mins of streaming with OBS 541
https://www.dropbox.com/s/9ovx3kcreunkr ... .40.33.png

and 45 seconds after I stop
https://www.dropbox.com/s/mymy8q5eg83yr ... .41.10.png

Another 10 mins of streaming with OBS 522
https://www.dropbox.com/s/vtk3dew76gey7 ... .55.01.png

and 30 seconds later
https://www.dropbox.com/s/65ljpxehs69tl ... .55.34.png

So I'm pretty sure it has to be related to OBS because there is no way it couldn't be at this point. You can clearly see when I'm streaming with the latest version of OBS the ram usage increases in java.exe. And the previous version doesn't have this issue.

I did notice there were changes to OpenGL capturing so it has to be something related to that.
 

Kharay

Member
I cannot reproduce this. So I can neither confirm nor deny it is related to OBS. Whether or not I have OBS running/streaming, Java seems to be running at about 1.2Gb of memory use for me, while "playing" Minecraft. Well, I don't actually play it. But, well... installed it just to try and reproduce it.

And... not sure what's going on. I have the latest stable OBS build, Java 7 Update 25, Win 7 SP1.

Again, I cannot reproduce what you're seeing. I have no idea what's going on there, to be quite honest.
 

todumbtodie

New Member
i have the same thing here
it seems when you game capture minecraft the ram will continue to go up.
what i did was kept my eye on it and change scene to lower it.
but yea it seems like the game capture makes java go crazy mine was at some point at 7gigs in use wich made my computer a bit slow.

this was with windows 7 64bit(fully u-pdated)
obs 64bit v0.541b
java 7 update 21 64bit
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
0.541 you say? If so thanks for pointing it out, I'll check it out
 

todumbtodie

New Member
Jim said:
0.541 you say? If so thanks for pointing it out, I'll check it out

yes its with 0.541b
and i use 64bits dont know if that matters.
if you need to know anything else just ask :P


edit: o and here is the log from that day i streamed.
the dropped frames were just from my ram capping nothing else :P
Code:
13:54:38: Open Broadcaster Software v0.541b - 64bit ( ^ω^)
13:54:38: -------------------------------
13:54:38: CPU Name: Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz
13:54:38: CPU Speed: 3073MHz
13:54:38: Physical Memory:  10231MB Total, 3482MB Free
13:54:38: stepping id: 5, model 10, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
13:54:38: monitor 1: pos={0, 0}, size={1920, 1080}
13:54:38: monitor 2: pos={1920, 0}, size={1920, 1080}
13:54:38: Windows Version: 6.1 Build 7601 S
13:54:38: Aero is Enabled
13:54:38: -------------------------------
13:54:38: OBS Modules:
13:54:38: Base Address     Module
13:54:38: 000000003FE90000 OBS.exe
13:54:38: 00000000E7900000 OBSApi.dll
13:54:38: 00000000F6B60000 DShowPlugin.dll
13:54:38: 00000000FA6C0000 GraphicsCapture.dll
13:54:38: 00000000FA6A0000 NoiseGate.dll
13:54:38: 00000000FA4B0000 PSVPlugin.dll
13:54:38: ------------------------------------------
13:54:38: Adapter 1
13:54:38:   Video Adapter: NVIDIA GeForce GTX 560 Ti  
13:54:38:   Video Adapter Dedicated Video Memory: 1025966080
13:54:38:   Video Adapter Shared System Memory: 3220779008
13:54:38: =====Stream Start: 2013-07-11, 13:54:38===============================================
13:54:38:   Multithreaded optimizations: On
13:54:38:   Base resolution: 1920x1080
13:54:38:   Output resolution: 1280x720
13:54:38: ------------------------------------------
13:54:38: Loading up D3D10...
13:54:38: Playback device {0.0.0.00000000}.{7029fc86-6d0b-4262-a494-9e0807a53203}
13:54:38: ------------------------------------------
13:54:38: Using desktop audio input: Headset (Playback) (5- Creative USB Headset)
13:54:38: ------------------------------------------
13:54:38: Using auxilary audio input: Headset (Record) (5- Creative USB Headset)
13:54:38: ------------------------------------------
13:54:38: Audio Encoding: AAC
13:54:38:     bitrate: 128
13:54:38: Using text output
13:54:38: Using graphics capture
13:54:38: ------------------------------------------
13:54:38: Video Encoding: x264
13:54:38:     fps: 30
13:54:38:     width: 1280, height: 720
13:54:38:     preset: veryfast
13:54:38:     CBR: no
13:54:38:     CFR: no
13:54:38:     max bitrate: 3000
13:54:38:     buffer size: 3000
13:54:38:     quality: 10
13:54:38: ------------------------------------------
13:54:38: SharedTexCapture hooked
13:54:48: Total frames rendered: 308, number of frames that lagged: 1 (0.32%) (it's okay for some frames to lag)
13:54:48: =====Stream End: 2013-07-11, 13:54:48=================================================
13:56:37: =====Stream Start: 2013-07-11, 13:56:37===============================================
13:56:37:   Multithreaded optimizations: On
13:56:37:   Base resolution: 1920x1080
13:56:37:   Output resolution: 1280x720
13:56:37: ------------------------------------------
13:56:37: Loading up D3D10...
13:56:37: Playback device {0.0.0.00000000}.{7029fc86-6d0b-4262-a494-9e0807a53203}
13:56:37: ------------------------------------------
13:56:37: Using desktop audio input: Headset (Playback) (5- Creative USB Headset)
13:56:37: ------------------------------------------
13:56:37: Using auxilary audio input: Headset (Record) (5- Creative USB Headset)
13:56:37: ------------------------------------------
13:56:37: Audio Encoding: AAC
13:56:37:     bitrate: 128
13:56:37: Using text output
13:56:37: Using graphics capture
13:56:37: ------------------------------------------
13:56:37: Video Encoding: x264
13:56:37:     fps: 30
13:56:37:     width: 1280, height: 720
13:56:37:     preset: veryfast
13:56:37:     CBR: no
13:56:37:     CFR: no
13:56:37:     max bitrate: 3000
13:56:37:     buffer size: 3000
13:56:37:     quality: 10
13:56:37: ------------------------------------------
13:56:37: SharedTexCapture hooked
13:56:39: Using RTMP service: Twitch / Justin.tv
13:56:39:   Server selection: rtmp://live-ams.justin.tv/app
13:56:40: SO_SNDBUF was at 8192
13:56:40: SO_SNDBUF is now 65536
15:06:59: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
15:06:59:   New Scene
15:07:19: Using Monitor Capture
15:07:44: RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
15:07:54: Total frames rendered: 125683, number of frames that lagged: 270 (0.21%) (it's okay for some frames to lag)
15:08:01: librtmp error: WriteN, RTMP send error 10053 (79 bytes)
15:08:02: librtmp error: WriteN, RTMP send error 10038 (42 bytes)
15:08:02: Number of times waited to send: 0, Waited for a total of 0 bytes
15:08:02: Number of b-frames dropped: 49 (0.039%), Number of p-frames dropped: 42 (0.033%), Total 91 (0.072%)
15:09:12: =====Stream End: 2013-07-11, 15:09:12=================================================
15:09:39: =====Stream Start: 2013-07-11, 15:09:39===============================================
15:09:39:   Multithreaded optimizations: On
15:09:39:   Base resolution: 1920x1080
15:09:39:   Output resolution: 1280x720
15:09:39: ------------------------------------------
15:09:52: Loading up D3D10...
15:09:53: Playback device {0.0.0.00000000}.{7029fc86-6d0b-4262-a494-9e0807a53203}
15:09:53: ------------------------------------------
15:09:53: Using desktop audio input: Headset (Playback) (5- Creative USB Headset)
15:09:53: ------------------------------------------
15:09:53: Using auxilary audio input: Headset (Record) (5- Creative USB Headset)
15:09:57: ------------------------------------------
15:09:57: Audio Encoding: AAC
15:09:57:     bitrate: 128
15:09:57: Using Monitor Capture
15:09:59: ------------------------------------------
15:09:59: Video Encoding: x264
15:09:59:     fps: 30
15:09:59:     width: 1280, height: 720
15:09:59:     preset: veryfast
15:09:59:     CBR: no
15:09:59:     CFR: no
15:09:59:     max bitrate: 3000
15:09:59:     buffer size: 3000
15:09:59:     quality: 10
15:09:59: ------------------------------------------
15:10:02: Using RTMP service: Twitch / Justin.tv
15:10:02:   Server selection: rtmp://live-ams.justin.tv/app
15:10:05: SO_SNDBUF was at 8192
15:10:05: SO_SNDBUF is now 65536
15:15:17: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
15:15:17:   New Scene
15:15:17: Using text output
15:15:18: Using graphics capture
15:15:21: SharedTexCapture hooked
15:30:39: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
15:30:39:   New Scene
15:30:39: Using bitmap image
15:44:01: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
15:44:01:   New Scene
15:44:01: Using text output
15:44:01: Using graphics capture
15:44:01: SharedTexCapture hooked
16:09:27: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:09:27:   New Scene
16:09:27: Using Monitor Capture
16:10:01: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:10:01:   New Scene
16:10:01: Using text output
16:10:01: Using graphics capture
16:10:01: SharedTexCapture hooked
16:25:16: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:25:16:   New Scene
16:25:16: Using Monitor Capture
16:25:40: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:25:40:   New Scene
16:25:40: Using text output
16:25:40: Using graphics capture
16:25:40: SharedTexCapture hooked
16:37:34: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:37:34:   New Scene
16:37:34: Using Monitor Capture
16:37:57: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:37:57:   New Scene
16:37:57: Using text output
16:37:57: Using graphics capture
16:37:57: SharedTexCapture hooked
16:55:17: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:55:17:   New Scene
16:55:17: Using Monitor Capture
16:55:52: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:55:52:   New Scene
16:55:52: Using text output
16:55:52: Using graphics capture
16:55:52: SharedTexCapture hooked
17:09:46: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:09:46:   New Scene
17:09:46: Using Monitor Capture
17:09:58: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:09:58:   New Scene
17:09:58: Using text output
17:09:58: Using graphics capture
17:09:58: SharedTexCapture hooked
17:22:52: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:22:52:   New Scene
17:22:52: Using Monitor Capture
17:23:05: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:23:05:   New Scene
17:23:05: Using text output
17:23:05: Using graphics capture
17:23:05: SharedTexCapture hooked
17:45:53: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:45:53:   New Scene
17:45:53: Using Monitor Capture
17:46:17: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:46:17:   New Scene
17:46:17: Using text output
17:46:17: Using graphics capture
17:46:17: SharedTexCapture hooked
18:01:01: Total frames rendered: 302537, number of frames that lagged: 8046 (2.66%) (it's okay for some frames to lag)
18:01:01: RTMPPublisher::SocketLoop: Aborting due to bStopping
18:01:01: Number of times waited to send: 15, Waited for a total of 59910 bytes
18:01:01: Number of b-frames dropped: 274 (0.091%), Number of p-frames dropped: 315 (0.1%), Total 589 (0.19%)
18:01:01: =====Stream End: 2013-07-11, 18:01:01=================================================
18:05:41: 
18:05:41: Profiler results:
18:05:41: 
18:05:41: ==============================================================
18:05:41: frame - [100%] [avg time: 3.325 ms (cpu time: avg 2 ms, total 857194 ms)] [avg calls per frame: 1] [children: 81.1%] [unaccounted: 18.9%]
18:05:41: | scene->Preprocess - [33.5%] [avg time: 1.113 ms (cpu time: avg 0.14 ms, total 60216.4 ms)] [avg calls per frame: 1]
18:05:41: | video encoding and uploading - [47.6%] [avg time: 1.583 ms (cpu time: avg 1.409 ms, total 604223 ms)] [avg calls per frame: 1] [children: 45.6%] [unaccounted: 2.05%]
18:05:41: | | CopyResource - [0.481%] [avg time: 0.016 ms (cpu time: avg 0.011 ms, total 4914.03 ms)] [avg calls per frame: 0]
18:05:41: | | conversion to 4:2:0 - [0.571%] [avg time: 0.019 ms (cpu time: avg 0.004 ms, total 1778.41 ms)] [avg calls per frame: 0]
18:05:41: | | call to encoder - [43.5%] [avg time: 1.445 ms (cpu time: avg 1.363 ms, total 584473 ms)] [avg calls per frame: 0]
18:05:41: | | sending stuff out - [1.05%] [avg time: 0.035 ms (cpu time: avg 0.017 ms, total 7706.45 ms)] [avg calls per frame: 0]
18:05:41: | Convert444Threads - [2.04e+003%] [avg time: 67.87 ms (cpu time: avg 1.731 ms, total 741956 ms)] [avg calls per frame: 1]
18:05:41: ==============================================================
18:05:41:
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Just wanted to say we've isolated the problem with OpenGL game capturing (specifically on nvidia drivers it would appear) and will try to push out a workaround solution for it soon. It seems to be a driver bug, but super problem solver r1ch found a workaround to cause the drive to free the memory
 

todumbtodie

New Member
Jim said:
Just wanted to say we've isolated the problem with OpenGL game capturing (specifically on nvidia drivers it would appear) and will try to push out a workaround solution for it soon. It seems to be a driver bug, but super problem solver r1ch found a workaround to cause the drive to free the memory

awesome looking forward to it :)
thanks for your great work and program!
and also great support to.
 

kryptonica

New Member
I can confirm the same issue, without OBS streaming MineCraft FTB Ultimate uses about 1-2 GB of Ram, once I activate it about 50 minutes in i'm using 100% of my ram (15GB) for MineCraft. I turned off OBS and closed it out and my ram droped to the normal 1.5-2 GB Range. This has only been an issue since the latest OBS Patch.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
We've fixed the bug in the latest source -- going to hopefully release an update soon (hopefully today as of this writing)
 

Kharay

Member
Had a 3 hour trial and still could not reproduce it; while another user who was basically looking at the exact same circumstances did experience this behaviour. I am so curious now as to what actually is going on for these people because, as I said, even after 3 hours of streaming MC my Java was perfectly stable at ~900 Mb.

So... Jim... what actually was the bug?... ;) If you don't mind explaining.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Some sort of driver bug with nvidia drivers and the interop2 extension, switched to interop1 and used a d3d9 device as intermediary and it seemed to fix the problem.
 

WayZHC

Member
i can't reproduce it either. Weird. One thing that came to my mind: People who had the problem uses a mod which causes the memory leak when OBS hooks to MC. I don't know. Waiting to hear the actual reason.

E: Nevermind Jim was faster than me :p
 

Gol D. Ace

Member
I tried it with an other OpenGL game (Super Hexagon) and it's also happening there.

So it's not a MC problem but rather a problem with games using OpenGL.
 
Top