client icon indicating copy to clipboard operation
client copied to clipboard

Crash refreshing packages.

Open Efreak opened this issue 3 years ago • 20 comments

logcat

--------- beginning of crash
07-14 14:48:05.165 15914 18573 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-9
07-14 14:48:05.165 15914 18573 E AndroidRuntime: Process: com.looker.droidify, PID: 15914
07-14 14:48:05.165 15914 18573 E AndroidRuntime: java.lang.IndexOutOfBoundsException: Index 0 out-of-bounds for length 0
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:62)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:68)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:247)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at java.util.Objects.checkIndex(Objects.java:372)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at java.util.AbstractList$SubList.get(AbstractList.java:784)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at com.looker.droidify.index.RepositoryUpdater$update$3.invokeSuspend(RepositoryUpdater.kt:4)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at com.looker.droidify.index.RepositoryUpdater$update$3.invoke(RepositoryUpdater.kt:2)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:1)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:10)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at com.looker.droidify.index.RepositoryUpdater$update$3.invokeSuspend(RepositoryUpdater.kt:35)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:13)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:4)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:8)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:2)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:1)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:14)
07-14 14:48:05.165 15914 18573 E AndroidRuntime: 	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ecbe807, Dispatchers.IO]

Efreak avatar Jul 14 '22 22:07 Efreak

Can you provide info on what I can do to reproduce this crash?

Iamlooker avatar Jul 17 '22 13:07 Iamlooker

Unfortunately, I have no idea on the specifics; simply tapping the refresh icon caused it after a few moments. It was a fresh install, and all I'd done was added a bunch of repositories. I'm pretty sure it wasn't an issue with any of the repos, though--other fdroid apps (official, classic, neostore, Aurora) had no issues with the same set of repositories, and after wiping app data and re-importing, neither did droidify. If it helps, I'll send a zip of droidify's app data, if I can get it (I'm not rooted, and last time I tried an adb backup I ended up with a ~0.5kb file)

Efreak avatar Jul 18 '22 01:07 Efreak

Unfortunately, I have no idea on the specifics; simply tapping the refresh icon caused it after a few moments. It was a fresh install, and all I'd done was added a bunch of repositories. I'm pretty sure it wasn't an issue with any of the repos, though--other fdroid apps (official, classic, neostore, Aurora) had no issues with the same set of repositories, and after wiping app data and re-importing, neither did droidify. If it helps, I'll send a zip of droidify's app data, if I can get it (I'm not rooted, and last time I tried an adb backup I ended up with a ~0.5kb file)

Which repos did you add? I think I might have messed with logic of adding or removing repos.

Maybe it will be helpful if you can provide with the repos 😊

Iamlooker avatar Jul 18 '22 06:07 Iamlooker

Same here. I can reproduce the crash by [force stop] the app, [clear cache], run the app and tap on the refresh symbol. After the crash I can rerun the app and (manually) execute refresh cycles as much as I want.

I using (only) the following repos:

  • https://f-droid.org/repo
  • https://apt.izzysoft.de/fdroid/repo
  • https://molly.im/fdroid/foss/fdroid/repo
  • https://releases.threema.ch/fdroid/repo

revuwa avatar Sep 01 '22 06:09 revuwa

Which version are you using?

Iamlooker avatar Sep 01 '22 06:09 Iamlooker

(Sorry), it's v0.4.9 (@ Android 13).

revuwa avatar Sep 01 '22 06:09 revuwa

PS: I have such a "feeling" (not more) that the clean up function could have something to do with the crashes, because the app crashes on my side, when it was in background for a long time. My clean up duration is set to 6 hours, and every time I run the app after a working day it crashes at the first try, but not if I reopen it after one hour or something.

revuwa avatar Sep 01 '22 07:09 revuwa

Hmm interesting.

Can you capture crash logs? If so then it would be so helpful

Iamlooker avatar Sep 01 '22 07:09 Iamlooker

type: crash
package: com.looker.droidify:49
process: com.looker.droidify

java.lang.RuntimeException
	at com.looker.droidify.index.RepositoryUpdater$downloadIndex$2.invokeSuspend(RepositoryUpdater.kt:10)
	at com.looker.droidify.index.RepositoryUpdater$downloadIndex$2.invoke(RepositoryUpdater.kt:2)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:1)
	at kotlinx.coroutines.DelayKt.withContext(Delay.kt:10)
	at com.looker.droidify.index.RepositoryUpdater$update$3.invokeSuspend(RepositoryUpdater.kt:7)
	at com.looker.droidify.index.RepositoryUpdater$update$3.invoke(RepositoryUpdater.kt:2)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:1)
	at kotlinx.coroutines.DelayKt.withContext(Delay.kt:10)
	at com.looker.droidify.service.SyncService$handleFileDownload$job$1.invokeSuspend(SyncService.kt:11)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:2)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:1)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:14)
	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@19ad0dc, [Dispatchers.IO](http://dispatchers.io/)]

revuwa avatar Sep 01 '22 07:09 revuwa

Thanks

Iamlooker avatar Sep 01 '22 07:09 Iamlooker

This seems like an issue with Auto-Sync rather than cleanup

Iamlooker avatar Sep 01 '22 07:09 Iamlooker

Auto-sync is off (never) on my side. BTW - even it's not related to this issue - two radio button points have the same name:

EDIT: [Picture deleted]

revuwa avatar Sep 01 '22 07:09 revuwa

Yes thats a know issue and should be fixed in next update

Iamlooker avatar Sep 01 '22 07:09 Iamlooker

Yes thats a know issue and should be fixed in next update

Sorry then, for double post.

revuwa avatar Sep 01 '22 08:09 revuwa

Auto-sync is off (never) on my side. BTW - even it's not related to this issue - two radio button points have the same name:

EDIT: [Picture deleted]

Fixed in 6ea35212596ad73bdf11a99fb4602ee73e11696d

Iamlooker avatar Sep 01 '22 08:09 Iamlooker

Just to add the following info (to upper post). Tried now to wait 6 hours to reopen the app and (manually) trigger a sync - which makes the app crash. (I just hope I'm on the right track with this).

revuwa avatar Sep 01 '22 13:09 revuwa

Just to add the following info (to upper post). Tried now to wait 6 hours to reopen the app and (manually) trigger a sync - which makes the app crash. (I just hope I'm on the right track with this).

Just to clear it, you had Auto sync off, right?

Iamlooker avatar Sep 02 '22 04:09 Iamlooker

Just to clear it, you had Auto sync off, right?

Yes, my settings are exactly: Settings (and installer type is: "Session installer").

This seems like an issue with Auto-Sync rather than cleanup

You're right, for sure, because in the meantime I realized, that the app crashes even after ~2 hours idle time, (not just after >6 hours)...

revuwa avatar Sep 02 '22 05:09 revuwa

Are you ok if I send you a debug build today?

Logs from it would be much more helpful

Iamlooker avatar Sep 02 '22 05:09 Iamlooker

Are you ok if I send you a debug build today?

Sure :)

revuwa avatar Sep 02 '22 06:09 revuwa

This seem to be fixed in latest version

Iamlooker avatar Dec 04 '22 18:12 Iamlooker