[Bug-Report] Bink Media Broken in 5.6

Something seems totally broken with Bink in 5.6
After getting crashes with an existing project using Bink, I attempted to see if it works with a clean 5.6 project.

Steps to reproduce in a blank project:

  • Add the Bink Media plugin.
  • Create a Bink Media Player, then add a Bink Media Texture.
  • Open the texture and use the ‘…’ to provide a path to a bk2 file.
  • CRASH OCCURS

The crash seems related to the Bink texture.
The moment the texture is given a URL of a bink video, unreal crashes.

With an existing project, this means that the project is effectively unloadable in 5.6 (as there will most likely already be a URL)

The only way I could get an existing project to open, was to manually disable the Bink Media plugin in the .uproject file first.

This enables the project to be opened, and optionally any existing Bink Textures to be deleted,
allowing the plugin to be reenabled. But that is rather pointless, as the moment you try to use it, it crashes the editor again.

Potential duplicate
(Sorry, I don’t read ?Korean?, but there is no actual description in there anyway)

5 Likes

Looks like it is UE-289895
https://issues.unrealengine.com/issue/UE-289895

(Bug created on May 23, 2025)
Seems like the Licensee was also kind enough to post a (potential) fix for the bug.

Shame no one included it in 5.6
I mean, completely breaking an existing feature, that’s something you would expect regression testing to have caught, no?

4 Likes

Hi, we are hitting something similar, but with Vulkan on Windows.

Almost the same repro steps:

  • Add the Bink Media plugin.
  • Create a Bink Media Player
  • Add bk2 to URL
  • CRASH

It’s really an assert in FVulkanTexture::InternalLockWrite

Callstack is as follows:

> [Inline Frame] UnrealEditor-VulkanRHI.dll!FVulkanTexture::InternalLockWrite::__l2::<lambda_1>::operator()() Line 122 C++
UnrealEditor-VulkanRHI.dll!FVulkanTexture::InternalLockWrite(FVulkanContextCommon & Context, FVulkanTexture * Surface, const VkBufferImageCopy & Region, VulkanRHI::FStagingBuffer * StagingBuffer) Line 122 C++
[Inline Frame] UnrealEditor-VulkanRHI.dll!FVulkanDynamicRHI::InternalUpdateTexture2D::__l2::<lambda_1>::operator()(FRHICommandListBase &) Line 1338 C++
UnrealEditor-VulkanRHI.dll!?ExecuteAndDestruct@?$TRHILambdaCommand@VFRHICommandListBase@@V<lambda_1>@?1??InternalUpdateTexture2D@FVulkanDynamicRHI@@IEAAXAEAV1@PEAVFRHITexture@@IAEBUFUpdateTextureRegion2D@@IPEBE@Z@@@UEAAXAEAVFRHICommandListBase@@@Z(FRHICommandListBase & CmdList) Line 387 C++
UnrealEditor-RHI.dll!FRHICommandListBase::Execute() Line 527 C++
UnrealEditor-RHI.dll!FRHICommandListExecutor::FTranslateState::Translate(FRHICommandListBase * CmdList) Line 1081 C++
UnrealEditor-RHI.dll!??R<lambda_1>@?9??Dispatch@FSubmitState@FRHICommandListExecutor@@QEAAXPEAVFRHICommandListBase@@@Z@QEBA@XZ() Line 1028 C++
[Inline Frame] UnrealEditor-RHI.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<0>,void __cdecl(void)>::operator()() Line 471 C++
UnrealEditor-RHI.dll!FRHICommandListExecutor::FTaskPipe::Execute(FRHICommandListExecutor::FTaskPipe::FTask * Task, const TRefCountPtr & CurrentEvent) Line 725 C++
[Inline Frame] UnrealEditor-RHI.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &)>::operator()(ENamedThreads::Type <Params_0>, const TRefCountPtr &) Line 471 C++
[Inline Frame] UnrealEditor-RHI.dll!TFunctionGraphTaskImpl<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &),0>::DoTaskImpl(TUniqueFunction<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &)> & Function, ENamedThreads::Type) Line 1123 C++
[Inline Frame] UnrealEditor-RHI.dll!TFunctionGraphTaskImpl<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &),0>::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr &) Line 1104 C++
UnrealEditor-RHI.dll!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(ENamedThreads::Type,TRefCountPtr const & __ptr64),0>>::ExecuteTask() Line 706 C++
UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 527 C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 505 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 668 C++
UnrealEditor-RenderCore.dll!FRHIThread::Run() Line 270 C++
UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 159 C++
UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 71 C++

