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"

Subclass of UHierarchicalInstancedStaticMeshComponent causes crash on Hot-Reload

Engine version: 4.15.2

Steps to reproduce:

  1. Create Basic code c++ project

  2. Add c++ subclass of UHierarchicalInstancedStaticMeshComponent

  3. Add property to your GameModeBase class (or any other class, but not to hierarchical instanced mesh subclass we created in step 2 ), this is just to trigger hot reload:

    public: UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 TestProperty;

4 Compile project in editor

5 Crash:

 Assertion failed: IsValid() [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\Core\Public\Templates/SharedPointer.h] [Line: 826] 
 
 UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
 UE4Editor_Engine!UHierarchicalInstancedStaticMeshComponent::Serialize() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\hierarchicalinstancedstaticmesh.cpp:1796]
 UE4Editor_CoreUObject!FFindReferencersArchive::ResetPotentialReferencer() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\serialization\findreferencersarchive.cpp:90]
 UE4Editor_UnrealEd!TFindObjectReferencers<UObject>::TFindObjectReferencers<UObject>() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\public\serialization\findobjectreferencers.h:49]
 UE4Editor_UnrealEd!FReplaceReferenceHelper::FindAndReplaceReferences() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:81]
 UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReplaceInstancesOfClass_Inner() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:1937]
 UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReplaceInstancesOfClass() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:1476]
 UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReinstanceInner() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:682]
 UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReinstanceObjects() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:913]
 UE4Editor_HotReload!FHotReloadModule::ReinstanceClass() [d:\build\++ue4+release-4.15+compile\sync\engine\source\developer\hotreload\private\hotreload.cpp:1271]
 UE4Editor_HotReload!FHotReloadModule::ReinstanceClasses() [d:\build\++ue4+release-4.15+compile\sync\engine\source\developer\hotreload\private\hotreload.cpp:1254]
 UE4Editor_HotReload!TBaseRawMethodDelegateInstance<0,FHotReloadModule,void __cdecl(void)>::ExecuteIfSafe() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:648]
 UE4Editor_CoreUObject!TBaseMulticastDelegate<void>::Broadcast() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
 UE4Editor_CoreUObject!UClassReplaceHotReloadClasses() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:720]
 UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:858]
 UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:1027]
 UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
 UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:471]
 UE4Editor_Core!FModuleManager::LoadModule() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:330]
 UE4Editor_HotReload!FHotReloadModule::DoHotReloadInternal() [d:\build\++ue4+release-4.15+compile\sync\engine\source\developer\hotreload\private\hotreload.cpp:856]
 UE4Editor_HotReload!UE4Function_Private::TFunctionRefCaller<<lambda_845f9b2944b03bbc30be1e1f4a8d7f4b>,void __cdecl(TMap<FString,FString,FDefaultSetAllocator,TDefaultMapKeyFuncs<FString,FString,0> > const & __ptr64,bool,enum ECompilationResult::Type)>::Call() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\templates\function.h:245]
 UE4Editor_HotReload!FHotReloadModule::CheckForFinishedModuleDLLCompile() [d:\build\++ue4+release-4.15+compile\sync\engine\source\developer\hotreload\private\hotreload.cpp:1916]
 UE4Editor_HotReload!FHotReloadModule::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\developer\hotreload\private\hotreload.cpp:594]
 UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1236]
 UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:391]
 UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3025]
 UE4Editor!GuardedMain() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
 UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
 UE4Editor!WinMain() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
 UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
 kernel32
Product Version: UE 4.15
Tags:
more ▼

asked May 12 '17 at 11:00 AM in Bug Reports

avatar image

Serr72
36 1 2 6

avatar image Erk_Krea Nov 04 '18 at 08:08 PM

4.19.2 this bug happens to me too. It crashes when I compile from editor, then if I restart the editor and compile again it works fine...unfortunately this is a routine that I have to do every single time I want to compile from editor (crash, restart and compile)

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

2 answers: sort voted first

Hey Serr72-

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here https://issues.unrealengine.com/issue/UE-45028 . You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

Doug Wilson

more ▼

answered May 15 '17 at 06:17 PM

avatar image Serr72 May 16 '17 at 02:08 AM

Alright, thank you for your response. Probably worth mentioning that because of this bug you can't use hot reload if you have custom c++ Foliage Component (as UFoliageInstancedStaticMeshComponent is subclass of HISM Component)

avatar image VSZ Aug 11 '17 at 01:03 PM

Hi Doug, my project has started running into this issue as well and it's hampering productivity quite a bit as I essentially can't hot-reload anymore.

Hoping that community interest on this can be bumped up. I see that UE-35710 has been backlogged while UE-45028 is still open; hopeful that one of those will be taken up.

Some additional info: I've used custom HISMs for a very long time now but never had this issue until recently. If I mange to figure out what triggered this issue I'll post back with a comment.

avatar image Doug E ♦♦ STAFF Aug 11 '17 at 02:16 PM

Hey VSZ-

I have updated UE-45028 to indicate this is still affecting the community and that it still occurs in 4.17 as well.

avatar image VSZ Aug 13 '17 at 07:07 AM

I found a workaround which I quickly wanted to share!

I migrated my HISM subclass to a separate gameplay module and now refer that module from by primary game module's Build.cs. With this setup I can hotreload again, which is a big relief.

If you're new to setting up gameplay modules check out this doc and/or use any of Epic's modules or a simple plugin module as reference.

Hope this tidbit helps someone in the same situation :)

avatar image Rainbow.Warrior Apr 20 '18 at 10:32 AM

Issue still occurs in 4.19 ... Dear Unreal, plz fix.

I tried VSZ's fix, and it still seems to crash :unamused:

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

I ran into this in UE 4.20.

It looks like the bug is that, when scanning for references after hot reloading, it's dereferencing "ClusterTreePtr" - which is null for the class default object.

My workaround for now is to override "Serialize()" like so:

 void UMyDerivedHISMComponent::Serialize(FArchive& Ar)
 {
     bool hasTempClusterTreePtr = false;
     if (Ar.IsObjectReferenceCollector() && !ClusterTreePtr.IsValid())
     {
         ClusterTreePtr = MakeShareable(new TArray<FClusterNode>);
         hasTempClusterTreePtr = true;
     }
 
     Super::Serialize(Ar);
 
     if (hasTempClusterTreePtr)
     {
         ClusterTreePtr = nullptr;
     }
 }
more ▼

answered Dec 14 '18 at 10:31 PM

avatar image

MoreMineralz
1

(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