0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EditorOnlyのBlueprintノードをランタイムで使うとパッケージした時に死ぬので注意

Posted at

#突然の死

BPのVM実行部でいきなりヌルポで死ぬことはあまりないと経験上感じるのですが
↓こんな感じでパッケージゲーム実行中にブループリントの関数呼び出しで突然ヌルポで死ぬ場合
はWITH_EDITORのブループリントノードを使ってないか疑ってみると解決するかもです。

自分の場合は SetActorLabel を使っていた所があってこのバグに引っかかりました。
UE4Editorの -game や -server を使ったテストだと発生せずにパッケージ環境のみでクラッシュするのが割と熱いです。
Cookもノーエラーで通過してしまいます。

まぁデバッガ刺せばすぐわかるのですが。

LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000090

0x00000000067dbd16 GameServer!UObject::CallFunction(FFrame&, void*, UFunction*) [C:/perforce/MyGame/Engine/Source/Runtime/Core/Public/Stats/Stats2.h:765]
0x00000000067e6929 GameServer!UObject::ProcessContextOpcode(FFrame&, void*, bool) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:2327]
0x00000000067dd9e9 GameServer!UObject::ProcessInternal(UObject*, FFrame&, void*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:1058]
0x00000000067dca48 GameServer!UObject::CallFunction(FFrame&, void*, UFunction*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:937]
0x00000000067dd9e9 GameServer!UObject::ProcessInternal(UObject*, FFrame&, void*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:1058]
0x00000000067dca48 GameServer!UObject::CallFunction(FFrame&, void*, UFunction*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:937]
0x00000000067dd9e9 GameServer!UObject::ProcessInternal(UObject*, FFrame&, void*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:1058]
0x0000000006664cac GameServer!UFunction::Invoke(UObject*, FFrame&, void*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/Class.cpp:4861]
0x00000000067e02d0 GameServer!UObject::ProcessEvent(UFunction*, void*) [C:/perforce/MyGame/Engine/Source/Runtime/CoreUObject/Private/UObject/ScriptCore.cpp:1478]
Actor.h
#if WITH_EDITOR <----------
	// Editor specific
...
	UFUNCTION(BlueprintCallable, Category = "Editor Scripting | Actor Editing")
	void SetActorLabel( const FString& NewActorLabel, bool bMarkDirty = true );
...
	/** Returns a custom brush icon name to use in place of the automatic class icon where actors are represented via 2d icons in the editor (e.g scene outliner and menus) */
	virtual FName GetCustomIconName() const { return NAME_None; }
#endif		// WITH_EDITOR

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?