maxrave-dev / maxrave-dev/SimpMusic
SimpMusic Desktop crashes when apply a backup file
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
After applying the backup file, the program just closed itself. When I tried to run it again, it just throws at me a crash screen.
This is my second attempt to do it on Windows and it doesn't work, I tried to do it on Linux Mint but it doesn't work also.
Steps to Reproduce
- Apply a backup file to the program
- The program "restart"
- Crashes when run.
Expected Behavior
Runs perfectly
App Version
1.1.1
Android Version
Windows 10? (issue on desktop)
Device Model
HP ProBook 450 G5
Custom ROM
- I am using a custom ROM
Custom ROM Name (if applicable)
No response
Screenshots (optional)
No response
Log / Error Details
java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source)
at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source)
at java.base/java.lang.String.substring(Unknown Source)
at kotlin.text.StringsKt__StringsKt.substring(Strings.kt)
at com.maxrave.simpmusic.MainKt$c.invokeSuspend(main.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt)
at kotlinx.coroutines.U.run(DispatchedTask.kt)
at kotlinx.coroutines.ad.c(EventLoop.common.kt)
at kotlinx.coroutines.e.j(Builders.kt)
at kotlinx.coroutines.g.a(Unknown Source)
at kotlinx.coroutines.g.a(Unknown Source)
at com.maxrave.simpmusic.MainKt.main(main.kt)
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 in main.kt at MainKt$c.invokeSuspend, using the String.substring stack trace as the entry point. Reproduce by applying a backup file on the desktop app, then inspect the restore and restart path for the empty string that causes the exception. Done means the restored app launches successfully on Windows and Linux Mint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100