"Leaky" memory usage when using repeat_infinite()
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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"
- 主要语言
- Rust
- 星标
- 2.5k
- 派生
- 338
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustAudio/rodio 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 1/5 1 小时以内 新手友好度 73/100
-
难度 3/5 1-2 天 新手友好度 62/100
-
WavDecoder::size_hint underflows (u32 wrap, ~4.29e9) after EOF, causes multi-GB Vec::collect() allocation可能已有人在做 @marin-m 于 4 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
priority middle
难度 1/5 1 小时以内 新手友好度 62/100
KATO-Hiro/AtCoderClans#12940 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
hurttlocker/o8#5112 ·
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复