Bug Report obsnvenc.dll crashes

Boildown

Active Member
I've experienced two crashes while capturing to the hard drive using the NVENC encoder with a GTX 750 Ti. Am hoping a dev could take a look.

One crash I noticed after 9 hours or so, the other around 3 hours or so, of recording to disk. The first one is a long record, so I didn't think much of it, but I've recorded 3 hour sessions using x264 & OBS hundreds of times without issue; it should not crash. In both cases I had a second instance of OBS streaming to Twitch using x264 encoding (-multi) and they continued to stream without interruption.

I also have about a half-dozen successful NVENC records with the 750 Ti, so it doesn't always happen, and I don't know a way to cause it to happen. In both crashes, the resulting .mp4 was unplayable / corrupted (which is expected when OBS crashes).

<removed URL JIC>
 

R1CH

Forum Admin
Developer
Thanks for the dump files, they were very useful. This looks like a bug in the OBS NVENC encoder or NVENC itself, we'll try and fix it in the next release.
 

Boildown

Active Member
R1CH said:
What are your max bitrate and keyframe interval set to?

20000 bitrate and 5 second interval @ 60fps. The crashed captures didn't save a log file, but I believe the neighboring log files should be the same.

Code:
01:04:43: Open Broadcaster Software v0.612b - 32bit (´・ω・`)
01:04:43: -------------------------------
01:04:43: CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
01:04:43: CPU Speed: 3400MHz
01:04:43: Physical Memory:  4095MB Total, 4095MB Free
01:04:43: stepping id: 7, model 42, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
01:04:43: monitor 1: pos={0, 0}, size={1680, 1050}
01:04:43: Windows Version: 6.1 Build 7601 S
01:04:43: Aero is Disabled
01:04:43: -------------------------------
01:04:43: OBS Modules:
01:04:43: Base Address     Module
01:04:43: 01150000         OBS.exe
01:04:43: 73100000         OBSApi.dll
01:04:43: 73560000         DatapathPlugin.dll
01:04:43: 73BA0000         DShowPlugin.dll
01:04:43: 73540000         GraphicsCapture.dll
01:04:43: 73520000         NoiseGate.dll
01:04:43: 73500000         PSVPlugin.dll
01:04:43: ------------------------------------------
01:04:43: Adapter 1
01:04:43:   Video Adapter: NVIDIA GeForce GTX 750 Ti
01:04:43:   Video Adapter Dedicated Video Memory: 2070609920
01:04:43:   Video Adapter Shared System Memory: 2147807232
01:04:43:   Video Adapter Output 1: pos={0, 0}, size={1680, 1050}, attached=true
01:04:43: =====Stream Start: 2014-02-23, 01:04:43===============================================
01:04:43:   Multithreaded optimizations: On
01:04:43:   Base resolution: 1920x1080
01:04:43:   Output resolution: 1920x1080
01:04:43: ------------------------------------------
01:04:43: Loading up D3D10 on NVIDIA GeForce GTX 750 Ti (Adapter 1)...
01:04:43: ------------------------------------------
01:04:43: Audio Format: 44100hz
01:04:43: Playback device Default
01:04:43: ------------------------------------------
01:04:43: Using desktop audio input: Speakers (Creative SB X-Fi)
01:04:43: ------------------------------------------
01:04:43: Using auxilary audio input: Microphone (3- USB Audio Device)
01:04:43: ------------------------------------------
01:04:43: Audio Encoding: AAC
01:04:43:     bitrate: 192
01:04:44: Scene buffering time set to 700
01:04:44: ObsNvenc{32,64}.dll not present
01:04:44: Successfully loaded ObsNvenc.dll
01:04:44: ObsNvenc initialized successfully
01:04:44: CUDA loaded successfully
01:04:44: 1 CUDA capable devices found
01:04:44: [ GPU #0 - < GeForce GTX 750 Ti > has Compute SM 5.0, NVENC Available ]
01:04:44: NVENC internal init finished successfully
01:04:44: NVENC supports 7 h264 presets
01:04:44: ------------------------------------------
01:04:44: Video Encoding: NVENC
01:04:44:     fps: 60
01:04:44:     width: 1920, height: 1080
01:04:44:     preset: hq
01:04:44:     profile: high
01:04:44:     level: autoselect
01:04:44:     keyint: 300
01:04:44:     CBR: yes
01:04:44:     CFR: yes
01:04:44:     max bitrate: 20000
01:04:44:     buffer size: 20000
01:04:44: ------------------------------------------
01:04:44: Audio timestamp for device 'Microphone (3- USB Audio Device)' was behind target timestamp by 29824108
02:09:34: Total frames encoded: 233367, total frames duplicated: 468 (0.20%)
02:09:34: Total frames rendered: 233374, number of late frames: 1 (0.00%) (it's okay for some frames to be late)
02:09:34: Encoder closed
02:09:34: NVENC deinitialized
02:09:34: 
02:09:34: Profiler time results:
02:09:34: 
02:09:34: ==============================================================
02:09:34: video thread frame - [100%] [avg time: 1.109 ms] [children: 7.21%] [unaccounted: 92.8%]
02:09:34: | scene->Preprocess - [0.0902%] [avg time: 0.001 ms]
02:09:34: | GPU download and conversion - [7.12%] [avg time: 0.079 ms] [children: 5.14%] [unaccounted: 1.98%]
02:09:34: | | flush - [2.8%] [avg time: 0.031 ms]
02:09:34: | | CopyResource - [1.44%] [avg time: 0.016 ms]
02:09:34: | | conversion to 4:2:0 - [0.902%] [avg time: 0.01 ms]
02:09:34: Convert444Threads - [100%] [avg time: 1.021 ms] [children: 99.4%] [unaccounted: 0.588%]
02:09:34: | Convert444toNV12 - [99.4%] [avg time: 1.015 ms]
02:09:34: encoder thread frame - [100%] [avg time: 3.276 ms] [children: 0.916%] [unaccounted: 99.1%]
02:09:34: | sending stuff out - [0.916%] [avg time: 0.03 ms]
02:09:34: ==============================================================
02:09:34: 
02:09:34: 
02:09:34: Profiler CPU results:
02:09:34: 
02:09:34: ==============================================================
02:09:34: video thread frame - [cpu time: avg 0.72 ms, total 168047 ms] [avg calls per frame: 1]
02:09:34: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
02:09:34: | GPU download and conversion - [cpu time: avg 0.046 ms, total 10796.9 ms] [avg calls per frame: 1]
02:09:34: | | flush - [cpu time: avg 0.026 ms, total 6234.38 ms] [avg calls per frame: 1]
02:09:34: | | CopyResource - [cpu time: avg 0.006 ms, total 1593.75 ms] [avg calls per frame: 1]
02:09:34: | | conversion to 4:2:0 - [cpu time: avg 0.003 ms, total 859.375 ms] [avg calls per frame: 1]
02:09:34: Convert444Threads - [cpu time: avg 0.935 ms, total 436438 ms] [avg calls per frame: 2]
02:09:34: | Convert444toNV12 - [cpu time: avg 0.93 ms, total 434406 ms] [avg calls per frame: 2]
02:09:34: encoder thread frame - [cpu time: avg 1.508 ms, total 351984 ms] [avg calls per frame: 1]
02:09:34: | sending stuff out - [cpu time: avg 0.035 ms, total 8375 ms] [avg calls per frame: 1]
02:09:34: ==============================================================
02:09:34: 
02:09:34: =====Stream End: 2014-02-23, 02:09:34=================================================
02:10:47: Memory Leaks Were Detected.
02:10:47:

Code:
18:30:09: Open Broadcaster Software v0.612b - 32bit (´・ω・`)
18:30:09: -------------------------------
18:30:09: CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
18:30:09: CPU Speed: 3400MHz
18:30:09: Physical Memory:  4095MB Total, 4095MB Free
18:30:09: stepping id: 7, model 42, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
18:30:09: monitor 1: pos={0, 0}, size={1680, 1050}
18:30:09: Windows Version: 6.1 Build 7601 S
18:30:09: Aero is Disabled
18:30:09: -------------------------------
18:30:09: OBS Modules:
18:30:09: Base Address     Module
18:30:09: 00050000         OBS.exe
18:30:09: 735C0000         OBSApi.dll
18:30:09: 73C10000         DatapathPlugin.dll
18:30:09: 732A0000         DShowPlugin.dll
18:30:09: 73280000         GraphicsCapture.dll
18:30:09: 73260000         NoiseGate.dll
18:30:09: 73240000         PSVPlugin.dll
18:30:09: ------------------------------------------
18:30:09: Adapter 1
18:30:09:   Video Adapter: NVIDIA GeForce GTX 750 Ti
18:30:09:   Video Adapter Dedicated Video Memory: 2070609920
18:30:09:   Video Adapter Shared System Memory: 2147807232
18:30:09:   Video Adapter Output 1: pos={0, 0}, size={1680, 1050}, attached=true
18:30:09: =====Stream Start: 2014-02-28, 18:30:09===============================================
18:30:09:   Multithreaded optimizations: On
18:30:09:   Base resolution: 1920x1080
18:30:09:   Output resolution: 1920x1080
18:30:09: ------------------------------------------
18:30:09: Loading up D3D10 on NVIDIA GeForce GTX 750 Ti (Adapter 1)...
18:30:09: ------------------------------------------
18:30:09: Audio Format: 44100hz
18:30:09: Playback device Default
18:30:09: ------------------------------------------
18:30:09: Using desktop audio input: Speakers (Creative SB X-Fi)
18:30:09: ------------------------------------------
18:30:09: Using auxilary audio input: Microphone (3- USB Audio Device)
18:30:09: ------------------------------------------
18:30:09: Audio Encoding: AAC
18:30:09:     bitrate: 192
18:30:09: Scene buffering time set to 700
18:30:09: ObsNvenc{32,64}.dll not present
18:30:09: Successfully loaded ObsNvenc.dll
18:30:09: ObsNvenc initialized successfully
18:30:09: CUDA loaded successfully
18:30:09: 1 CUDA capable devices found
18:30:09: [ GPU #0 - < GeForce GTX 750 Ti > has Compute SM 5.0, NVENC Available ]
18:30:09: NVENC internal init finished successfully
18:30:09: NVENC supports 7 h264 presets
18:30:09: ------------------------------------------
18:30:09: Video Encoding: NVENC
18:30:09:     fps: 60
18:30:09:     width: 1920, height: 1080
18:30:09:     preset: hq
18:30:09:     profile: high
18:30:09:     level: autoselect
18:30:09:     keyint: 300
18:30:09:     CBR: no
18:30:09:     CFR: yes
18:30:09:     max bitrate: 20000
18:30:09:     buffer size: 0
18:30:09: ------------------------------------------
22:12:43: Total frames encoded: 801218, total frames duplicated: 1160 (0.14%)
22:12:43: Total frames rendered: 801225, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
22:12:43: Encoder closed
22:12:43: NVENC deinitialized
22:12:43: 
22:12:43: Profiler time results:
22:12:43: 
22:12:43: ==============================================================
22:12:43: video thread frame - [100%] [avg time: 0.984 ms] [children: 6.81%] [unaccounted: 93.2%]
22:12:43: | scene->Preprocess - [0.102%] [avg time: 0.001 ms]
22:12:43: | GPU download and conversion - [6.71%] [avg time: 0.066 ms] [children: 4.88%] [unaccounted: 1.83%]
22:12:43: | | flush - [2.74%] [avg time: 0.027 ms]
22:12:43: | | CopyResource - [1.22%] [avg time: 0.012 ms]
22:12:43: | | conversion to 4:2:0 - [0.915%] [avg time: 0.009 ms]
22:12:43: Convert444Threads - [100%] [avg time: 0.986 ms] [children: 99.3%] [unaccounted: 0.71%]
22:12:43: | Convert444toNV12 - [99.3%] [avg time: 0.979 ms]
22:12:43: encoder thread frame - [100%] [avg time: 3.322 ms] [children: 1.48%] [unaccounted: 98.5%]
22:12:43: | sending stuff out - [1.48%] [avg time: 0.049 ms]
22:12:43: ==============================================================
22:12:43: 
22:12:43: 
22:12:43: Profiler CPU results:
22:12:43: 
22:12:43: ==============================================================
22:12:43: video thread frame - [cpu time: avg 0.567 ms, total 454563 ms] [avg calls per frame: 1]
22:12:43: | scene->Preprocess - [cpu time: avg 0 ms, total 78.125 ms] [avg calls per frame: 1]
22:12:43: | GPU download and conversion - [cpu time: avg 0.035 ms, total 28218.8 ms] [avg calls per frame: 1]
22:12:43: | | flush - [cpu time: avg 0.022 ms, total 17828.1 ms] [avg calls per frame: 1]
22:12:43: | | CopyResource - [cpu time: avg 0.003 ms, total 2531.25 ms] [avg calls per frame: 1]
22:12:43: | | conversion to 4:2:0 - [cpu time: avg 0.002 ms, total 2281.25 ms] [avg calls per frame: 1]
22:12:43: Convert444Threads - [cpu time: avg 0.987 ms, total 1.58206e+006 ms] [avg calls per frame: 2]
22:12:43: | Convert444toNV12 - [cpu time: avg 0.982 ms, total 1.57495e+006 ms] [avg calls per frame: 2]
22:12:43: encoder thread frame - [cpu time: avg 1.521 ms, total 1.21902e+006 ms] [avg calls per frame: 1]
22:12:43: | sending stuff out - [cpu time: avg 0.054 ms, total 43656.3 ms] [avg calls per frame: 1]
22:12:43: ==============================================================
22:12:43: 
22:12:43: =====Stream End: 2014-02-28, 22:12:43=================================================
22:13:32: Memory Leaks Were Detected.
22:13:32:

I don't recall if the Feb 23rd capture was on 20000/20000 CBR or 20000/0 VBR like the Feb 28th capture would have been.
 

Boildown

Active Member
So far so good, no further of these crashes with the dev channel or now the latest version.

Also, fewer duplicated frames for some reason (avg 0.19% down to avg of ~0.06%).
 
Top