Skip to content

UI Memory leak #23158

@metasekk

Description

@metasekk

Issue type

Crash or freeze

Bug description

Almost all interactions with the UI increase the memory (RAM amount) indefinitely, slowing down the interface progressively. Things have seriously worsened in master 4.4 (Qt6), but the issue occurs in previous versions too.

Steps to reproduce

Main ways identified to increase the memory (in decreasing order of importance):

  • Open windows (e.g. +50 Mb for "Preferences" each time)

=> Greatly improved in #23495 (+2 Mb for each opening/closing cycle instead of +50 Mb).

  • Open menus (+20 Mb each time; +1 Mb when closing)

=> Greatly improved in #23495 (+0.25 Mb for each opening/closing cycle instead of +20 Mb).

Issues below are still reproducible:

  • Click/Hover quickly over submenus (+10 Mb, e.g. "File > Open recent")
  • Move/drag the score (between +1 Mb/s and +10 Mb/s, depending on the movement, and the duration when dragging)
  • Zoom in/Zoom out (~1 Mb for each)
  • Selecting two bars alternately in a score, or selecting one then releasing it by clicking elsewhere (~300 kb each time)
  • Open/close palettes (+10 kb each)

Note that it only occurs when a score is open.

Screenshots/Screen recordings

https://drive.google.com/file/d/1FRGApBrWmJTWLxiq2I-89gA6ICNtWtcY/view?usp=sharing

MuseScore Version

Tested on 4.4, 4.3.1, 4.2.1 and 4.1.0 (much slower growth in 4.1.0 and 4.2.1, but still present)

Regression

I don't know

Operating system

Win10 (22H2); RAM: 16Go; CPU: Intel Core i5-9300H (2.40GHz)

Additional context

Alongside other identified leaks (e.g. #23112 and #22721), it might partially explain #22094 and #20889.
Reported on musescore.org multiple times (e.g. https://musescore.org/en/node/364227, https://musescore.org/en/node/353935...)

Point 2 ("Open menus") item is a duplicate of #22885.

Metadata

Metadata

Labels

P2Priority: Mediumneeds reviewThe issue needs review to set priority, fix version or change status etc.performancePerformance issues (e.g. high CPU usage)

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions