Description

Potential memory leak when using Blueprint Debugger to inspect a return value multiple times while playing. User also reported this would cause a crash, but I didn't try to max out ram usage to trigger the crash.

I didn't observe any change in memory in 4.27.2 with the same setup. I included the logs from UE4(UE4272.log).

Steps to Reproduce
  1. Create a new First Person Project
  2. Create a new blueprint actor named 'A'
  3. Create a new blueprint actor named 'B'
  4. Open B
  5. Add a Variable of type A (Object Types>A>Object Ref) named 'RefA'
  6. Set RefA's Instance Editable and Expose on Spawn to True
  7. Add a Variable of type Color (Structure>Color) named 'Colors'
  8. In the Construction Script 
  9. Ctrl+Drag in a reference to Colors
  10. Off of the Colors reference create a 'Resize' node then set it to 30,000
  11. Compile then close B
  12. Open A
  13. Add a Variable of type B (Object Types>B>Object Ref) named 'RefB'
  14. Add a 'Spawn Actor of Class' node off of Event Begin Play
  15. Set Class to B
  16. Right-click and split the Spawn Transform pin
  17. Create a reference to Self then connect it to RefA pin
  18. Alt + drag in a reference to RefB 
  19. Connect the return value of the 'Spawn Actor' node to the 'Set RefB' node then link the execution pins
  20. Compile then close A
  21. Open BP_FirstPersonProjectile
  22. Add a Variable of type A (Object Types>A>Object Ref) named 'ProjectileA'
  23. Create an 'Event Begin Play' node 
  24. Off of it create a 'Spawn Actor of Class' node
  25. Set Class to A
  26. Right-click and split the Spawn Transform pin
  27. Alt + drag in a reference to ProjectileA
  28. Connect the return value of the 'Spawn Actor' node to the 'Set ProjectileA' node then link the execution pins
  29. Compile then close BP_FirstPersonProjectile
  30. Open BP_Rifle
  31. In the Projectile Spawn Logic note find and select the 'Play Sound at Location' node that is right after a 'Spawn Actor BP_FirstPersonProjectile' node
  32. Press F9
  33. Press Ctrl+Shift+Escape
  34. Go to the performance tab and select Memory
  35. Back in the Editor press Play
  36. Pick up the rifle then shoot it
  37. The break point will return you to the BP_Rifle event graph
  38. Repetitively(~10 to really notice the change) move the cursor over the Return Value of the 'Spawn Actor BP_FirstPersonProjectile' each time letting dialog load
  39. As you are moving the cursor on and off the return value watch memory usage

 

Expected Results:
Memory usage is unchanged. Any change would be undone when PIE is stopped.

Actual Results:
Memory usage goes up, and remains until the editor is closed.

Have Comments or More Details?

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

20
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions5.0
Target Fix5.2
Fix Commit21765119
Main Commit21765119
CreatedMar 11, 2022
ResolvedSep 2, 2022
UpdatedSep 20, 2022
View Jira Issue