This is still not fixed. I have a 120 gb cinematic project file. And when I upgraded to 5.6, I thought my project was broken (my levels with bink texture were not opening). I didn’t understand what was causing the crash, so I tried one by one and found it. I hope they fix it soon. I had to delete all my bink files (bk2-texture-media).

1 Like

One month into the future and found the happy Bink accident also…100% repro rate from a clean project. Pretty harsh not to be able to use Bink.

The fix works great until you package the project for shipping then the packaged build crashes on startup because of bink

Same..

I tested version 5.6.1, and even though the bug report page says it hasn’t been fixed, it works fine, so if you use Source Version, you can download it from branch 5.6. Otherwise, wait for Epic to publish it on the launcher.

Not fixed in 5.6.1

Not fixed for me also 5.6.1, reproducing it. I guess we wait for this fix or until someone finds a proper workaround.

hi, is there anything specific that you’re doing to not get crashes ? I can’t open my project (not empty new project) unless I disable BinkMedia plugin or if I set the project to DX11

similar problem on 5.6.1
it breaks loading screens in my game.

I’m running into this issue as well. We’re leaning on Bink pretty heavily, and had to revert to 5.5 until this is resolved.

Also ran into this issue with 5.6.1. Had to disable all loading screens and our Intro video until fixed.

Also hit this playing a Bink video in game or by following the media-texture repo steps ( selecting the bink video file to use in ueditor )

Callstack

UnrealEditor-Core-Win64-Debug.dll!UE::Logging::Private::BasicFatalLogV(const FLogCategoryBase & Category, const UE::Logging::Private::FStaticBasicLogRecord * Log, void * ProgramCounter, char * Args) Line 1599 C++
UnrealEditor-Core-Win64-Debug.dll!UE::Logging::Private::BasicFatalLog(const FLogCategoryBase & Category, const UE::Logging::Private::FStaticBasicLogRecord * Log, …) Line 1610 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12DynamicRHI::HandleFailedD3D12Result::__l2::<lambda_1>::operator()(bool bFatal) Line 1016 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12DynamicRHI::HandleFailedD3D12Result(HRESULT D3DResult, ID3D12Device * Device, bool bCreatingTextures, const wchar_t * Message) Line 1080 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!D3D12RHI::VerifyD3D12Result(HRESULT D3DResult, const char * Code, const char * Filename, unsigned int Line, ID3D12Device * Device, FString Message) Line 1089 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12CommandList::Close() Line 267 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12ContextCommon::CloseCommandList() Line 436 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12CommandContext::CloseCommandList() Line 450 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12BindlessResourceManager::FinalizeContext(FD3D12CommandContext & Context) Line 558 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12BindlessDescriptorManager::FinalizeContext(FD3D12CommandContext & Context) Line 841 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12CommandContext::Finalize(TArray<FD3D12Payload *,TSizedDefaultAllocator<32>> & OutPayloads) Line 516 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12DynamicRHI::RHIFinalizeContext::__l2::<lambda_1>::operator()(FD3D12CommandContext * CmdContext, FD3D12FinalizedCommands & Result) Line 227 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FD3D12DynamicRHI::RHIFinalizeContext(FDynamicRHI::FRHIFinalizeContextArgs && Args, TRHIPipelineArray<IRHIPlatformCommandList *> & Output) Line 256 C++
UnrealEditor-D3D12RHI-Win64-Debug.dll!FDynamicRHI::RHICloseTranslateChain(FDynamicRHI::FRHIFinalizeContextArgs && Args, TRHIPipelineArray<IRHIPlatformCommandList *> & Output, bool bShouldFinalize) Line 921 C++
UnrealEditor-RHI-Win64-Debug.dll!FRHICommandListExecutor::FTranslateState::Finalize::__l2::() Line 1150 C++
UnrealEditor-RHI-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<FRHICommandListExecutor::FTranslateState::Finalize'::2’::void (const TArray<FString,TSizedDefaultAllocator<32>> &, UWorld *, FOutputDevice &),void>::Call(void * Obj) Line 322 C++
UnrealEditor-RHI-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<0>,void __cdecl(void)>::operator()() Line 472 C++
UnrealEditor-RHI-Win64-Debug.dll!FRHICommandListExecutor::FTaskPipe::Execute(FRHICommandListExecutor::FTaskPipe::FTask * Task, const TRefCountPtr & CurrentEvent) Line 725 C++
UnrealEditor-RHI-Win64-Debug.dll!FRHICommandListExecutor::FTaskPipe::LaunchTask::__l2::(ENamedThreads::Type NamedThread, const TRefCountPtr & CurrentEvent) Line 598 C++
UnrealEditor-RHI-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<FRHICommandListExecutor::FTaskPipe::LaunchTask'::2’::void (const TArray<FString,TSizedDefaultAllocator<32>> &, UWorld *, FOutputDevice &),void,enum ENamedThreads::Type,TRefCountPtr const &>::Call(void * Obj, ENamedThreads::Type & <Params_0>, const TRefCountPtr & <Params_1>) Line 322 C++
UnrealEditor-RHI-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &)>::operator()(ENamedThreads::Type <Params_0>, const TRefCountPtr & <Params_1>) Line 472 C++
UnrealEditor-RHI-Win64-Debug.dll!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &),0>>::ExecuteTask() Line 706 C++
UnrealEditor-Core-Win64-Debug.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 527 C++
UnrealEditor-Core-Win64-Debug.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
UnrealEditor-Core-Win64-Debug.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 668 C++
UnrealEditor-Core-Win64-Debug.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 1429 C++
UnrealEditor-RenderCore-Win64-Debug.dll!FRHIThread::Run() Line 270 C++
UnrealEditor-Core-Win64-Debug.dll!FRunnableThreadWin::Run() Line 156 C++
UnrealEditor-Core-Win64-Debug.dll!FRunnableThreadWin::GuardedRun() Line 71 C++
UnrealEditor-Core-Win64-Debug.dll!FRunnableThreadWin::_ThreadProc(void * pThis) Line 39 C++
kernel32.dll!00007fff546d7374() Unknown
ntdll.dll!00007fff54ddcc91() Unknown

