Skip to content

[BUG] Memory leak on practice mode #98

@catcherkirby

Description

@catcherkirby

When using Practice Mode, enabling playback speed changes and or looping causes the game’s memory usage to continuously increase over time. This eventually leads to system instability or a crash. The issue does not occur during normal gameplay when Practice Mode is not active. Memory usage increases faster when the loop length is shorter and when playback speed is higher. Exiting the track immediately releases a large amount of memory, suggesting native resources are only freed when playback objects are destroyed.

Steps to reproduce:

  • Start any song normally
  • Activate Practice Mode
  • Change speed to anything other than 100 percent
  • Optionally set a loop, especially a short loop (1–4 seconds)
  • Observe memory usage over time

Observed behavior

  • Memory usage continuously climbs while Practice Mode is active
  • Shorter loops cause faster memory growth
  • Higher playback speed causes faster memory growth due to more frequent loop triggers
  • Memory growth occurs even if there are no notes in the loop
  • Once speed or looping is enabled, memory continues to climb slowly even if no further inputs are made
  • Exiting the song immediately frees a large amount of memory (but not always)
  • Will eventually crash

Additional notes

  • The issue appears unrelated to scoring or note processing
  • Behavior strongly suggests native audio and or movie playback allocations occurring during seek or speed reconfiguration
  • Practice Mode likely triggers repeated seek and playback reconfiguration paths that do not fully release native resources until track exit

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