Skip to content

Memory leak when restarting the level #55

@carlos-lopez-hyve

Description

@carlos-lopez-hyve

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, feature request, or anything other than a bug report directly related to this project.

Description

We have a GPU memory leak issue when reloading levels related to the ZED blueprints. Every time we change to another level, BP_ZED_Initializer is loaded and the GPU memory consumption grows by around 0.2 GB. This is an issue for our application that needs to run all day and involves many level switches. We were able to reproduce the memory issue using only the ZED UE5.4 plugin without adding our app code.

Steps to Reproduce

Prerequisites:

  • UE 5.3
  • ZED SDK 4.1
  • ZED Camera
  1. Clone the zed-UE5 repo
  2. Checkout the tag v4.1
  3. Open the ZEDSamples.uproject
  4. Say yes if asked about build missing elements
  5. In the content browser, open a level via double click in it: (in our case we selected L_BodyTrackingMulti)
  6. In the Outliner windows, select BP_ZED_Initializer
  7. In the input section of the Details window, change Auto Receive Input to Player 0
  8. Edit BP_ZED_initializer
  9. In the Event Graph, add an event to change to other level. For simplicity, we will change to the same level but you could select other level instead. See image for an example regarding how to do it via pressing the letter R
  10. Then, track in the task manager the current dedicated GPU memory after each level change. In our case it grows in increments of 0.2GB but it could be different depending of the level

Image

Expected Result

No memory leaks when changing to other level.

Actual Result

Memory leaks

ZED Camera model

ZED2i

Environment

OS: Windows 11
CPU: Intel i9-14900K
GPU: NVIDIA GeForce RTX 4080 SUPER
ZED SDK: 4.1.4
ZED-UE5: v4.1
Unreal Engine 5.3.2
CUDA: v12.1.66
Camera: ZED 2i Firmware 1523

Anything else?

At the moment we are looking for some temporary fixes, but any advice would be welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions