Editor crash
Summary
Looping RTSP causes the Unity Editor to crash.
Minimal project and steps to reproduce
Use two networked computers, one for streaming video and the other to run Unity. These steps were tested on Windows 10.
Download this video on computer 1:
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WeAreGoingOnBullrun.mp4
On computer 1.
- Start VLC Media player.
- From the menu, select Media -> Stream
- Click the +Add button
- Select a file to stream and click the Open button
- Click the Stream pulldown button
- Click Next
- Check Display locally checkbox
- From the File pulldown, select RTSP and click the Add button
- Check that the port number is 8554
- Click the Next button
- Uncheck Active Transcoding checkbox
- Confirm that the pulldown selection is Video - H.264 + MP3 (MP4)
- Click the Next button
- Check the Stream all elementary streams checkbox
- Click the Stream button and the video should begin playing. You should see the video.
- Ensure that the repeat many button option is selected
On computer 2:
- Start Unity Hub
- Click the New button pulldown and select version 2019.3.2 or higher
- Make sure the 3D template is selected, choose a name for your project and click the Create button
- Bring up the Unity Asset Store Window/tab and download/import the VLC for Unity Asset. Wait for the import to complete.
- From the menu, select Assets -> Import Package -> Custom Package and select the VLC4Unity - rtsplooping.unitypackage file (attached)
- When prompted, click the Import button
- In the projects folder, navigate to Assets -> VLC-Unity-Windows -> Scripts and select the main scene
- For the VLC screen in the hierarchy, scroll down to the Use Rendering Plugin script and change the IP address in the URL to that of computer 1.
- Press the Play button and the videos should start streaming from computer 1. It may be necessary to disable the firewall on computer 2.
What is the current bug behavior?
The video loops several times and then the Unity editor crashes. If it doesn't crash after 5 plays, just give it more time. It will crash.
What is the expected correct behavior?
The video should continue looping and the Unity editor should not crash.
Does it work on other platforms? Does it work with the official VLC apps?
Only tested on Windows 10. Looping works using the official VLC application.
Relevant logs and/or screenshots
vlc4unity_-_rtsplooping.unitypackage
Stack Trace of Crashed Thread 2880:
0x00007FFB8BCC85C9 (libvlccore) vlc_cond_signal
0x00007FFB8BC9F1F9 (libvlccore) aout_DevicesList
0x00007FFB8BC9F2DB (libvlccore) aout_DevicesList
0x00007FFB8BCA12FD (libvlccore) vout_display_Delete
0x00007FFB8BCCE179 (libvlccore) var_GetAndSet
0x00007FFB8BCCE4AE (libvlccore) var_SetChecked
0x00007FFB8BCA4E75 (libvlccore) vout_Hold
0x00007FFB8BC93BD7 (libvlccore) input_resource_Release
0x00007FFB8BC6D833 (libvlccore) input_DecoderSetSpuHighlight
0x00007FFB8BC70042 (libvlccore) decoder_UpdateVideoOutput
0x00007FFB870D2098 (libavcodec_plugin) Ordinal0
0x00007FFB8710DF7D (libavcodec_plugin) vlc_entry_license
0x00007FFB8793B201 (libavcodec_plugin) vlc_entry_license
0x00007FFB87A42CB9 (libavcodec_plugin) vlc_entry_license
0x00007FFB87A408A3 (libavcodec_plugin) vlc_entry_license
0x00007FFB87A3A835 (libavcodec_plugin) vlc_entry_license
0x00007FFB87A38E84 (libavcodec_plugin) vlc_entry_license
0x00007FFB8732180D (libavcodec_plugin) vlc_entry_license
0x00007FFB873205B6 (libavcodec_plugin) vlc_entry_license
0x00007FFB87110980 (libavcodec_plugin) vlc_entry_license
0x00007FFB8711076E (libavcodec_plugin) vlc_entry_license
0x00007FFB8710C042 (libavcodec_plugin) vlc_entry_license
0x00007FFB8710BF38 (libavcodec_plugin) vlc_entry_license
0x00007FFB870D3329 (libavcodec_plugin) Ordinal0
0x00007FFB870D2D55 (libavcodec_plugin) Ordinal0
0x00007FFB8BC6F7AD (libvlccore) input_DecoderSetSpuHighlight
0x00007FFB8BC6D1BB (libvlccore) input_DecoderSetSpuHighlight
0x00007FFB8BCD81D6 (libvlccore) vlc_GetCPUCount
0x00007FFC513D0E72 (ucrtbase) beginthreadex
0x00007FFC52C87BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFC5448CED1 (ntdll) RtlUserThreadStart
Environment
- OS: Windows
- Version: 10
- Device: Corsair One Pro (i7-7700K CPU @ 4.20GHZ, 32GB RAM, GTX 1080)
- LibVLC version and architecture: libvlc.dll version 4.0.0.0 (per dll)
- LibVLCSharp version: libvlcsharp.dll version 4.0.0.0 (per dll)
- VLC Unity plugin version: 0.0.5 per asset store (dll field blank)
Possible fixes
Unknown
