Pin named StructOut was serialized while trashed - requesting pin named StructRef owned by node

I’m trying to load a file (PlayerController) from a project I haven’t loaded in a long time.

It was ran on a source built version of 4.22 with some plugins.

Whenever I open/load the file, even right click it, the editor crashes:

Error: Assertion failed: false [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp] [Line: 1852] 
Error: Pin named StructOut was serialized while trashed - requesting pin named StructRef owned by node K2Node_SetFieldsInStruct_650

I tried:

  • To run it on the source built editor that it was originally ran on.

  • To run it on a regular 4.22 version.

  • To run it on a regular 4.24 version.

  • To load the file from backups of the project, even very old backups that I’m sure were working - are giving the same crash when I load the file.

Any idea how to fix this? Only reason I can think of is maybe some issue with the plugins like I downloaded the wrong version or something I don’t even know…

After many hours and sleepless nights, I have figured out the issue:
It was because I used the Discord Rich Presence plugin Discord provided on their github, and when I opened the project again after a long time I forget that I used that so the files weren’t there.

I found this out & fixed it (because I didn’t have the plugin’s files anymore) by:

  1. Installing the source built version of the editor (2.24)
  2. Went to the file in the crash and commented a bunch of checkf lines in that function (I believed those were causing the crash. (Then I built the engine again to apply the changes)
  3. Loaded the project and the file opened, I saw the errors of the missing nodes and deleted all of them, then I saved the file, closed the project, reverted the changes I did to the engine source and built it again, then reopened my project and everything is now working great!

This might be my fault but it’s still a bug that should be fixed by Epic Games. I will make a new post about it in the bug report section.

I started having the same error, but I did not even have any third-party plugins installed - the file I was working on just corrupted itself and for some reason the project had stopped saving backups of that file 8 hours ago! To cause this, the only ‘weird’ thing I could of is me changing USTRUCTs in C++ headers and building the project while I had a reference to them already in a BP (not sure if this is actually the cause though). This is still an issue even in 4.27.0:

Assertion failed: false [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/EdGraph/EdGraphPin.cpp] [Line: 1906] Pin named StructOut was serialized while trashed - requesting pin named StructRef owned by node K2Node_SetFieldsInStruct_0

Thanks for updating your question with the note about building the engine from source. I also managed to fix it by commenting out all checkf and check calls in EdGraphPin.cpp and then building it.
I couldn’t delete the broken block, however, because then the editor would crash with a nondescript “Fatal Error” - but I could copy all other blocks in that function to a new one, delete the function with the broken block and then fix up the broken references to the deleted function. What a ridiculous workflow, but at least ~9 hours of work wasn’t just gone.

Glad you managed to fix your issue and happy I was able to help! :slight_smile:

I know this is an old question, but it’s the first one that pops up on Google, so I figured I’d throw my two cents in. I got this same error after changing a type on a USTRUCT’s UPROPERTY. Every time I change a struct’s signature, I like to close the engine and reopen it as I’ve had many headaches with structs and hot reloads, but this time, I got this same error. Initially I was going to do the same thing pointed out in the accepted answer and edit out the checkf’s in the EdGraphPin file, but there’s an easier way.

If you run your project from VS in the local debugger, you can open your file causing the issue, trigger the breakpoint, and then just keep clicking Step Out in VS over and over and over until finally, your file opens in UE and shows you all of the broken nodes. I ended up making comments where each one was, deleting them all, compiling the blueprint, and saving, followed by closing and reopening Unreal, and the file opened correctly. I was then able to re-add all of the nodes I deleted.

I wholeheartedly concur that while it was my fault that this broke, it is quite ridiculous that this bricks the file. If you aren’t really good about your source control, you can lose mountains of work to issues like this. Blueprints are such a great tool, but I have nightmares about issues like this.

1 Like