Skip to content

Memory leak and GUI appears frozen when resizing viewport #2477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
krrk opened this issue Feb 11, 2025 · 3 comments
Open

Memory leak and GUI appears frozen when resizing viewport #2477

krrk opened this issue Feb 11, 2025 · 3 comments
Labels
state: pending not addressed yet type: bug bug

Comments

@krrk
Copy link

krrk commented Feb 11, 2025

Version of Dear PyGui

Version: 2.0.0
Operating System:
Edition Windows 11 Enterprise
Version 23H2
OS build 22631.4751
11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz 3.00 GHz
Integrated Graphics

My Issue/Question

Memory leak and GUI appears frozen when resizing viewport or when dragging title bar from maximized to windowed mode. The issue doesn't happen every resize or maximize/drag back to window mode but is frequent enough to cause problems. Memory also increases from 65 MB to over 1 GB when the freeze occurs in this sample application. In my real application the memory increases can make the computer run out of memory. Number of triangles also increases after the issue. This seems related to #2049. I can reproduce this with the code in #2049 and with the dearpygui demo or the code below. It also occurs without maximizing but with a resize of the viewport while in windowed mode.

To Reproduce

Steps to reproduce the behavior:

  1. Run the sample code
  2. Maximize and drag back to window mode until GUI freezes

Expected behavior

GUI should not freeze and memory consumption not increase

Screenshots/Video

DearPyGUI.Freeze.Example.Small.mp4

Standalone, minimal, complete and verifiable example

# Here's some code anyone can copy and paste to reproduce your issue
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(title='Custom Title', width=600, height=600)

dpg.show_about()
dpg.show_metrics()

dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
@krrk krrk added state: pending not addressed yet type: bug bug labels Feb 11, 2025
@spartonspartan
Copy link

spartonspartan commented Mar 5, 2025

I have same issue with v2.0.0. When I resize the window, my GUI freezes and I have memory leak.
However, I notice it only happens for me when changing vertical size. Horizontal size has no effect for me. Strange thing is if I resize vertically a second time, the window unfreezes.
I am using Windows 10.

@PRIMA-LAB-IPU
Copy link

PRIMA-LAB-IPU commented Apr 1, 2025

It only happens to me on Windows, not on macOS.
p.s. Version 1.11.0 resolves the issue.

@steve725
Copy link

Same issue with Version 2.0.0 on Windows 10 but not on Linux. Due to this bug I had to switch to imgui_bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet type: bug bug
Projects
None yet
Development

No branches or pull requests

4 participants