Hello, I’m using UE 5.3.2 and I’m experiencing an issue in which if you stop simulating (press ESC), while set a parameter of a dynamic material instance in event tick (or in a timeline, or quick timer), the engine crashes, here is the log (with symbols installed):
Hey there @RodrigoFMello11! Welcome to the community! It’s reproducible with only sprites it seems. Other materials don’t seem to cause it, and it’s still yet inconsistent with sprites. Looks like a bug, you can report those here:
Thanks, I’ve reported the bug. But since it is related to Paper2D I don’t expect it to be fixed any time soon. So if someone have a workaround I would be very thankful, as this issue is greatly slowing the development of my project
Have same issue. UE 5.3.2, Paper2D, Not the dymanic material instance but “Set material parameter” to change color of a Paper2D Sprite. Engine crash randomly after quitting PIE preview. seems it will crash when you quitting and a parameter changed in same tick.
Scratching my head for days and still have no solution. Dev guys should really fit some Paper2D bugs. Reported and waiting.
For me it just crash in engine, standalone or build game are stable without problem, But still very annoying at working.
There is no doubt that this is not the correct way to deal with it, but I have found a way to avoid it as a workaround, so I would like to share it with you.
Sorry for bringing this back up, but does anyone have any idea of how this might be resolved in Blueprints? Like OP, it seems to only have started occurring when I added an emissive color to a custom sprite material that is applied to a Paper2d sprite.
I’m so glad I found this forum post as I can at least disable the effect for now, but I would love to implement it back in if possible.
What is interesting is it would crash even if I didn’t trigger the emissive color.
Any suggestions on how I might be able to implement the same C++ workaround but in BP?
Hey there @8bitSami! Welcome to the community! Unfortunately this workaround is only viable using C++ as it would have to be injected into the base class itself.
Thanks, going to try it, although none of my class are C++ based, it is worth converting them to C++, since this problem is really slowing the development of the project. Hopefuly this will be solved in UE 5.4
Leaving this here so that poor souls like me who know nothing about C++ can implement the proposed workaround.
Huge Disclaimer: I know nothing about C++, so use it at your own risk.
Steps to implement proposed workaround:
Tools > New C++Class
Name it as SampleViewer (I chose this name because of proposed solution)
Use Actor Class as base
In SampleViewer.cpp,
4.1 Add #include "Materials/MaterialRenderProxy.h" below #include "SampleViewer.h"
4.2 Paste the rest of the code below BeginPlay()
4.3 Visual Studio will prompt you to create EndPlay() in SampleView.h. Use it.
4.4 Check out the screenshots if these are too confusing
Save
In Unreal Engine Editor, recompile
Create new Blueprint Class
7.1 Under ALL CLASSES, select newly created SampleViewer
7.2 Place it anywhere in the Editor
It seems to work fine so far, so kudos to the solution.