Author Topic: "CreateGraphInstance" within ConstructionScript causes engine to crash.  (Read 1378 times)

Hi there!

loading a level after creating GraphInstance in construction script causes engine to crash in my end.
Am I supposed not to use "Create Graph Instance" node within construction script?

I think it'd be very nice if rendering results from dynamic instances are available in the editor.

below is the actual log.

Quote
Fatal error: [File:D:\depot\UE4\4.18c\Engine\Source\Editor\UnrealEd\Private\EditorServer.cpp] [Line: 1929] /Game/Jan/Subst/LVL.LVL still around trying to load ../../../../Projects/_Users/oda/SbCpp/Content/Jan/Subst/LVL.umap (Object is not currently rooted)

UE4Editor_Core!FDebug::AssertFailed() [d:\depot\ue4\4.18c\engine\source\runtime\core\private\misc\assertionmacros.cpp:414]
UE4Editor_UnrealEd!UEditorEngine::CheckForWorldGCLeaks() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\editorserver.cpp:1929]
UE4Editor_UnrealEd!UEditorEngine::EditorDestroyWorld() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\editorserver.cpp:2060]
UE4Editor_UnrealEd!UEditorEngine::Map_Load() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\editorserver.cpp:2412]
UE4Editor_UnrealEd!UEditorEngine::HandleMapCommand() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\editorserver.cpp:5968]
UE4Editor_UnrealEd!UEditorEngine::Exec() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\editorserver.cpp:5445]
UE4Editor_UnrealEd!UUnrealEdEngine::Exec() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\unrealedsrv.cpp:672]
UE4Editor_UnrealEd!FEditorFileUtils::LoadMap() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\filehelpers.cpp:2229]
UE4Editor_AssetTools!FAssetTypeActions_World::OpenAssetEditor() [d:\depot\ue4\4.18c\engine\source\developer\assettools\private\assettypeactions\assettypeactions_world.cpp:26]
UE4Editor_UnrealEd!FAssetEditorManager::OpenEditorForAsset() [d:\depot\ue4\4.18c\engine\source\editor\unrealed\private\toolkits\asseteditormanager.cpp:361]
UE4Editor_AssetTools!FAssetTypeActions_Base::AssetsActivated() [d:\depot\ue4\4.18c\engine\source\developer\assettools\public\assettypeactions_base.h:50]
UE4Editor_ContentBrowser!SContentBrowser::OnAssetsActivated() [d:\depot\ue4\4.18c\engine\source\editor\contentbrowser\private\scontentbrowser.cpp:1942]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,TTypeWrapper<void> __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::Execute() [d:\depot\ue4\4.18c\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,void __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::ExecuteIfSafe() [d:\depot\ue4\4.18c\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor_ContentBrowser!SAssetView::OnListMouseButtonDoubleClick() [d:\depot\ue4\4.18c\engine\source\editor\contentbrowser\private\sassetview.cpp:3904]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper<void> __cdecl(TSharedPtr<FAssetViewItem,0>)>::Execute() [d:\depot\ue4\4.18c\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0>)>::ExecuteIfSafe() [d:\depot\ue4\4.18c\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor_ContentBrowser!TBaseDelegate<void,TSharedPtr<FAssetViewItem,0> >::ExecuteIfBound() [d:\depot\ue4\4.18c\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:624]
UE4Editor_ContentBrowser!SListView<TSharedPtr<FAssetViewItem,0> >::Private_OnItemDoubleClicked() [d:\depot\ue4\4.18c\engine\source\runtime\slate\public\widgets\views\slistview.h:805]
UE4Editor_ContentBrowser!STableRow<TSharedPtr<FAssetViewItem,0> >::OnMouseButtonDoubleClick() [d:\depot\ue4\4.18c\engine\source\runtime\slate\public\widgets\views\stablerow.h:288]
UE4Editor_Slate!<lambda_eeb33fd1b480e3cad58a1531d90d2e14>::operator()() [d:\depot\ue4\4.18c\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5695]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_eeb33fd1b480e3cad58a1531d90d2e14> >() [d:\depot\ue4\4.18c\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:234]
UE4Editor_Slate!FSlateApplication::RoutePointerDoubleClickEvent() [d:\depot\ue4\4.18c\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5693]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonDoubleClickEvent() [d:\depot\ue4\4.18c\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5680]
UE4Editor_Slate!FSlateApplication::OnMouseDoubleClick() [d:\depot\ue4\4.18c\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5656]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [d:\depot\ue4\4.18c\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:1729]
UE4Editor_ApplicationCore!FWindowsApplication::DeferMessage() [d:\depot\ue4\4.18c\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:2171]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessMessage() [d:\depot\ue4\4.18c\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:888]
UE4Editor_ApplicationCore!FWindowsApplication::AppWndProc() [d:\depot\ue4\4.18c\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:725]
user32
user32
UE4Editor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [d:\depot\ue4\4.18c\engine\source\runtime\applicationcore\private\windows\windowsplatformapplicationmisc.cpp:129]
UE4Editor!FEngineLoop::Tick() [d:\depot\ue4\4.18c\engine\source\runtime\launch\private\launchengineloop.cpp:3220]
UE4Editor!GuardedMain() [d:\depot\ue4\4.18c\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\depot\ue4\4.18c\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\depot\ue4\4.18c\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
Last Edit: January 31, 2018, 06:10:56 am

Hi @ryod,
I will add a ticket in for this. In the meantime, creating instances within the editor can be done by using the following steps:
-Within the content browser, find the SubstanceInstanceFactory you wish to create an instance from.
-Right-click on the instance factory and mouse over the menu option 'create a graph instance'.
-Select which graph within the list that you wish to create a graph instance of.

This will create a graph instance similar to which is created when first importing a Substance.

Let us know if this helps!

Cheers  :D
Software Engineer, Integrations
daniel.stover@allegorithmic.com

Thank you so mush for your reply!

A reason I'd like to create graph instance within construction script is, I want some of my actors to have different look.
Example below might show what I am trying to do better.

Currently I'm creating GraphInstance, setting values from actor, and rendering textures on event BeginPlay.
But in this approach, I have to run the game every time to see the material outcomes.

Since I would need hundreds of them, I would like to create instances and materials dynamically, as managing all the statically created graph instances would be a hard job.

So I'm looking forward to this gets fixed :)

Thank you again for your advise!