Description

Implementing data validation via an Editor Utility Blueprint works fine in the editor, but when run via the commandlet, the blueprint won't load the editor utility subsystems (i.e. Static Mesh Editor Subsystem) and crashes during the call to GetEditorSubsystem if any of the blueprint nodes rely on them.

Steps to Reproduce
  1. Create an editor utility blueprint that use EditorValidatorBase as its parent class.
  2. Override the function CanValidate to return true in the commandlet use case.
  3. Override the function CanValidateAsset to return true when the asset can casted to an static mesh.
  4. Override the function ValidateLoadedAsset to validate something about the static mesh by using the StaticMeshEditorSubsystem. (For an example look at the attached image for an validator that check that all the meshes have more then one LOD)
  5. Save all and close the editor
  6. boot the editor with those commandline args: "Path\To\YourUproject.uproject" -run=datavalidation

 

Result: the editor utility validator doesn't compile and it isn't used to validate the static meshes in the project.

Expected: the validator is run against the static meshes and will report any static mesh that fail the validation.

Callstack
  1. FSubsystemCollectionBase::AddAndInitializeSubsystem(UClass *) SubsystemCollection.cpp:236
  2. FSubsystemCollectionBase::AddAllInstances(UClass *) SubsystemCollection.cpp:313
  3. FSubsystemModuleWatcher::AddClassesForModule(const FName &) SubsystemCollection.cpp:414
  4. FSubsystemModuleWatcher::OnModulesChanged(FName,EModuleChangeReason) SubsystemCollection.cpp:341
  5. UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int> >::ApplyAfter<void (_cdecl*const & __ptr64)(FName,EModuleChangeReason),FName & __ptr64,EModuleChangeReason & __ptr64>(void (_cdecl*const & __ptr64)(FName,EModuleChangeReason),FName & __ptr64,EModuleChangeReason & __ptr64)const __ptr64& Invoke.h:47
  6. TBaseStaticDelegateInstance<void (FName, EModuleChangeReason),FDefaultDelegateUserPolicy>::ExecuteIfSafe(FName,EModuleChangeReason) DelegateInstancesImpl.h:737
  7. TMulticastDelegateBase<FDefaultDelegateUserPolicy>::Broadcast<IBaseDelegateInstance<void (FName, EModuleChangeReason),FDefaultDelegateUserPolicy>,TDelegate<void (FName, EModuleChangeReason),FDefaultDelegateUserPolicy>,FName,EModuleChangeReason>(FName,EModuleChangeReason) MulticastDelegateBase.h:178
  8. [Inlined] TMulticastDelegate<void (FName, EModuleChangeReason),FDefaultDelegateUserPolicy>::Broadcast(FName,EModuleChangeReason) DelegateSignatureImpl.inl:975
  9. FModuleManager::LoadModuleWithFailureReason(FName,EModuleLoadResult &,ELoadModuleFlags) ModuleManager.cpp:623
  10. FModuleManager::LoadModule(FName,ELoadModuleFlags) ModuleManager.cpp:381
  11. UEditorEngine::Init(IEngineLoop *) EditorEngine.cpp:1166
  12. UUnrealEdEngine::Init(IEngineLoop *) UnrealEdEngine.cpp:89
  13. FEngineLoop::Init() LaunchEngineLoop.cpp:4326

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-191040 in the post.

0
Login to Vote

Fixed
ComponentUE - Editor - Content Pipeline
Affects Versions5.2
Target Fix5.4
Fix Commit27001970
Main Commit27002021
CreatedJul 24, 2023
ResolvedAug 11, 2023
UpdatedSep 7, 2023
View Jira Issue