[CRASH] Create Canvas Render Target 2D fails

Can confirm, crashes for me too. http://i.imgur.com/Egz5Tpo.png Note, in the screenshot I forgot to set the class, but it crashes even when set correct.y

Hello!

In version 4.6.1, the node ‘Create Canvas Render Target 2D’ does not work; the editor will immediately crash on use (easy to reproduce, 100% repro rate).

Quick debugging shows the texture has been created correctly, but it fails to create the accompanying canvas, getting a null pointer from somewhere else in the engine. The root cause is this function call in void UCanvasRenderTarget2D::UpdateResource():

// Create the FCanvas which does the actual rendering.
	FCanvas RenderCanvas(GameThread_GetRenderTargetResource(), nullptr, FApp::GetCurrentTime() - GStartTime, FApp::GetDeltaTime(), FApp::GetCurrentTime() - GStartTime, GetWorld()->FeatureLevel);

https://github.com/EpicGames/UnrealEngine/commit/8d9bed75d9ab3c6fc2015843ebeb7cfc875825e4

Fixed on git.

Thanks! I’ll check that out now and let you know how I get on :slight_smile:

Yep, this did the trick. Thanks!