Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application crashing due to Input dispatching timed out when deleting the ZIM files. #4031

Closed
MohitMaliFtechiz opened this issue Oct 14, 2024 · 0 comments · Fixed by #4034
Closed
Assignees
Labels
Android Vitals Issues reported in Android Vitals (Google Play Console) bug enhancement
Milestone

Comments

@MohitMaliFtechiz
Copy link
Collaborator

Describe the bug
Application crashing when deleting the ZIM files because we are using the runBlocking method while deleting the ZIM files which uses the main thread for deleting the ZIM files so for large ZIM files it can take more time to delete, due to this, this crash is happening.

The playStore reported this crash, and there are 5 crashes in the last 60 days.

Expected behavior
It should not crash we should delete the file on the IO thread instead of the main thread.

Steps to reproduce the behavior:
No reproducing steps are available, the bug is reported by PlayStore.

Screenshots
Image

Environment

  • Version of Kiwix Android: 3.11.1
  • Device: Infinix Infinix-X693 (Infinix NOTE 10)
  • OS version: Android 10

Logs

org.kiwix.kiwixmobile.core.extensions.FileExtensionsKt.deleteFile

  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at kotlinx.coroutines.BlockingCoroutine.joinBlocking (BlockingCoroutine.java:88)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking (BuildersKt__Builders.kt:59)
  at kotlinx.coroutines.BuildersKt.runBlocking (Builders.kt:1)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default (BuildersKt__Builders.kt:38)
  at kotlinx.coroutines.BuildersKt.runBlocking$default (Builders.kt:1)
  at org.kiwix.kiwixmobile.core.extensions.FileExtensionsKt.deleteFile (FileExtensions.kt:50)
  at org.kiwix.kiwixmobile.core.utils.files.FileUtils.deleteZimFile (FileUtils.java:93)
  at org.kiwix.kiwixmobile.zimManager.fileselectView.effects.DeleteFiles.deleteSpecificZimFile (DeleteFiles.java:71)
  at org.kiwix.kiwixmobile.zimManager.fileselectView.effects.DeleteFiles.deleteAll (DeleteFiles.java:61)
  at org.kiwix.kiwixmobile.zimManager.fileselectView.effects.DeleteFiles.access$deleteAll (DeleteFiles.java:36)
  at org.kiwix.kiwixmobile.zimManager.fileselectView.effects.DeleteFiles$invokeWith$1.invoke (DeleteFiles.kt:50)
  at org.kiwix.kiwixmobile.zimManager.fileselectView.effects.DeleteFiles$invokeWith$1.invoke (DeleteFiles.kt:48)
  at org.kiwix.kiwixmobile.core.utils.dialog.AlertDialogShower.create$lambda-11$lambda-2 (AlertDialogShower.java:60)
  at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage (AlertController.java:167)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:268)
  at android.app.ActivityThread.main (ActivityThread.java:8017)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:627)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Vitals Issues reported in Android Vitals (Google Play Console) bug enhancement
Projects
None yet
1 participant