#The Obvious Fact Should Not Be Ignored
The obvious facts here should not be ignored
- the same code that now crashes the engine worked in 4.3 and 4.4 and during the Beta
- One of the core engine classes, CanvasRenderTarget2D now crashes the engine when I try to run its very own static creation command, and there’s no indication that this cannot be done inside the game thread. And this code worked in 4.3 and 4.4 and when Tan created it!
#The Big Question Epic Needs To Answer
What has happened in 4.5 that is causing both FCanvas and CanvasRenderTarget2D to crash?
This engine code (less than 30 lines) now crashes the game, as does my code above which creates a new FCanvas
What is going on here? This is all happening in 4.5 only!
UCanvasRenderTarget2D* UCanvasRenderTarget2D::CreateCanvasRenderTarget2D(TSubclassOf<UCanvasRenderTarget2D> CanvasRenderTarget2DClass, int32 Width, int32 Height)
{
if (Width > 0 && Height > 0)
{
UCanvasRenderTarget2D* NewCanvasRenderTarget = ConstructObject<UCanvasRenderTarget2D>(CanvasRenderTarget2DClass, GetTransientPackage());
if (NewCanvasRenderTarget)
{
NewCanvasRenderTarget->InitAutoFormat(Width, Height);
return NewCanvasRenderTarget;
}
}
return nullptr;
}