Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreal Editor Crashing due to custom node #169

Closed
soraphis opened this issue Jul 20, 2023 · 4 comments
Closed

Unreal Editor Crashing due to custom node #169

soraphis opened this issue Jul 20, 2023 · 4 comments
Assignees
Labels
bug fix Something isn't working

Comments

@soraphis
Copy link
Contributor

soraphis commented Jul 20, 2023

I can create a new flow graph, add my node and run the game. First it works, but after restarting the editor and running again, it crashes.

When I restart the editor, and try to open the flow graph I get this stacktrace:


>    UnrealEditor-FlowEditor-Win64-DebugGame.dll!SFlowGraphEditor::Construct(const SFlowGraphEditor::FArguments & InArgs, const TSharedPtr<FFlowAssetEditor,1> InAssetEditor) Line 44    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!RequiredArgs::T1RequiredArgs<TSharedRef<FFlowAssetEditor,1> &&>::CallConstruct<SFlowGraphEditor>(const TSharedRef<SFlowGraphEditor,1> & OnWidget, const SFlowGraphEditor::FArguments & WithNamedArgs) Line 749    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!TSlateDecl<SFlowGraphEditor,RequiredArgs::T1RequiredArgs<TSharedRef<FFlowAssetEditor,1> &&>>::operator<<=(const SFlowGraphEditor::FArguments & InArgs) Line 971    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!FFlowAssetEditor::CreateGraphWidget() Line 497    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!FFlowAssetEditor::CreateWidgets() Line 471    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!FFlowAssetEditor::InitFlowAssetEditor(const EToolkitMode::Type Mode, const TSharedPtr<IToolkitHost,1> & InitToolkitHost, UObject * ObjectToEdit) Line 292    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!FFlowEditorModule::CreateFlowAssetEditor(const EToolkitMode::Type Mode, const TSharedPtr<IToolkitHost,1> & InitToolkitHost, UFlowAsset * FlowAsset) Line 246    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!FAssetTypeActions_FlowAsset::OpenAssetEditor(const TArray<UObject *,TSizedDefaultAllocator<32>> & InObjects, TSharedPtr<IToolkitHost,1> EditWithinLevelEditor) Line 38    C++
     UnrealEditor-FlowEditor-Win64-DebugGame.dll!FAssetTypeActions_Base::OpenAssetEditor(const TArray<UObject *,TSizedDefaultAllocator<32>> & InObjects, const EAssetTypeActivationOpenedMethod OpenedMethod, TSharedPtr<IToolkitHost,1> EditWithinLevelEditor) Line 43    C++

I've already commented out everything the custom node does, it only has 3 output pins, 2 input pins. and has a TSoftObjectPtr to one of my custom asset types.

but still, hitting play or opening the node graph will crash the editor. (due to an access violation)

I commented out everything, and created a new graph. that works without crahes. then I've added ExecuteInput back in triggering one output, that already leads to the crashes, and when trying to open the graph it also crashes with above error. I don't realy get it, because the node does basically nothing and everything was commented out...

FlowGraph is on a FlowComponent on the PlayerCharacter

EDIT:

okay, I now have 2 flow graphs. both contain only my node and a log afterwards.

  • I assign flow1 and hit play -> it works. I try to open flow1 -> it works, I try to open flow2 -> it crashes.
  • I restart the editor
  • I assign flow2 and hit play -> it works. I try to open flow2 -> it works, I try to open flow1 -> it crashes.

it's always the last executed graph, that crashes.

@soraphis
Copy link
Contributor Author

@MothDoctor MothDoctor self-assigned this Jul 23, 2023
@MothDoctor MothDoctor added the bug fix Something isn't working label Jul 23, 2023
@MothDoctor
Copy link
Contributor

I'm puzzled here. Flow Asset has to have a Graph object. It's being created while creating a new UFlowAsset object.

Could you check if you don't have any custom logic that might skip this call? Or perhaps the problem might be the result of merging plugin updates?
image

If your code is all fine, I'd need to get some minimal testing project. As I don't know how to reproduce it otherwise.

@soraphis
Copy link
Contributor Author

It confused me aswell. Project of a colleague, when he send the project files to me, I could reproduce it on my machine.

In the end, he created a new class and basically replicated everything he did and now it's working for him, which feels strange to me, because we create a lot of flow graphs to make sure it's not the asset which got corrupted.

Need to see, how much of the project can be shared, though. I first thought it was because of the code. In the Initialize method the node was searching for a subsystem i think and kept a reference on that. but we later removed that part and commented out more and more stuff.

Will try to provide more info in the coming days

@MothDoctor
Copy link
Contributor

Closing this for now. We could reopen it, if you'd find a repro :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants