Skip to content

Crashes in FVideoCallbackHandler::SampleCB when stopping the game #2

@fungiboletus

Description

@fungiboletus

Hei,

I'm using your plugin with Unreal 4.15 and it works very well most of the time. Sometimes it crashes after I stop the game from the editor, and the call stack says it comes from the ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER block in FVideoCallbackHandler::SampleCB.

My guess is that this block is sometimes executed after the games stops, and the code is accessing deallocated memory. Could you suggest a small fix ?

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

UE4Editor_Webcamera!FTexture2DResource::GetTexture2DRHI() [c:\program files\epic games\ue_4.15\engine\source\runtime\engine\public\textureresource.h:276]
UE4Editor_Webcamera!`FVideoCallbackHandler::SampleCB'::`8'::EURCMacro_UpdateTextureRegionsData::DoTask() [v:\project\plugins\webcamera\source\private\videocallbackhandler.cpp:74]
UE4Editor_Webcamera!TGraphTask<`FVideoCallbackHandler::SampleCB'::`8'::EURCMacro_UpdateTextureRegionsData>::ExecuteTask() [c:\program files\epic games\ue_4.15\engine\source\runtime\core\public\async\taskgraphinterfaces.h:883]
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions