When using the command line to transcode and RTMP stream (using ffmpeg/libav), the libvlccore.dll causes a Visual C++ runtime error, "This application has requested the Runtime to terminate it in an unusual way" and crashes. This is also replicated in the VLC Media Player.
Command line I'm using is:
:sout=#duplicate{dst=display,dst="transcode{venc=x264{keyint=60,profile=high,tune=zerolatency,min-keyint=60,scenecut=0,vbv-maxrate=960,vbv-bufsize=1920},vcodec=x264,vb=960,scale=1,threads=2,acodec=mp4a,ab=64,channels=2,samplerate=44100}:duplicate{dst=std{access=rtmp,mux=ffmpeg{mux=flv},dst='rtmp://rtmp.server.com:1935/path/to/stream'},dst=file{dst='C:<filelocation\filename',mux=mp4}}"}
:dshow-adev=Microphone (HD Pro Webcam C920)
:dshow-vdev=Logitech HD Pro Webcam C920
:dshow-size=640x480
:dshow-fps=
This only happens with the 2.2.x and 3.0 libraries. It does not happen with 2.1.x. Unfortunately, the 2.1.x libraries are not stable with the RTMP stream.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
Updating the command line to what is actually used to replicate the error (the earlier one was mistakenly copied from an older test).
vlc -vvv -I rc dshow:// :dshow-vdev="Logitech HD Pro Webcam C920" :dshow-adev="Microphone (HD Pro Webcam C920)" :dshow-size="640x480" --logfile="log18.txt" --file-logging --verbose=1 --log-verbose=1 --sout-avcodec-strict=-2 --sout-mux-caching=6000 --sout=#duplicate{dst=display,dst='transcode{venc=x264{keyint=60,profile=high,tune=zerolatency,min-keyint=60,scenecut=0,vbv-maxrate=960,vbv-bufsize=1920},vcodec=x264,vb=960,scale=1,threads=2,acodec=mp4a,ab=64,channels=2,samplerate=44100}:duplicate{dst=std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://rtmp.server.com:1935/path/to/stream},dst=file{dst=Test.mp4,mux=mp4}}'}
I don't have the ability to run a stack trace, so posted to the forum. I believe this is a bug, though, so updating here in case someone has the ability to repro and run a stack trace.
The crash is reproducible 100% of the time, but the crash occurs when quitting the app. When the Visual C++ error occurs, qdb will not take the bt entry to run a backtrace. Once I dismiss the C++ error, the app crashes and when I try a bt at that time it says No Stack. The last entries from qdb are about 25 lines of [Thread 2272.xxxx exited with code 3].
The issue is not related to my dshow inputs or capture devices. It is reproducible on Win7, Win8.1, Win10, both 32 & 64 bit and all different capture devices. Using VLC 32 bit.
The crash is reproducible 100% of the time, but the crash occurs when quitting the app. When the Visual C++ error occurs, qdb will not take the bt entry to run a backtrace. Once I dismiss the C++ error, the app crashes and when I try a bt at that time it says No Stack. The last entries from qdb are about 25 lines of [Thread 2272.xxxx exited with code 3].
That doesn't sound like a crash, rather an abort().
To get a stack trace of it, add a breakpoint before starting vlc (between points 7 and 8 in the gdb tutorial):
b abort
Then start with run just like before, and it should stop once the abort() function is called.
bt should give you a useful result at this point.
Thank you for the help. Here is the stack trace. If this is meaningful to you, can we re-open this bug?
Breakpoint 1, 0x7664bb6b in msvcrt!abort () from C:\WINDOWS\SYSTEM32\msvcrt.dll(gdb) bt[#0](https://code.videolan.org/videolan/vlc/-/issues/0) 0x7664bb6b in msvcrt!abort () from C:\WINDOWS\SYSTEM32\msvcrt.dll[#1](https://code.videolan.org/videolan/vlc/-/issues/1) 0x6d7f1cb8 in EnterMTA () at ../../extras/package/win32/../../../modules/audio_output/mmdevice.c:70[#2](https://code.videolan.org/videolan/vlc/-/issues/2) 0x6d7f21b5 in Flush (aout=0x5517780, wait=false) at ../../extras/package/win32/../../../modules/audio_output/mmdevice.c:167[#3](https://code.videolan.org/videolan/vlc/-/issues/3) 0x6a673476 in aout_DecFlush (aout=0x5517780, wait=wait@entry=false) at ../../extras/package/win32/../../../src/audio_output/dec.c:442[#4](https://code.videolan.org/videolan/vlc/-/issues/4) 0x6a63c1d4 in DeleteDecoder (p_dec=p_dec@entry=0x75521f0) at ../../extras/package/win32/../../../src/input/decoder.c:1697[#5](https://code.videolan.org/videolan/vlc/-/issues/5) 0x6a63f8ae in input_DecoderDelete (p_dec=0x75521f0) at ../../extras/package/win32/../../../src/input/decoder.c:1892[#6](https://code.videolan.org/videolan/vlc/-/issues/6) 0x6a642a67 in EsDestroyDecoder (p_es=0x552bfe8, p_es=0x552bfe8, out=0x74a9ad0) at ../../extras/package/win32/../../../src/input/es_out.c:1592[#7](https://code.videolan.org/videolan/vlc/-/issues/7) 0x6a643d68 in EsUnselect (out=out@entry=0x74a9ad0, es=0x552bfe8, b_update=<optimized out>) at ../../extras/package/win32/../../../src/input/es_out.c:1703[#8](https://code.videolan.org/videolan/vlc/-/issues/8) 0x6a647fc5 in EsOutControlLocked (args=0x96fe10 "\020'", i_query=65536, out=0x74a9ad0) at ../../extras/package/win32/../../../src/input/es_out.c:2207[#9](https://code.videolan.org/videolan/vlc/-/issues/9) EsOutControl (out=0x74a9ad0, i_query=65536, args=0x96fe0c "") at ../../extras/package/win32/../../../src/input/es_out.c:2725[#10](https://code.videolan.org/videolan/vlc/-/issues/10) 0x6a6492ed in es_out_vaControl (args=0x96fe0c "", i_query=65536, out=0x74a9ad0)---Type <return> to continue, or q <return> to quit--- at ../../extras/package/win32/../../../include/vlc_es_out.h:125[#11](https://code.videolan.org/videolan/vlc/-/issues/11) es_out_Control (out=0x74a9ad0, i_query=65536) at ../../extras/package/win32/../../../include/vlc_es_out.h:134[#12](https://code.videolan.org/videolan/vlc/-/issues/12) 0x6a64951f in CmdExecuteControl (p_out=<optimized out>, p_cmd=p_cmd@entry=0x96fe74) at ../../extras/package/win32/../../../src/input/es_out_timeshift.c:1523[#13](https://code.videolan.org/videolan/vlc/-/issues/13) 0x6a64b02c in ControlLocked (args=0x96feec "", i_query=65536, p_out=0x74cfc80) at ../../extras/package/win32/../../../src/input/es_out_timeshift.c:650[#14](https://code.videolan.org/videolan/vlc/-/issues/14) Control (p_out=0x74cfc80, i_query=65536, args=0x96feec "") at ../../extras/package/win32/../../../src/input/es_out_timeshift.c:755[#15](https://code.videolan.org/videolan/vlc/-/issues/15) 0x6a64ce4d in es_out_vaControl (args=0x96feec "", i_query=65536, out=0x74cfc80) at ../../extras/package/win32/../../../include/vlc_es_out.h:125[#16](https://code.videolan.org/videolan/vlc/-/issues/16) es_out_Control (out=0x74cfc80, i_query=i_query@entry=65536) at ../../extras/package/win32/../../../include/vlc_es_out.h:134[#17](https://code.videolan.org/videolan/vlc/-/issues/17) 0x6a64da78 in es_out_SetMode (i_mode=0, p_out=<optimized out>) at ../../extras/package/win32/../../../src/input/es_out.h:89[#18](https://code.videolan.org/videolan/vlc/-/issues/18) End (p_input=p_input@entry=0x755d198) at ../../extras/package/win32/../../../src/input/input.c:1303[#19](https://code.videolan.org/videolan/vlc/-/issues/19) 0x6a653c2f in Run (obj=0x755d198) at ../../extras/package/win32/../../../src/input/input.c:492[#20](https://code.videolan.org/videolan/vlc/-/issues/20) 0x6a6a5e6d in vlc_entry (p=0x74a97b0) at ../../extras/package/win32/../../../src/win32/thread.c:480---Type <return> to continue, or q <return> to quit---[#21](https://code.videolan.org/videolan/vlc/-/issues/21) 0x766571e6 in msvcrt!_beginthreadex () from C:\WINDOWS\SYSTEM32\msvcrt.dll[#22](https://code.videolan.org/videolan/vlc/-/issues/22) 0x766572b1 in msvcrt!_endthreadex () from C:\WINDOWS\SYSTEM32\msvcrt.dll[#23](https://code.videolan.org/videolan/vlc/-/issues/23) 0x770738f4 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\SYSTEM32\kernel32.dll[#24](https://code.videolan.org/videolan/vlc/-/issues/24) 0x77a85de3 in ntdll!RtlUnicodeStringToInteger () from C:\WINDOWS\SYSTEM32\ntdll.dll[#25](https://code.videolan.org/videolan/vlc/-/issues/25) 0x07542aa8 in ?? ()[#26](https://code.videolan.org/videolan/vlc/-/issues/26) 0x77a85dae in ntdll!RtlUnicodeStringToInteger () from C:\WINDOWS\SYSTEM32\ntdll.dll[#27](https://code.videolan.org/videolan/vlc/-/issues/27) 0xffffffff in ?? ()[#28](https://code.videolan.org/videolan/vlc/-/issues/28) 0x77aab7d9 in ntdll!RtlCaptureContext () from C:\WINDOWS\SYSTEM32\ntdll.dll[#29](https://code.videolan.org/videolan/vlc/-/issues/29) 0x00000000 in ?? ()(gdb)
I put a break point on CoInitialize and CoInitializeEX. This is the back trace.
Breakpoint 2, 0x74c18925 in combase!CoInitializeEx () from C:\WINDOWS\SYSTEM32\combase.dll(gdb) bt[#0](https://code.videolan.org/videolan/vlc/-/issues/0) 0x74c18925 in combase!CoInitializeEx () from C:\WINDOWS\SYSTEM32\combase.dll[#1](https://code.videolan.org/videolan/vlc/-/issues/1) 0x03771fbf in TryEnterMTA (obj=0x3187780) at ../../extras/package/win32/../../../modules/audio_output/mmdevice.c:56[#2](https://code.videolan.org/videolan/vlc/-/issues/2) Open (obj=0x3187780) at ../../extras/package/win32/../../../modules/audio_output/mmdevice.c:1123[#3](https://code.videolan.org/videolan/vlc/-/issues/3) 0x00f77470 in module_load (obj=obj@entry=0x3187780, m=m@entry=0x3096f58, init=init@entry=0xf77420 <generic_start>, args=args@entry=0x65f854 "\200w\030\003") at ../../extras/package/win32/../../../src/modules/modules.c:185[#4](https://code.videolan.org/videolan/vlc/-/issues/4) 0x00f777cd in vlc_module_load (obj=obj@entry=0x3187780, capability=capability@entry=0x106620a <__func__.28264+242> "audio output", name=0x10743b1 <__func__.27227+37> "", name@entry=0x1066217 <__func__.28264+255> "$aout", strict=strict@entry=false, probe=probe@entry=0xf77420 <generic_start>) at ../../extras/package/win32/../../../src/modules/modules.c:277[#5](https://code.videolan.org/videolan/vlc/-/issues/5) 0x00f77f24 in module_need (obj=obj@entry=0x3187780, cap=cap@entry=0x106620a <__func__.28264+242> "audio output", name=name@entry=0x1066217 <__func__.28264+255> "$aout", strict=strict@entry=false) at ../../extras/package/win32/../../../src/modules/modules.c:366[#6](https://code.videolan.org/videolan/vlc/-/issues/6) 0x00f6567f in aout_New (parent=parent@entry=0x703fc0) at ../../extras/package/win32/../../../src/audio_output/output.c:220---Type <return> to continue, or q <return> to quit---[#7](https://code.videolan.org/videolan/vlc/-/issues/7) 0x00f461b0 in input_resource_GetAout (p_resource=0x318e1a0) at ../../extras/package/win32/../../../src/input/resource.c:341[#8](https://code.videolan.org/videolan/vlc/-/issues/8) 0x00f19a1e in playlist_Create (p_parent=p_parent@entry=0x703c50) at ../../extras/package/win32/../../../src/playlist/engine.c:283[#9](https://code.videolan.org/videolan/vlc/-/issues/9) 0x00f15828 in intf_GetPlaylist (libvlc=0x703c50) at ../../extras/package/win32/../../../src/interface/interface.c:149[#10](https://code.videolan.org/videolan/vlc/-/issues/10) libvlc_InternalAddIntf (libvlc=0x703c50, name=name@entry=0x40c88f "hotkeys,none") at ../../extras/package/win32/../../../src/interface/interface.c:186[#11](https://code.videolan.org/videolan/vlc/-/issues/11) 0x6a4323aa in libvlc_add_intf (p_instance=0x703b80, name=0x40c88f "hotkeys,none") at ../../extras/package/win32/../../../lib/playlist.c:46[#12](https://code.videolan.org/videolan/vlc/-/issues/12) 0x00401e51 in ?? ()[#13](https://code.videolan.org/videolan/vlc/-/issues/13) 0x0040aacd in ?? ()[#14](https://code.videolan.org/videolan/vlc/-/issues/14) 0x004013e2 in ?? ()[#15](https://code.videolan.org/videolan/vlc/-/issues/15) 0x770738f4 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\SYSTEM32\kernel32.dll[#16](https://code.videolan.org/videolan/vlc/-/issues/16) 0x77a85de3 in ntdll!RtlUnicodeStringToInteger () from C:\WINDOWS\SYSTEM32\ntdll.dll[#17](https://code.videolan.org/videolan/vlc/-/issues/17) 0x00241000 in ?? ()[#18](https://code.videolan.org/videolan/vlc/-/issues/18) 0x77a85dae in ntdll!RtlUnicodeStringToInteger () from C:\WINDOWS\SYSTEM32\ntdll.dll[#19](https://code.videolan.org/videolan/vlc/-/issues/19) 0xffffffff in ?? ()[#20](https://code.videolan.org/videolan/vlc/-/issues/20) 0x77aab7df in ntdll!RtlCaptureContext ()---Type <return> to continue, or q <return> to quit--- from C:\WINDOWS\SYSTEM32\ntdll.dll[#21](https://code.videolan.org/videolan/vlc/-/issues/21) 0x00000000 in ?? ()(gdb)