ReadYouApp / ReadYouApp/ReadYou
Crash when save image to the path where a file with same name already exist
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 7.5k
- Forks
- 330
- PR merge metrics
- No merged PRs in 30d
Description
I subscribe feed which the image is always name download.jpg. so everytime I download images, there's the situation the new download images has same name with the previous download images in same directory. The app can not rename it but directly crash. I attached the log
Version: 0.16.1
Device: samsung SM-X520
System: Android 16 (API 36)
Stack trace:
at android.os.Parcel.createExceptionOrNull(Parcel.java:3362)
at android.os.Parcel.createException(Parcel.java:3338)
at android.os.Parcel.readException(Parcel.java:3321)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:201)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:153)
at android.content.ContentProviderProxy.update(ContentProviderNative.java:685)
at android.content.ContentResolver.update(ContentResolver.java:2431)
at android.content.ContentResolver.update(ContentResolver.java:2393)
at me.ash.reader.infrastructure.android.AndroidImageDownloader$downloadImage$2.invokeSuspend(AndroidImageDownloader.kt:228)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:8)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:93)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@848320a, Dispatchers.Main.immediate]
Contributor guide
No contributing guide indexed for this repository
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 infrastructure/android/AndroidImageDownloader.kt at the failing update around line 228, using the attached stack trace as the entry point. Reproduce downloads where multiple feed images share downloadfile.jpg in the same Pictures/Read You directory. Done means a duplicate name no longer crashes and the image is saved under a unique name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100