Search Issue Tracker

By Design

Votes

0

Found in

2019.4

2020.3

2021.1

2021.1.13f1

2021.2

2022.1

Issue ID

1351060

Regression

No

Crash on cask::SafeEnum in Editor when exchanging DirectX 11 textures

Graphics Device Features

-

How to reproduce:
1. Run "Tutorial04.exe" from the user's attached archive "SpoutSenderExample.zip"
2. Open user's attached project from "SpoutUnityProject.zip"
3. Open Scene "SampleScene"
4. Enter Play Mode and wait around 5 seconds

Reproducible with: 2019.4.29f1, 2020.3.15f2, 2021.1.16f1, 2021.2.0b6, 2022.1.0a4
Couldn't test with: 2018.4.36f1 ("DllNotFoundException: SpoutWrapper.dll", even though the library is present)

First lines of the stack trace:
0x00007FF88E067C95 (nvwgf2umx) NVENCODEAPI_Thunk
0x00007FF88DD3977D (nvwgf2umx) cask::ShaderList<cask::ConvShader,cask::Convolution>::availableShaders
0x00007FF88E7B4D7F (nvwgf2umx) cask::SafeEnum<cask::md::Algorithm_ENUMCLASS_SCOPEWRAPPER>::operator=
0x00007FFCE672F9EA (nvwgf2umx) NVENCODEAPI_Thunk
0x00007FFCE73A2154 (nvwgf2umx) OpenAdapter12

Notes:
- Crashes after error "d3d11: RegisterNativeTexture could not get texture"
- Does NOT reproduce in Build

  1. Resolution Note (2022.1.X):

    Spout library is being called from the C# script directly, and that runs on the mainthread. Our DX11 context actually runs on a separate renderthread. This leads to warnings into console such as:
    "D3D11 CORRUPTION: ID3D11DeviceContext::IASetVertexBuffers: Two threads were found to be executing functions associated with the same Device[Context] at the same time. This will cause corruption of memory. Appropriate thread synchronization needs to occur external to the Direct3D API (or through the ID3D10Multithread interface). 12644 and 12812 are the implicated thread ids. [ MISCELLANEOUS CORRUPTION #28: CORRUPTED_MULTITHREADING]"

    We have a plugin API that allows users to interface with our rendering thread. So this particular usecase should be implemented so that the part that actually communicates with Spout is implemented as Unity Plugin.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.