[Bug] Switching between videos of different resolution in MediaFramework

I am using UMediaPlayer::OpenUrl(url) to load videos in a video Player I created but switching between video of varying resolution say one video is 1280x720 other is 1280x600 application crashes

//Code use to create media player and add its video as a texture to a dynamci material
m_mediaPlayer = static_cast(StaticConstructObject(UMediaPlayer::StaticClass()));
	//add mediaplayer to  media texture
	m_mediaTexture = static_cast<UMediaTexture*>(StaticConstructObject(UMediaTexture::StaticClass()));

	//add  media texture to  mesh
	UStaticMeshComponent * mesh = m_videoFrame->StaticMeshComponent;
	UMaterialInstanceDynamic  * material = mesh->CreateDynamicMaterialInstance(0);
	material->SetTextureParameterValue("Video", m_mediaTexture);
	mesh->SetMaterial(0, material);

    //I call this whenever I need  video to be changed

Do you have a callstack for crash?

sorry for delayed reply.

msvcr120.dll!00007ffaaf49c3f9()	Unknown
0000004f2e7dabf8()	Unknown
000000000118c300()	Unknown

JewellerySC_client.exe!FMediaTextureResource::UpdateDeferredResource(FRHICommandListImmediate & RHICmdList, bool bClearRenderTarget) Line 102 C++
JewellerySC_client.exe!FDeferredUpdateResource::UpdateResources(FRHICommandListImmediate & RHICmdList) Line 127 C++
JewellerySC_client.exe!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 983 C++
JewellerySC_client.exe!TGraphTask<FRendererModule::BeginRenderingViewFamily'::11’::EURCMacro_FDrawSceneCommand>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 665 C++
JewellerySC_client.exe!FTaskThread::ProcessTasks(int QueueIndex, bool bAllowStall) Line 338 C++
JewellerySC_client.exe!FTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 177 C++
JewellerySC_client.exe!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 268 C++
JewellerySC_client.exe!FRenderingThread::Run() Line 387 C++
JewellerySC_client.exe!FRunnableThreadWin::Run() Line 73 C++
JewellerySC_client.exe!FRunnableThreadWin::GuardedRun() Line 48 C++
[External Code]

Hey -

Are you still experiencing this crash? If so could you include log files from crash as well? Looking at them will give an idea of where in code crash is occurring. Logs folder is inside Project Folder → Saved folder.


Sorry, this one fell through cracks. Are you still having this issue? Could you make affected videos available, so we can test locally? Thanks!

hi gmpreussner,

Sorry for such a late reply. We didn’t have problem afterwards.But I went back to check with video I was using to test this issue and it seems to be a problem with that particular format or something. I have attached to videos if you want to test it. crash happens when switching from .wmv to .mp4 then back to .wmv .
[1]: 39085-movies. (3.54 MB)

We are experiencing it too.

UE 4.7.6; stack trace from a shipping build is:

Access violation - code c0000005 (first/second chance not available)

msvcr120 + 61964 bytes
VRPlayer_Win32_Shipping!FMediaTextureResource::UpdateDeferredResource() + 186 bytes
ntdll + 529875 bytes
VRPlayer_Win32_Shipping!FRelevancePacket::RenderThreadFinalize() + 635 bytes
VRPlayer_Win32_Shipping!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`8'::EURCMacro_FDrawSceneCommand>::ExecuteTask() + 18 bytes
VRPlayer_Win32_Shipping!FTaskThread::ProcessTasks() + 1682 bytes
VRPlayer_Win32_Shipping!FTaskThread::ProcessTasksUntilQuit() + 42 bytes
VRPlayer_Win32_Shipping!RenderingThreadMain() + 74 bytes
VRPlayer_Win32_Shipping!FRenderingThread::Run() + 66 bytes
VRPlayer_Win32_Shipping!FRunnableThreadWin::Run() + 33 bytes
VRPlayer_Win32_Shipping!FRunnableThreadWin::GuardedRun() + 97 bytes
VRPlayer_Win32_Shipping!FRunnableThreadWin::_ThreadProc() + 9 bytes
kernel32 + 97284 bytes
ntdll + 371999 bytes
ntdll + 371946 bytes

Hi ,

Are you still experiencing this issue? If so, could you provide affected videos so we can test here? Thanks!

Hey -

We’ve not heard from you in a few days. If you’re still having any issues related to this post then feel free to post a comment responding to 's question.