Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

"Leaky" memory usage when using repeat_infinite()

Aberta
#673 5 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
42/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
rust
Domínio
audio-video-rtc

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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"

Linguagem predominante
Rust
Estrelas
2.5k
Forks
338
Merge médio
1d 3h
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de RustAudio/rodio

Todas as issues de RustAudio/rodio

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.