[4.7p8 Crash]Object is not packaged: None None

I have add a class inherited from USceneComponent, the code was auto generated from UE4 editor:

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class MYPROJ_API UMySceneComponent : public USceneComponent

This class was created in constructor of another Actor:

AMyActor::AMyActor(const FObjectInitializer& ObjInit)
	: Super(ObjInit)
	PlacementNode = ObjInit.CreateDefaultSubobject<UMySceneComponent>(this, "PlacementNode ");

Once I changes some UCLASS attributes(such as add ShortTooltip), the UE4 editor will crash after I compile it:

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent, ShortTooltip = "blabla"))
class MYPROJ_API UMySceneComponent : public USceneComponent

Stack trace:

UE4Editor-CoreUObject.dll!StaticAllocateObjectErrorTests(UClass * InClass, UObject * InOuter, FName InName, EObjectFlags InFlags) line 1639	C++
UE4Editor-CoreUObject.dll!StaticAllocateObject(UClass * InClass, UObject * InOuter, FName InName, EObjectFlags InFlags, bool bCanRecycleSubobjects, bool * bOutRecycledSubobject) line 1688	C++
UE4Editor-CoreUObject.dll!UClass::CreateDefaultObject() line 2502	C++
UE4Editor-CoreUObject.dll!FObjectInitializer::CreateDefaultSubobject(UObject * Outer, FName SubobjectFName, UClass * ReturnType, UClass * ClassToCreateByDefault, bool bIsRequired, bool bAbstract, bool bIsTransient) line 2644	C++
UE4Editor-MyProj-7949.dll!AMyActor::AMyActor(const FObjectInitializer & ObjInit) line 18	C++
UE4Editor-CoreUObject.dll!StaticConstructObject(UClass * InClass, UObject * InOuter, FName InName, EObjectFlags InFlags, UObject * InTemplate, bool bCopyTransientsFromClassDefaults, FObjectInstancingGraph * InInstanceGraph) line 2232	C++
UE4Editor-CoreUObject.dll!UClass::HotReloadPrivateStaticClass(unsigned int InSize, unsigned int InClassFlags, unsigned __int64 InClassCastFlags, const wchar_t * InConfigName, void (const FObjectInitializer &) * InClassConstructor, void (UObject *, FReferenceCollector &) * InAddReferencedObjects, UClass * TClass_Super_StaticClass, UClass * TClass_WithinClass_StaticClass) line 3368	C++

Hey LewUniverse-

Is this crash happening when you compile the project in VS or when opening the project after compile? If you comment out/remove the PlacementNode assignment does the project still crash?

Additionally, could you send the log file from when the crash occurred to help us see what exactly is crashing? This file is located inside the Saved->Logs folder of the project directory.


This crash happening when I compile successful and hot reloaded by UE4 editor.
log&dump file:link text

link text

class AMyActor was extended with blueprint, I guess this may be the key

Hey LewUniverse-

I was able to recreate the hot reload crash and have reported it to our internal tracking database (UE-10111) for further investigation. Currently the best work around would be to compile from Visual Studio and then reopen the project.


Hi LewUniverse,

As a workaround you can wrap the constructor code in:

if (!HasAnyFlags(RF_TagGarbageTemp))
   // Your code goes here

The problem is we need to create a temporary dummy object to grab its vtable pointer but at the time it’s being created not all classes may be hot-reloaded.

We’re working on a better fix for this.