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

org.kiwix.kiwixmobile.core.reader.ZimReaderContainer.setZimFile Input dispatching timed out #3929

Open
kelson42 opened this issue Jul 7, 2024 · 8 comments · May be fixed by #3937
Open

org.kiwix.kiwixmobile.core.reader.ZimReaderContainer.setZimFile Input dispatching timed out #3929

kelson42 opened this issue Jul 7, 2024 · 8 comments · May be fixed by #3937
Assignees
Labels
Milestone

Comments

@kelson42
Copy link
Collaborator

kelson42 commented Jul 7, 2024

image

@kelson42 kelson42 added the bug label Jul 7, 2024
@kelson42 kelson42 added this to the 3.11.2 milestone Jul 7, 2024
@CalebKL
Copy link
Contributor

CalebKL commented Jul 10, 2024

Let me work on this issue

@kelson42 kelson42 assigned CalebKL and unassigned MohitMaliFtechiz Jul 10, 2024
@MohitMaliFtechiz
Copy link
Collaborator

@CalebKL These are the full logs of the crash.

  at jdk.internal.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:252)
  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.reader.ZimReaderContainer.setZimFile (ZimReaderContainer.kt:42)
  at org.kiwix.kiwixmobile.core.main.CoreReaderFragment.openAndSetInContainer (CoreReaderFragment.kt:1622)
  at org.kiwix.kiwixmobile.core.main.CoreReaderFragment.openAndSetInContainer$default (CoreReaderFragment.kt:1603)
  at org.kiwix.kiwixmobile.core.main.CoreReaderFragment.openZimFile (CoreReaderFragment.kt:1565)
  at org.kiwix.kiwixmobile.core.main.CoreReaderFragment.openZimFile$default (CoreReaderFragment.kt:1554)
  at org.kiwix.kiwixmobile.nav.destination.reader.KiwixReaderFragment.tryOpeningZimFile (KiwixReaderFragment.kt:125)
  at org.kiwix.kiwixmobile.nav.destination.reader.KiwixReaderFragment.openPageInBookFromNavigationArguments (KiwixReaderFragment.kt:102)
  at org.kiwix.kiwixmobile.nav.destination.reader.KiwixReaderFragment.onViewCreated (KiwixReaderFragment.kt:83)
  at androidx.fragment.app.Fragment.performViewCreated (Fragment.java:3128)
  at androidx.fragment.app.FragmentStateManager.createView (FragmentStateManager.java:552)
  at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:261)
  at androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:1899)
  at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:1823)
  at androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:1760)
  at androidx.fragment.app.FragmentManager$5.run (FragmentManager.java:547)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:257)
  at android.os.Looper.loop (Looper.java:368)
  at android.app.ActivityThread.main (ActivityThread.java:8848)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:572)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1049)

@CalebKL
Copy link
Contributor

CalebKL commented Jul 12, 2024

@kelson42 The ANR on this issue is being caused by runblocking which is blocking the main thread and hence causing the crash. We have a discussion with @MohitMaliFtechiz on how to fix the bug but it involves a couple of changes and might also involve a bit of changes to the UI.
I wanted to put this down so you could know on the changes that would result in fixing this issue.

@kelson42
Copy link
Collaborator Author

@CalebKL Thank you for keeping us informed. Would you be able to wrapup here the few changes you have in mind? One assessed by @MohitMaliDeveloper you could move forward. It's one of the last issue of the current milestone.

@CalebKL
Copy link
Contributor

CalebKL commented Jul 12, 2024

We would change the CustomReaderFragment and maybe have a progress bar to show the user when they are waiting for the article to load.
I will work on the PR as soon as possible and send for review.

@kelson42
Copy link
Collaborator Author

@MohitMaliFtechiz What do you think? I don't remember us to remove the article loading progressbar?

@MohitMaliFtechiz
Copy link
Collaborator

@CalebKL We have to show the progress in CoreReaderFramgment not in CustomReaderFagment. CoreReaderFragment is the base class for both KiwixReaderFragment and CustomReaderFragment. So we have to show the progress there when the zimFIleReader creation is in progress until the creation is not completed so that user can know about what is going on.

@MohitMaliFtechiz What do you think? I don't remember us to remove the article loading progressbar?

No, we have not removed the article loading progresBar.

@CalebKL
Copy link
Contributor

CalebKL commented Jul 12, 2024

@CalebKL We have to show the progress in CoreReaderFramgment not in CustomReaderFagment. CoreReaderFragment is the base class for both KiwixReaderFragment and CustomReaderFragment. So we have to show the progress there when the zimFIleReader creation is in progress until the creation is not completed so that user can know about what is going on.

@MohitMaliFtechiz What do you think? I don't remember us to remove the article loading progressbar?

No, we have not removed the article loading progresBar.

Okay got it.

@CalebKL CalebKL linked a pull request Jul 15, 2024 that will close this issue
@kelson42 kelson42 modified the milestones: 3.12.0, 3.13.0 Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants