In my simple 2D game the playable character blueprint consists of an idle animation flipbook and a camera. When the player presses A or D keys, that idle animation flipbook is switched to running animation flipbook via Set Flipbook. When that pressed key is released, idle flipbook replaces the running one, which is also done via Set Flipbook This algorithm worked just fine in 4.1.1, but when I reproduce it in 4.2.1 and try playing the game inside the editor, it crashes. What causes this?
EDIT: this is what I get when UE crashes
!Id:ff492282b3513e0a5ea92a73e57c4262
Unknown exception - code 00000001 (first/second chance not available)
most of the 2d was broken in 4.2.0
The did put a hot-fix 4.2.1, but I did not try it. In fact I don’t believe in hot-fix, as it is stuff made in hurry to fix a situation so, it may still fails
My advice if you are working in 2d stay with 4.1.1 for now. otherwise, fire you engines to 4.2.1 and enjoy all it’s awesome stuff
I figured out what causes UE to crash. One loop of the flipbook you’re switching to should last at least one second (like, if you have a 15 fps flipbook, all of the “pieces” of your flipbook together should last at least 15 frames).
Animations that lasted shorter than 1 second used to work just fine in 4.1, so I don’t know whether it’s intended in this version or it’s a bug. But anyway, if you need to fix this crash, just fiddle with your flipbooks so they match this requirement.
If UE still crashes, I would recommend you to also check parts of your blueprint that describe character rotation, in case you use that. You might’ve accidentally set it to the wrong axis or something like that.
P.S.: If this one second “requirement” was a deliberate one, I guess this question might be tagged as solved.
I tried that but unfortunately got the same crash.
I went to line 87 in PaperAnimatedRenderComponent.cpp to comment out the call to MarkRenderDynamicDataDirty. Don’t know exactly what it the repercussions will be but it works for now with my small tests.
it seems to work if you set the total duration of frames (from all images used in the flipbook) of the flipbook you are switching to, to exactly the number of frames per second. It’s far from a perfect solution, but it’s a temporary fix to use until Epic hopefully fixes the crash in a future update. (ie: if your frames per second is set to 24, then have a frame count of 24)