Creating a CanvasRenderTarget2D class in blueprints causes UE4.5 Preview editor to immediately crash. Tested on both Mac and Win8.1. Here is the report:
Access violation - code c0000005 (first/second chance not available)
I opened a new project and created a blueprint with CanvasRenderTarget2D as the parent class without any crash. I also tried creating a variable and set its type to class CanvasRenderTarget2D. Are either of these same process you used or are there other steps I’m missing. Any additional information you can provide will help narrow down the cause of this crash.
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.
I can create a blueprint with a CanvasRenderTarget2D parent and also create a variable as you have. The crash happens when I use the Create CanvasRenderTarget2D node in blueprints.
If I’m not wrong the “Create CanvasRenderTarget2D” node is the only way of using this functionality. It used to work in UE4.4 with occasional minor errors. I would be grateful if someone could have a look at this issue and maybe also give some info on how to properly use this class.
Could you explain the steps you take to set up the blueprint prior to the crash? Adding an image of your blueprint would also help in understanding how you are setting things up. It would also help if yo could add your logs from the crash. The “Editor Session Log” section of this link shows where they are in your project folder. A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums
I think the best way would be to explain how I got it working in UE4.4 and how it crashes in UE4.5.
In UE 4.4.3, I create a project based using the blueprint third person template (with the starter content).
First I create a folder named “CRT2D” (short for CanvasRenderTarget2D". Then I create the necessary assets in it:
-A blueprint named “MyCRT2D” with the parent class “CanvasRenderTarget2D”.
-A material named “MyMaterial” with a texture parameter named “DynamicTexture”.
-A font named “MyFont48” which is an Impact font with size 48.
I open the default MyCharacter blueprint and add a Static Mesh to it (Cube from the Shapes folder). Then I add an “Event Begin Play” node and wire it as shwon in the screenshot.
Then I open the MyCRT2D blueprint and arrange it to draw some text on the CanvasRenderTarget2D.
I took a screenshot to show that it works in the game.
I was able to reproduce this crash internally and have submitted it to our internal tracking system (TTP #349656). The crash seems to occur due to the values set in the Width and Height fields of the “Create Canvas Render Target 2D” node.
Thanks! I was suspecting that something was wrong with the dimension ints; if you type in zero for either value, it doesn’t crash; however it doesn’t create a CRT2D either. Anyways, I’m glad that it’ll be solved.
Hi there Doug Wilson, I don’t want to complain much because I love UE4 but this issue still persists in the latest build. I’m wondering if this is getting any priority at all. CanvasRenderTarget2D was a functional part of the engine until the 4.5 update and I know it didn’t get discontinued or anything as it’s still there. My project is basically rubbish without canvas render targets and I cannot fix the issue in C++. Can someone please spare some time and help me out?