Bug Report "Whoops! OBS has crashed" - nvENC VBR closing encoder.

Kisai

New Member
So I think I've done all I can and am pretty certain this is either a bug in OBS or a bug in the nvENC. This crash is repeatable either every first or second time the Preview button is hit to end the preview. It does not appear to crash if Recording to disk or actually streaming. It only seems to show up if the "use CBR" box is unticked, with everything else remaining the same. Ticking the box or switching to Quicksync with the otherwise exact same settings does not crash OBS. The Main desktop is streaming to a second machine, where a third machine then downsamples the video with ffmpeg. I have been able to get both VBR and CBR to stream successfully to the other machine, so this appears to be a minor, albeit irritating crash.

Potentially contributing factors ... clicking on the preview window, as long as something is on the preview window, this can be replicated. It seems to not replicate if there is nothing to encode.

00:22:52: ------------------------------------------
00:22:52: Audio Encoding: AAC
00:22:52: bitrate: 128
00:22:52: Using text output
00:22:52: Using graphics capture
00:22:52: Scene buffering time set to 400
00:22:52: 1 CUDA capable devices found
00:22:52: [ GPU #0 - < GeForce GTX 760 > has Compute SM 3.0, NVENC Available ]
00:22:52: NVENC internal init finished successfully
00:22:52: NVENC supports 8 h264 presets
00:22:53: ------------------------------------------
00:22:53: Video Encoding: NVENC
00:22:53: fps: 60
00:22:53: width: 1920, height: 1080
00:22:53: preset: llhq
00:22:53: profile: main
00:22:53: level: autoselect
00:22:53: keyint: 120
00:22:53: CBR: no
00:22:53: CFR: no
00:22:53: max bitrate: 25000
00:22:53: avg bitrate: 25000
00:22:53: buffer size: 50000
00:22:53: quality: 8
00:22:53: ------------------------------------------
00:22:57: FlushBufferedVideo: Flushing 26 packets over 417 ms
00:22:57: Total frames encoded: 253, total frames duplicated: 0 (0.00%)
00:22:57: Total frames rendered: 260, number of late frames: 1 (0.38%) (it's okay for some frames to be late)

The log file is "incomplete" if you will, because when it succeeds it would have these lines next:
00:22:52: Encoder closed
00:22:52: NVENC deinitialized
Followed by the profiler and ending with
00:22:52: =====Stream End: 2015-06-07, 00:22:52=================================================
Which isn't present when it crashes.

The Crash log is below:

OBS has encountered an unhandled exception and has terminated. If you are able to
reproduce this crash, please submit this crash report on the forums at
http://www.obsproject.com/ - include the contents of this crash log and the
minidump .dmp file (if available) as well as your regular OBS log files and
a description of what you were doing at the time of the crash.

This crash appears to have occured in the 'c:\windows\system32\nvcuvid.dll' module.

**** UNHANDLED EXCEPTION: c0000005
Fault address: 000007FEE7C526ED (c:\windows\system32\nvcuvid.dll)
OBS version: Open Broadcaster Software v0.651b
Windows version: 6.1 (Build 7601) Service Pack 1
CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz

Crashing thread stack trace:
Stack EIP Arg0 Arg1 Arg2 Arg3 Address
00000000001AE570 000007FEE7C526ED 0000000000000000 00000000001AEBA8 000000002860E038 000000002849A600 nvcuvid.dll!0x7fee7c526ed
00000000001AEA80 000007FEEF9F253A 00000000FFFFFFFF 00000000001AEC40 000000001E7BF940 0000000000000001 nvencodeapi64.dll!0x7feef9f253a
00000000001AEB00 000007FEEF9F2AF6 0000000000000078 0000000000000101 0000000028608EA0 00000035000003E7 nvencodeapi64.dll!0x7feef9f2af6
00000000001AEB60 000007FEEF9F4310 0000000028872530 000007FEE7C401EA 0000000080003540 00000000283E8410 nvencodeapi64.dll!0x7feef9f4310
00000000001AEB90 000007FEEF9EF827 00000000001AEC40 000000000000000F 0000000000000258 000000002842B670 nvencodeapi64.dll!0x7feef9ef827
00000000001AEBC0 000007FEEFA03B4C 000000002842B670 000000000000000F 0000000000000001 0000000000000000 nvencodeapi64.dll!0x7feefa03b4c
00000000001AEBF0 000007FEFA31223F 000000002842B670 0000000000000001 0000000000000000 000000002842B670 obsnvenc.dll!NVENCEncoder::~NVENCEncoder+0xbf
00000000001AEC60 000007FEFA312124 0000000000327C40 0000000000327C40 00000000001AECF9 0000000000000000 obsnvenc.dll!NVENCEncoder::`vector deleting destructor'+0x14
00000000001AEC90 000000013FD0DB12 00000000001AEE60 0000000000001397 000000000049072E 0000000000000000 obs.exe!OBS::Stop+0x432
00000000001AED60 000000013FD3B949 0000000000000070 FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF 00000000775D9B43 obs.exe!OBS::OBSProc+0xce9
00000000001AEFB0 00000000775D9BD1 000000000083B450 000000013FD3AC60 00000000FFFFFED1 00000000003B0AE2 user32.dll!0x775d9bd1
00000000001AF070 00000000775D6AA8 000000000049072E 0000000000000111 0000000000001397 000007FEFC0D0AC9 user32.dll!0x775d6aa8
00000000001AF100 00000000775D6BAD 00000000023C43E0 0000000000000001 0000000000000000 0000000000000001 user32.dll!0x775d6bad
00000000001AF150 000007FEFC0D0C5F 00000000003B0AE2 0000000000000001 00000000023C43E0 000007FEFD891D18 comctl32.dll!0x7fefc0d0c5f
00000000001AF190 000007FEFC0D489E 000000000000FF00 0000000000030000 0000000000000202 0000000000000000 comctl32.dll!0x7fefc0d489e
00000000001AF250 00000000775D9BD1 00000000001AF558 000007FEFC0D3BC0 000000000083B450 000000000098C8E0 user32.dll!0x775d9bd1
00000000001AF310 00000000775D98DA 0000000000000000 0000000000000000 000007FEFC0D3BC0 0000000000000001 user32.dll!0x775d98da
00000000001AF390 00000000775D67C2 000000001F280771 000000001F280771 000007FEFD892170 0000000000326FE0 user32.dll!0x775d67c2
00000000001AF420 000000013FCFC919 0000000000000000 0000000000000001 000000013FCD0000 0000000000000000 obs.exe!WinMain+0xa59
00000000001AF9D0 000000013FD7D870 0000000000000000 0000000000000000 0000000000000000 0000000000000000 obs.exe!__tmainCRTStartup+0x148
00000000001AFA10 00000000774B59CD 0000000000000000 0000000000000000 0000000000000000 0000000000000000 kernel32.dll!0x774b59cd
00000000001AFA40 00000000776EB981 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!0x776eb981

A minidump was saved to C:\Users\Kisai\AppData\Roaming\OBS\crashDumps\OBSCrashDump2015-06-07_2.dmp.
Please include this file when posting a crash report.

List of loaded modules:
Base Address Module


Additional Hardware information:
i4770 (non-k), no overclocking, iGPU enabled on Monitor 2
nVidia GTX 760 2GB, 353.06 driver (CUDA 7.5.8, nVidia driver set 8.17.13.5306 2015.5.31) on Monitor 1
32GB RAM
Windows 7 Pro x64
OBS 0.651b - 64bit

Crash can be replicated with the preview on either monitor, which suggests it's not a problem with the preview itself. The crash happens independently of what is being previewed.

It seems like it is failing to close the nVidia encoding "some of the time", and feels like a double-free, or failure to wait for the encoder to stop before freeing/deleting/garbage-collecting type of bug since the only difference is CBR being not ticked.
 

Attachments

  • OBSCrashDump2015-06-07_2.dmp
    879.2 KB · Views: 16

R1CH

Forum Admin
Developer
Thanks for the detailed report, this will be fixed in the next version. Seems like NVENC doesn't like being shut down if there is still pending output - OBS discards pending output if using a preview since it just delays the end of preview otherwise.
 
Top