Log (with DEBUG_RESOURCE_STATES enabled):

[2025.09.05-14.32.15:025][321]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 34/35: InstanceCullingLoadBalancer.Batches 000001B5398FF8C0 (Sub: 4294967295), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE → D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE
[2025.09.05-14.32.15:025][321]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 35/35: InstanceCullingLoadBalancer.Items 000001B2DF859440 (Sub: 4294967295), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE → D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE
[2025.09.05-14.32.15:025][321]LogD3D12RHI: *** [tid:0000c41c] EXECUTE (CmdList: 000001B53BFA6B10) 1/1 ***
[2025.09.05-14.32.15:025][321]LogD3D12RHI: *** [tid:0000c41c] EXECUTE (CmdList: 000001B3F90C9750) 1/1 ***
[2025.09.05-14.32.15:026][321]LogD3D12RHI: *** [tid:0000c41c] EXECUTE (CmdList: 000001B53E731A30) 1/1 ***
[2025.09.05-14.32.15:030][322]LogD3D12RHI: *** [tid:0000c41c] EXECUTE (CmdList: 000001B53E731A30) 1/1 ***
[2025.09.05-14.32.15:031][322]LogD3D12RHI: *** [tid:0000c41c] EXECUTE (CmdList: 000001B53E731A30) 1/1 ***
[2025.09.05-14.32.15:031][322]LogD3D12RHI: *** [tid:0000c41c] EXECUTE (CmdList: 000001B3F90C9750) 1/1 ***
[2025.09.05-14.32.15:039][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 1/1: Bink:BMT_LoadingScreen 000001B584B03900 (Sub: 4294967295), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE → D3D12_RESOURCE_STATE_RENDER_TARGET
[2025.09.05-14.32.15:040][322]LogRHI: Error: Incompatible Transition State for Resource Bink:BMT_LoadingScreen - D3D12_RESOURCE_STATE_UNORDERED_ACCESS requires D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.

[2025.09.05-14.32.15:040][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 1/3: Bink:BMT_LoadingScreen 000001B584B03900 (Sub: 4294967295), D3D12_RESOURCE_STATE_RENDER_TARGET → D3D12_RESOURCE_STATE_UNORDERED_ACCESS
[2025.09.05-14.32.15:040][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 2/3: UAV Barrier Unknown Resource
[2025.09.05-14.32.15:040][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 3/3: Bink:BMT_LoadingScreen 000001B584B04290 (Sub: 4294967295), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE → D3D12_RESOURCE_STATE_RENDER_TARGET
Exception thrown at 0x00007FFF52595369 in UnrealEditor-Win64-Debug.exe: Microsoft C++ exception: _com_error at memory location 0x0000007ACA55AC70.
[2025.09.05-14.32.15:040][322]LogRHI: Error: Incompatible Transition State for Resource Bink:BMT_LoadingScreen - D3D12_RESOURCE_STATE_UNORDERED_ACCESS requires D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.

[2025.09.05-14.32.15:042][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 1/3: Bink:BMT_LoadingScreen 000001B584B04290 (Sub: 4294967295), D3D12_RESOURCE_STATE_RENDER_TARGET → D3D12_RESOURCE_STATE_UNORDERED_ACCESS
[2025.09.05-14.32.15:042][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 2/3: UAV Barrier Unknown Resource
[2025.09.05-14.32.15:042][322]LogD3D12RHI: *** BARRIER (CmdList: 000001B53E731A30, Queue: 3D) 3/3: BufferedRT 000001B323B74370 (Sub: 4294967295), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE → D3D12_RESOURCE_STATE_RENDER_TARGET
Exception thrown at 0x00007FFF52595369 in UnrealEditor-Win64-Debug.exe: Microsoft C++ exception: _com_error at memory location 0x0000007ACA55BFC0.
[2025.09.05-14.32.15:042][322]LogD3D12RHI: Error: hr failed
at C:\Project\Engine\Source\Runtime\D3D12RHI\Private\D3D12CommandList.cpp:266
with error E_INVALIDARG

Fatal error: [File:C:\Project\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp] [Line: 1015]
hr failed
at C:\Project\Engine\Source\Runtime\D3D12RHI\Private\D3D12CommandList.cpp:266
with error E_INVALIDARG

A breakpoint instruction (__debugbreak() statement or a similar call) was executed in UnrealEditor-Win64-Debug.exe.

For anyone who’s building the Engine from source, this appears to be fixable for the time being by specifying ETextureCreateFlags::UAV where the RHI Texture Creation Description is setup – which can be found under Engine\Plugins\BinkMedia\Source\BinkMediaPlayer\Private\Assets\BinkMediaTextureResource.cpp in FBinkMediaTextureResource::InitRHI on L44.

Currently:

const FRHITextureCreateDesc Desc =
		FRHITextureCreateDesc::Create2D(DebugName)
		.SetExtent(w, h)
		.SetFormat(PixelFormat)
		.SetFlags(TexCreateFlags | ETextureCreateFlags::RenderTargetable | ETextureCreateFlags::ShaderResource)
		.SetInitialState(ERHIAccess::SRVMask);

You can either set the UAV mask for TexCreateFlags prior to the construction of the FRHITextureCreateDesc or add it onto the SetFlags call after it’s been constructed along with the other flags being included there.

E.g.,:

const FRHITextureCreateDesc Desc =
		FRHITextureCreateDesc::Create2D(DebugName)
		.SetExtent(w, h)
		.SetFormat(PixelFormat)
		.SetFlags(TexCreateFlags | ETextureCreateFlags::RenderTargetable | ETextureCreateFlags::ShaderResource | ETextureCreateFlags::UAV)
		.SetInitialState(ERHIAccess::SRVMask);

There’s another thread with the same thing here:

Fix BinkMediaTextureResource command list crash on UE 5.6 - Development / Rendering - Epic Developer Community Forums

I’ve tested this on UE5.6 in the Editor and have also confirmed that the Bink Media Texture is working as expected when used for a material assigned to a cube in a packaged build after applying this Engine change. NOTE: I’ve only tested this with DX12.

Works, thanks. For those wondering, I found the file on Engine\Media\Plugins\BinkMedia\Source\BinkMediaPlayer\Private\Assets\BinkMediaTextureResource.cpp