UMG 3D "Cast to" crash [4.6.1]

Goal: Player removes rust from a cube (aka “DynamicBP” because it contains a dynamic material), and the amount of rust removed is displayed in a 3D UMG known as “PanelMenu3D” (which is an actor bp that uses “PanelMenu” bp). So far, this works for a regular UMG that is attached to the viewport, but not as a 3D UMG.

Figure 1: PanelMenu blueprint.

Figure 2: PanelMenu 3D in the level.

How it works:

  • DynamicBP (the cube) sets the value (if changed) for the local variable “laserProgress” on tick when the laser is in use. That’s it, no interface is used to pass the variable around, but the variable is public.

  • PanelMenu has a progress bar binding that casts to the DynamicBP class and gets the variable “laserProgress” to update the progress bar. This works for a regular 2D UMG that is added to viewport.

  • PanelMenu3D is an actor blueprint that contains PanelMenu as the root, and has manually placed hitboxes for the buttons. This is placed over the monitor static mesh to emulate an interactive computer screen.

Problem: If I cast to DynamicBP from PanelMenu, the editor will crash on compile. See figure below.

Figure 3: The Problem. Editor will crash if I finish the connections and then compile.

Side note: A text box widget that I use as a timer display is cast in a similiar way to my character bp instead of DynamicBP, but this also will cause the same crash if I recreate it in my 3D UMG. Also, I have another UMG running that is attached to my viewport; all the HUD UMG does is appear when a user looks at a button, and then fills up a different progress bar for a second or so.

ENGINE VERSION: 4.6

Since casting causes crashes, is there a workaround for a progress bar binding that gets the progress variable from DynamicBP?

Thanks,
Fenra

MachineId:0AB8F68F4F4A6FD67B9A8DA699785D32
EpicAccountId:c5b2a247408942aabe8352c5f52cb984

Access violation - code c0000005 (first/second chance not available)

UE4Editor_CoreUObject + 497120 bytes
UE4Editor_CoreUObject + 1555428 bytes
UE4Editor_CoreUObject + 1153450 bytes
UE4Editor_CoreUObject + 689886 bytes
UE4Editor_CoreUObject + 1157578 bytes
UE4Editor_CoreUObject + 1149510 bytes
UE4Editor_UnrealEd + 9739282 bytes
UE4Editor_UnrealEd + 10074675 bytes
UE4Editor_UnrealEd + 10045544 bytes
UE4Editor_KismetCompiler + 369435 bytes
UE4Editor_UnrealEd + 9881482 bytes
UE4Editor_Kismet + 727159 bytes
UE4Editor_Kismet + 992849 bytes
UE4Editor_Kismet + 1007926 bytes
UE4Editor_Slate + 588774 bytes
UE4Editor_Slate + 1535133 bytes
UE4Editor_Slate + 1030727 bytes
UE4Editor_Slate + 1037049 bytes
UE4Editor_Slate + 1435577 bytes
UE4Editor_Slate + 2116506 bytes
UE4Editor_Slate + 2296435 bytes
UE4Editor_Slate + 432060 bytes
UE4Editor_Slate + 160583 bytes
UE4Editor_Slate + 832224 bytes
UE4Editor_Slate + 770598 bytes
UE4Editor_Core + 2484713 bytes
UE4Editor_Core + 2400763 bytes
UE4Editor_Core + 2489275 bytes
UE4Editor_Core + 2387186 bytes
user32 + 105425 bytes
user32 + 104666 bytes
UE4Editor_Core + 2490486 bytes
UE4Editor!FEngineLoop::Tick() + 3434 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\launchengineloop.cpp:2193]
UE4Editor!GuardedMain() + 479 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\launch.cpp:131]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Hello Fenra,

I was unable to reproduce the crash with the information provided. I have a few questions that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this 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 the blueprints that are being used?
  4. Have you tried using a scalar parameter?

Example of a scalar parameter:

This is a picture of my 3D widget and a cube that is slowly disappearing. The progress bar shows how transparent the cube is.

The is my material. This is a simple example of how a scalar parameter can be set up.

This is my Scalar parameter

This is my Widget event graph

This is my Widget

I’m finally back in office after the winter weather. I’ll try.

Step 1.) Create a new First Person Project (Blueprint).

Step 2.) Open myCharacter blueprint and create a float variable ProgressData and set its default value to 1. Make it public (click the eye).

Step 3.) Create a new widget blueprint (i named it widgetBP). Add a progress bar that is roughly in the middle so it’s easy to see. Compile and save this blueprint.

Step 4.) Create a new actor blueprint (widgetBP_3D), and click add component and select “widget”. Set the widget class to drop menu to widgetBP. Set max interaction distance to 1. Compile and save. Add it to the level so you can see it.

Step 5.) Save all work, next step will cause crash.

Step 6.) Create binding for progress bar in the widgetBP and use picture below, and compile to crash.

I like your example, I didn’t know you could do that. However, in your example you are changing the variable in the widget bp and then the material is collecting it. I need sort of the reverse. I’m trying to get a variable that is changing in an actor bp to update widget bp.

This issue is not present in 4.7.1. So please disregard my question. :slight_smile: thanks for the assistance.

-Fenra