maxrave-dev / maxrave-dev/SimpMusic
It malfunctioned after being used for a short period of time.
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 11.4k
- Forks
- 599
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 7
Description
Duplicate Check
- I confirm I searched for existing reports and found no duplicates.
Describe the Bug
OOM crash when frequently switching songs/activities due to MediaCodec instance leak
Steps to Reproduce
-
Open the SimpMusic app.
-
Play any song.
-
Press the Home button to exit to the home screen, then reopen the app immediately.
-
Repeat step 3 about 5-7 times OR press the "Next" button (B)
Expected Behavior
The music playback app is smooth, doesn't cause sudden RAM spikes, and doesn't crash when switching between background and foreground modes multiple times.
App Version
1.1.0
Android Version
Android 16
Device Model
Meizu 20
Custom ROM
- I am using a custom ROM
Custom ROM Name (if applicable)
No response
Screenshots (optional)
No response
Log / Error Details
Build version: 1.1.1
Current date: 2026-04-14 11:42:09
Device: Meizu MEIZU 20
OS version: Android 16 (SDK 36)
Stack trace:
java.lang.OutOfMemoryError: Failed to allocate a 64 byte allocation with 329216 free bytes and 321KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at android.media.MediaCodec.getBuffer(Native Method)
at android.media.MediaCodec.getInputBuffer(MediaCodec.java:4821)
at t7.c.p(r8-map-id-3c5db09a77b14f996c26362322e1ef2be37fb38d6e9c13eab77a818cf1c6ea07:3)
at t7.s.M(r8-map-id-3c5db09a77b14f996c26362322e1ef2be37fb38d6e9c13eab77a818cf1c6ea07:35)
at t7.s.z(r8-map-id-3c5db09a77b14f996c26362322e1ef2be37fb38d6e9c13eab77a818cf1c6ea07:122)
at i8.l.z(r8-map-id-3c5db09a77b14f996c26362322e1ef2be37fb38d6e9c13eab77a818cf1c6ea07:20)
at i7.r0.h(r8-map-id-3c5db09a77b14f996c26362322e1ef2be37fb38d6e9c13eab77a818cf1c6ea07:133)
at i7.r0.handleMessage(r8-map-id-3c5db09a77b14f996c26362322e1ef2be37fb38d6e9c13eab77a818cf1c6ea07:378)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:248)
at android.os.Looper.loop(Looper.java:338)
at android.os.HandlerThread.run(HandlerThread.java:85)
User actions:
2026-04-14 11:32:40: MainActivity created
2026-04-14 11:32:40: MainActivity resumed
2026-04-14 11:33:07: MainActivity paused
2026-04-14 11:34:40: MainActivity destroyed
2026-04-14 11:34:50: MainActivity created
2026-04-14 11:34:50: MainActivity resumed
2026-04-14 11:35:46: MainActivity paused
2026-04-14 11:35:54: MainActivity resumed
2026-04-14 11:36:36: MainActivity paused
2026-04-14 11:36:36: MainActivity resumed
2026-04-14 11:36:39: MainActivity paused
2026-04-14 11:36:41: MainActivity resumed
2026-04-14 11:36:44: MainActivity paused
2026-04-14 11:37:39: MainActivity resumed
2026-04-14 11:37:45: MainActivity paused
2026-04-14 11:40:07: MainActivity resumed
2026-04-14 11:40:11: MainActivity paused
2026-04-14 11:40:11: MainActivity resumed
2026-04-14 11:40:11: MainActivity paused
2026-04-14 11:40:21: MainActivity resumed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the OOM with repeated MainActivity background/foreground transitions and song changes, then inspect the MediaCodec calls shown in the stack trace. Confirm that repeated switching no longer causes unbounded memory growth or an OutOfMemoryError, and verify playback remains functional afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100