Added member to C++ base class, editor can't start anymore

Hi!

I added a member to a C++ class which is a base class for some already existing blueprint classes. It compiles in visual studio but when I try to start the editor it stops working. In the C++ class which derives ACharacter, the following code was added:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Test)
TSubobjectPtr<ADecalActor> TestDecal;

I find the following message in the debugger output: “Cast of BaseUnit /Script/RTSGame.Default__BaseUnit to Level failed”, where BaseUnit is the name of my class. How can I fix this so that the editor starts again? Can’t you make changes to your base classes or is this some sort of a bug?

Call stack:

UE4Editor-Core.dll!FMsg::Logf__VA(const char * File, int Line, const FName & Category, ELogVerbosity::Type Verbosity, const wchar_t * Fmt, ...)
 	UE4Editor-CoreUObject.dll!CastLogError(const wchar_t * FromType, const wchar_t * ToType)
 	UE4Editor-Engine.dll!CastChecked<ULevel>(UObject * Src, ECastCheckedType::Type CheckType)
 	UE4Editor-Engine.dll!TActorIteratorBase<FActorFilter,FTickableLevelFilter>::operator++()
 	UE4Editor-Engine.dll!UWorld::UpdateCullDistanceVolumes()
 	UE4Editor-Engine.dll!UWorld::InitializeNewWorld(const UWorld::InitializationValues IVS)
 	UE4Editor-Engine.dll!UWorld::CreateWorld(const EWorldType::Type InWorldType, bool bInformEngineOfWorld, FName WorldName, UPackage * InWorldPackage, bool bAddToRoot)
 	UE4Editor-Engine.dll!UEngine::Init(IEngineLoop * InEngineLoop)
 	UE4Editor-UnrealEd.dll!UEditorEngine::InitEditor(IEngineLoop * InEngineLoop)
 	UE4Editor-UnrealEd.dll!UEditorEngine::Init(IEngineLoop * InEngineLoop)	
 	UE4Editor-UnrealEd.dll!UUnrealEdEngine::Init(IEngineLoop * InEngineLoop)
 	UE4Editor.exe!FEngineLoop::Init()
 	UE4Editor-UnrealEd.dll!EditorInit(IEngineLoop & EngineLoop)	
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow)
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow)

Which configuration did you build in Visual Studio? Development Editor?

I used an ADecalActor instead of an UDecalComponent. That seems to be the problem or at least now it starts again even though I don’t see anything. But that may be the current configuration.