Video player throws Got null handle from IDXGIResource::GetSharedHandle on some Windows computers

I’m working on a multi-platform project that plays mp4 videos from and external source (and can not change to other format).

The unity video player is working fine on macOS, and Android and on all tested windows computers (around 4) except for mine.

I get the “Got null handle from IDXGIResource::GetSharedHandle.” repeated over and over again.
In unity editor, there is no image and no sound.
In build, there is no image but audio is playing.

I was able to find these three mentions of the same exception, but their solutions were either wait for a fix or change the video format.

I have Windows 10 Enterprise 64-bit, build 18363; Directx 12; newest graphics card drivers.
The project runs on unity 2019.3.7f1( even tried latest 2020.2.0a10, but the issue persisted)

I was also unable to find a bug issue tracking this.
It seems to be happening since end of march 2020.

Is this something that unity team knows about?

Any ideas that could help?

I’ve dug some more into this issue and found out that in my case it’s likely an AMD graphics card driver fault.
After setting the unity editor to run on my Intel UHD Graphics instead of AMD graphics card the video plays fine.
Same works for the build.

So as a workaround: On windows 10, going to Settings → Display → Graphics Settings and setting the C:\ProgramFiles\Unity\Hub\Editor\20xx.xxx\Editor\UnityHelper.exe to run on Intel UHD Graphics sidestepped my issue.

Hi!

As you have pointed out, this same problem has been reported over here: Video player crashing with Got null handle from IDXGIResource::GetSharedHandle

Thanks for taking the time to identify that AMD seems to be the source of it. This matches the description that the other user provided when submitting the bug. The bug report itself is still under investigation; its id will be 1237818 when initial triage is over, if you want to track it. I’ve added a link to this thread in the case description so the customer QA - and ultimately the dev fixing it - gets all the info.

You are mentioning the use of DX12: can you also give it a try with DX11? Also, please let us know the graphics card model so we can validate our fix on a comparable system.

Thanks for helping understand the issue,

Dominique
A/V developer at Unity

Are there any news on this bug? I can’t find the id 1237818 in the issue tracker.

We released the demo of our game last week, and the people who can’t see the videos are giving us bad reviews. They are relevant to the plot, so skipping them is just a las resort workaround. We’re releasing the game next week and we’d like to at least know the state the issue is currently at, so we can plan our communication.

Is there a stable workaround changing the transcode settings? We don’t want for a workaround to consequently break the videos for other players.

Edit: I can confirm that at least two of the cases reported are using AMD hardware. One of the specified AMD Radeon R8 M445DX (GPU) with AMD A10-9600P 3.30 GHz (CPU)

I’m very sorry for the double post, I want to make sure that I post on the thread that is watched.

Hey @BonitaPersona , let me see if I can find out what’s going on with the bug ID for you

1 Like

We have a live application and the customer is complaining about the video not working, can any workarounds which We can try?

not display video from videoplayer,but have sound,
i use videoplayer url to play local .mp4 video

platform windows10 ,AMD GPU
log error Got null handle from IDXGIResource::GetSharedHandle.
unity 2019.4.16f1c1
help

Change PlayerSetting → OtherSettings->AutoGraphics API for Windows (false) and add Vulkan to first
is work in AMD GPU

Hello! Yes we have a user report. The videos aren’t showing. Could you estimate a fix?

Mono path[0] = ‘C:/Program Files (x86)/Steam/steamapps/common/ATOM RPG/AtomRPG_x64_Data/Managed’
Mono config path = ‘C:/Program Files (x86)/Steam/steamapps/common/ATOM RPG/MonoBleedingEdge/etc’
Initialize engine version: 2019.4.20f1 (6dd1c08eedfa)
[Subsystems] Discovering subsystems at path C:/Program Files (x86)/Steam/steamapps/common/ATOM RPG/AtomRPG_x64_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: AMD Radeon™ 530 (ID=0x6900)
Vendor:
VRAM: 2039 MB
Driver: 26.20.15029.27017
Begin MonoManager ReloadAssembly

  • Completed reload, in 1.653 seconds
    D3D11 device created for Microsoft Media Foundation video decoding.
    Initializing input.

Input initialized.

Initialized touch support.

UnloadTime: 25.852200 ms

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Got null handle from IDXGIResource::GetSharedHandle.
(Filename: Line: 1370)

Hey there. Big fan of your game btw :slight_smile:

Have you tried the workarounds for this issue in the other thread mentioned earlier + above your post?

If you have not, please give it a go and let me know how you get on. Alternatively, let me know if you run into issues still so I can check the status of this bug with the team.

Hello! We are happy that you liked the game. Hope you didn’t encounter any issues :slight_smile:
We can identify that the problem was in Radeon 530 and for temporty solution we can change video codec for Randero 530 to VP8. But maybe you have a bigger list of video cards with this issue.

Same Issue with Radeon 520 on a dell inspiron laptop 15 3000.
using Unity.2019.4
The laptop has 2 graphic displays, radeon 520 and intel hud “some number”
Can I ask does this problem occur only to machines with two graphic displays?

No, we have same issue with Radeon R5.

This is fixing the problem but when I minimize the app, it crashes. It happens on windows