Crash when attaching to motion controller

We’ve run into an issue, likely a bug, in regards to one of our projects. The only instance I can find recorded of anyone else reporting this is here: Crash on attaching to motion controller - Platform & Builds - Unreal Engine Forums

We’re having the same issue, whereupon attaching an object with many child actors to one of our hands causes an immediate crash. We found in the call stack the same max value of 16 when the break is triggered. We’re going to look into the same workaround the poster above used, but some more insight into this issue would be appreciated. Is there a reason that this function caps out at 16 components? Is this something that will be resolved in future versions of unreal or will there always be a need for a workaround?

Call stack is as follows:

UE4Editor-HeadMountedDisplay.dll!UMotionControllerComponent::FViewExtension::GatherSceneProxies(USceneComponent * Component) Line 156    C++
UE4Editor-HeadMountedDisplay.dll!UMotionControllerComponent::FViewExtension::GatherSceneProxies(USceneComponent * Component) Line 162    C++
UE4Editor-HeadMountedDisplay.dll!UMotionControllerComponent::FViewExtension::GatherSceneProxies(USceneComponent * Component) Line 162    C++
UE4Editor-HeadMountedDisplay.dll!UMotionControllerComponent::FViewExtension::GatherSceneProxies(USceneComponent * Component) Line 162    C++
UE4Editor-HeadMountedDisplay.dll!UMotionControllerComponent::FViewExtension::GatherSceneProxies(USceneComponent * Component) Line 162    C++
UE4Editor-HeadMountedDisplay.dll!UMotionControllerComponent::FViewExtension::BeginRenderViewFamily(FSceneViewFamily & InViewFamily) Line 113    C++
UE4Editor-Renderer.dll!FRendererModule::BeginRenderingViewFamily(FCanvas * Canvas, FSceneViewFamily * ViewFamily) Line 1654    C++
UE4Editor-Engine.dll!UGameViewportClient::Draw(FViewport * InViewport, FCanvas * SceneCanvas) Line 1043    C++
UE4Editor-Engine.dll!FViewport::Draw(bool bShouldPresent) Line 1022    C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1523    C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 361    C++
UE4Editor.exe!FEngineLoop::Tick() Line 2427    C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 142    C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 189    C++
[External Code]

Autos:

  Component    0x00000217adb09d00 {ForcedLodModel=0 PreviousLODLevel=0 bOverrideMinLOD=false ...}    USceneComponent * {UE4Editor-Engine.dll!UStaticMeshComponent}
   LateUpdateSceneProxies    0x00000217b14ce0a0 {0x00000217ad8dce00 {WireframeColor={R=1.00000000 G=0.000000000 B=1.00000000 ...} ...}, ...}    FPrimitiveSceneProxy *[16]
   LateUpdateSceneProxyCount    16    int
   this    0x00000217b14ce080 {MotionControllerComponent=0x00000217ad8f1d00 {PlayerIndex=0 Hand={Value=1 '\x1' } ...} ...}    UMotionControllerComponent::FViewExtension *

As you can see, it breaks when LateUpdateSceneProxyCount hits 16, which seems to be a hard cap. Screenshot attached as well for clarity’s sake.

Hello Kabutak,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints that may be involved?

I was able to reproduce the crash within a clean project running 4.10.4, however, when I tried it in 4.11 I was unable to reproduce the crash. It appears as if it has been patched, though I did not see it in the notes. No blueprints involved, all in c++. Just spawning actors and then attaching them to the hand.

Edit: After further testing, I was able to attach a hierarchy of over 1100 actors to the hand in 4.11, so it does appear to be fixed. It should probably be mentioned in the patch notes, unless I missed it somehow.

Hello Kabutak,

I am happy to hear that your issue has been resolved. I will be marking your last comment as the answer for this question. If the issue does occur again in 4.11 please feel free to reopen this issue with a reply containing any additional information that you may have. Thank you for the suggestion on the patch notes. I will pass it along.

Make it a great day