Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

"Leaky" memory usage when using repeat_infinite()

Offen
#673 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
rust
Bereich
audio-video-rtc

Rechercherichtung

Start by reading the repeat_infinite() implementation and the source types it wraps, then reproduce the reported growth with the Rust 0.20.1 setup: a Sink playing a Decoder over a Cursor<Vec<u8>>. Compare memory use with and without repetition over time. The issue is resolved when repeated playback no longer causes unbounded memory growth; the report does not name a test or file.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Hello,
I'm using Rodio for my application and I'd like for my music to repeat multiple times. I've found the repeat_infinite() function for the Source struct but when I monitored the memory usage I've found out that it's growing about at 10mb every 15 seconds.

I haven't checked if it eventually caps, I only saw that it went from 30mb of memory to 100mb+.

Not using repeat_infinite() works as intended, the memory usage doesn't move.

In my app I create a Sink and I append the Decoder wrapping my music. I assumed that the problem was about buffering more and more music, but in my case the music is in a Cursor<Vec<u8>> so it shouldn't load any more of it (plus my music file is definitely less than 70mb).

System:
OS: Linux X11 pop 22.04
Memory: 61.9 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 4070 || NVIDIA || 560.35.03

Relevant crates:
cpal = "0.15.3"
rodio = "0.20.1"

Vorherrschende Sprache
Rust
Sterne
2.5k
Forks
338
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus RustAudio/rodio

Alle Issues in RustAudio/rodio

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.