MothCocoon / FlowGraph

Design-agnostic node system for scripting game’s flow in Unreal Engine

Home Page:https://discord.gg/Xmtr6GhbmW

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nodes with Context Pins, loose ALL pins on CTRL+Z / can lead to crash

soraphis opened this issue · comments

Reproduction:

  • Create "Play Level Sequence" Node
  • Assign any "LevelSequence"
  • press CTRL+Z

Result:

image

My guess is that there is no "OnReconstructionRequested.ExecuteIfBound()" call for Undo!?

To make it crash the editor:

Reproduction:

  • Create "Play Level Sequence" Node
  • Create Sequence Node
  • Bind Level Sequence Outputs to Sequence Node input
  • Assign any "LevelSequence"
  • press CTRL+Z
  • press CTRL+Y --> Crash

Thanks for a precise repro :)

I kinda managed to fix the first problem, pins won't disappear if I would call pin reconstruction from PostEditUndo. Sadly, it's not enough to fix a crash. More time is needed to dig into the scheme of transactions here.

This is what I have locally.

void UFlowNode::PostEditUndo()
{
	UObject::PostEditUndo();

	// rebuild context pins on Undo any of node properties
	if (SupportsContextPins())
	{
		OnReconstructionRequested.ExecuteIfBound();
	}
}

Fixed by a pull request :)
#189