Editor crashes on BP compilation after update to 4.17

Hi, after update to 4.17 editor started to crash on compiling our Pawn. Before, in 4.16 everything worked fine.

When opened in VS debug it seams like the crash is caused during serialization of our flashbang class.

If i use refresh all nodes on flashbang and grenadebase (which is superclass of flashbang) the crash still occurs, but now the object that is serialized during crash is one of weapons. If I also refresh all nodes on this weapon and its superclass, then I can compile our Pawn without crash and everything works fine, until I restart the editor. Then I have to refresh those blueprints again. I saved everything before shuting down the editor.

Is there some way to keep changes made by refreshing all nodes? Or maybe You could help me locate cause of the crash.

StackTrace:

LoginId:284b40d442fa5605528a4daa85b84d7b
EpicAccountId:d1477b212b234b08b3a58faa0849d094

Access violation - code c0000005 (first/second chance not available)

UE4Editor_CoreUObject!UObjectBase::IsValidLowLevelFast() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:294]
UE4Editor_Engine!FPersistentFrameCollectorArchive::operator<<() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\blueprintgeneratedclass.cpp:1444]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:835]
UE4Editor_Engine!UBlueprintGeneratedClass::AddReferencedObjectsInUbergraphFrame() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\blueprintgeneratedclass.cpp:1500]
UE4Editor_CoreUObject!FArchiveReplaceObjectRefBase::SerializeObject() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\coreuobject\private\serialization\archiveuobject.cpp:209]
UE4Editor_Engine!FArchiveReplaceObjectRef<UObject>::SerializeSearchObject() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\coreuobject\public\serialization\archivereplaceobjectref.h:129]
UE4Editor_Engine!UEngine::CopyPropertiesForUnrelatedObjects() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\unrealengine.cpp:11866]
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::CopyPropertiesForUnrelatedObjects() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:2159]
UE4Editor_Kismet!FBlueprintCompilationManagerImpl::ReinstanceBatch() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\blueprintcompilationmanager.cpp:1121]
UE4Editor_Kismet!FBlueprintCompilationManagerImpl::FlushCompilationQueueImpl() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\blueprintcompilationmanager.cpp:795]
UE4Editor_Kismet!FBlueprintCompilationManagerImpl::CompileSynchronouslyImpl() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\blueprintcompilationmanager.cpp:188]
UE4Editor_UnrealEd!FKismetEditorUtilities::CompileBlueprint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\unrealed\private\kismet2\kismet2.cpp:750]
UE4Editor_Kismet!FBlueprintEditor::Compile() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\blueprinteditor.cpp:3291]
UE4Editor_Kismet!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,TTypeWrapper<void> __cdecl(void)>::Execute() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_Kismet!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,void __cdecl(void)>::ExecuteIfSafe() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor_Slate!FUICommandList::ExecuteAction() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\commands\uicommandlist.cpp:97]
UE4Editor_Slate!SToolBarButtonBlock::OnClicked() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\multibox\stoolbarbuttonblock.cpp:305]
UE4Editor_Slate!TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void) __ptr64>::operator()<>() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\delegates\delegateinstanceinterface.h:165]
UE4Editor_Slate!UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int> >::ApplyAfter<TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void) __ptr64> >() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\templates\tuple.h:497]
UE4Editor_Slate!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,FReply __cdecl(void)>::Execute() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_Slate!TBaseDelegate<FReply>::Execute() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:537]
UE4Editor_Slate!SButton::OnMouseButtonUp() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\widgets\input\sbutton.cpp:282]
UE4Editor_Slate!<lambda_1002768c627006711ef2f351a87ec0e7>::operator()() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5199]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_1002768c627006711ef2f351a87ec0e7> >() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:232]
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5188]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5690]
UE4Editor_Slate!FSlateApplication::OnMouseUp() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5670]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:1718]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:2161]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:881]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:721]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:1009]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3151]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll

The Pawn blueprint that crashes on compile is marked as good to go

The flashbang is not referenced form Pawn. When I try to migrate Pawn, editor doesn’t put flashbang on the list

Screenshot from Visual Studio Debug when editor crashed. Flashbang have Default__ prefix, not sure what that prefix mean.

Hey dzarafata-

Are you referencing your grenadebase or weapon parent class in your pawn? If possible, could you provide the setup for / screenshots of your grenadebase / flashbang / weapon / pawn blueprints to help me recreate the setup you’re using locally?

Those marked with red are those that need to be refreshed before compilation of PlayerPawn. I wrote on every one if it’s referenced by PlayerPawn.

After removing flashbang an AK47 the crash happens during serialization/validation of SmokeGrenade which is also not referenced from PlayerPawn.
Also I found out that if I refresh only flashbang (without GrenadeBase and Pickable) editor is still crashing when trying to compile PlayerPawn during serialization/validation of default__flashbang_c

After more tests I found out that only Pickable and ShootingWeaponBase have to be refreshed to prevent crashes when compiling PlayerPawn.

Also there is weird thing (probably unrelated to this problem), that after compiling PlayerPawn I got 2 warnings that Pickable cannot be casted to two classes because they do not inherit from pickable, but actually they do. If I refresh cast nodes, problem disappear.

I’m consistently crashing in 4.17 if I compile blueprint on certain actors more than once or…
if I compile, save, then play in editor or…
if I compile, save, then save a map with the actor in it.

I’ve attached a crash report from the map save crash.

This is really making work difficult. Anyone know any work arounds?link text

One of the projects I updated to 4.17, started getting the blueprints crashing on compilation issue as well.

For me the problem was with an inherited interface reference.

The class with the compilation issue, was referenced by an interface, which was in turn used by another class, which was inherited from by a child class. This child class had no reference to the class with the compilation issue, other than through inheritance.

The reference chain looks like this:

Here is another diagram, showing the same reference chain:

To fix the issue, I overrode the interface function in the child class to return the inherited variable,
essentially re-implementing the function from the parent class in the child class.

As @dzarafata said above, recompiling the parent class will allow the class with the compilation issue to compile, but only during that editor session.

It would appear then that the reference is either not being created, or being optimized away in 4.17.

So @dzarafata, if you try creating a reference to the “Pawn” in “Flashbang”, it might fix your issue.

Hey Dorian000-

I apologize for the late reply, I have tried testing this issue again and have not yet been able to fin a reproduction for it. If possible, could you provide your project or a sample project showing this issue occurring for me to test directly? If you need to send your project privately, you can upload your project then send me a PM on the forums with a link to download it from. Additionally, as UEForge mentioned, are you using interfaces anywhere in the affected blueprints? If so, does their suggestion of adding a reference in Flashbang help? Let me know if you’re able to provide any additional information.

Unfortunately I cannot send the project files for NDA reasons but these blueprints definitely are using interfaces. I’ll try the workaround as described and reply back. Thanks!

Sorry about the delay, I haven’t been able to test the steps above yet but with the latest 4.17 update the crash no longer occurs. Resolved?

It stopped crashing after 4.17.2 update. Thanks a lot!