x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

4.13+ Plugin custom Kismet BP Node: Standalone game crash

I have a custom UK2Node in a Plugin Editor-only Module. If I add the node to a BP, Play Standalone Game crashes.

Happens in 4.13 and 4.14, but not in 4.12 ! Also works fine in Simulate and Packaged.

AFAIK the custom node is expanded (as in ExpandNode is called), but the node is serialized in the compiled blueprint. So, when Standalone game loads the blueprint, the node fails to load (because it's an Editor-only class), then it crashes in a UEdGraphPin de-serialize because it seems there is still a node with a pin to my node (which is null now).

Here is a very small Plugin and steps to reproduce of the bug:

  • download the TestNodePlugin plugin

  • add the TestNodePlugin to a project

  • open a Level and its Level Blueprint

  • add the blueprint function "Test Node Plugin"

  • plug exec pin from "Begin Play" to "Test Node Plugin"

  • launch Standalone game

  • crash

Relevant logs when I launch Standalone Game:

 [  0]LogLinker:Warning: Can't find file '/Script/TestNodeEditorPlugin'
 [  0]LogUObjectGlobals:Warning: Failed to load '/Script/TestNodeEditorPlugin': Can't find file '/Script/TestNodeEditorPlugin'
 [  0]LogLinker:Warning: Can't find file for asset '/Script/TestNodeEditorPlugin' while loading NULL.
 ...
 [  0]LoadErrors: Info Failed to load /Script/TestNodeEditorPlugin.BPNode_TestNode Referenced by EventGraph
 ...
 Assertion failed: LocalOwningNode [File:D:\Build\++UE4+Release-4.13+Compile\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp] [Line: 1449] 
 ...
 UE4Editor.exe has triggered a breakpoint.

The asserts seems to happen when de-serializing the exec pin in the "Begin Play" node.

Everything seem legit, the only bug I see is that my "Test Node Plugin" function is serialized in the compiled blueprint instead if it being expanded and removed.

I cannot even workaround by putting my node in the "Game" Module, because UnrealHeaderTool wont see my #if WITH_EDITOR around the class, and does not know about UK2Node in Game build.

I still hope it's my fault, if not, it means I still don't have a workaround, and will need to wait for a fix in the Engine.

Also, any workaround ideas is welcome !

Edit: typo

Product Version: UE 4.14
Tags:
more ▼

asked Nov 21 '16 at 02:41 PM in C++ Programming

avatar image

Jo_PkFX
49 3 6 13

avatar image Jo_PkFX Nov 21 '16 at 06:15 PM

I just found a workaround: if I manually load my Editor module from my Game module, everything loads.

avatar image Begounet Nov 22 '16 at 09:18 AM

Just to be more accurate, the required code for this workaround is :

 class FMyGameModule : public FDefaultGameModuleImpl
 {
     virtual void StartupModule() override
     {
     #if WITH_EDITOR
             FModuleManager::Get().LoadModule("MyModuleEditorName");
         #endif // WITH_EDITOR
        }
 }


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Ok, so making the workaround the answer:

The problem finally seems to be since UE 4.13, standalone game does not load Editor modules, so it's not able to load my custom BP node.

So, the workaround is to manually load the Editor module from the Game module if WITH_EDITOR, (thanks Begounet:)

 class FMyGameModule : public IModuleInterface
 {
     virtual void StartupModule() override
     {
 #if WITH_EDITOR
         FModuleManager::Get().LoadModule("MyEditorModule");
 #endif // WITH_EDITOR
     }
 }

 

more ▼

answered Nov 22 '16 at 02:36 PM

avatar image

Jo_PkFX
49 3 6 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

in .uplugin file, change the module LoadingPhase to "PreDefault"

more ▼

answered Sep 28 '17 at 12:09 PM

avatar image

windywang
56 4 13 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question