kodjodevf / mangayomi

Free and open source application for reading manga, watching anime and streaming torrent available on Android, iOS, macOS, Linux and Windows
Apache License 2.0
1.58k stars 83 forks source link

[Android] App crashes after reading for a while #226

Open mumiby opened 3 months ago

mumiby commented 3 months ago

Steps to reproduce

  1. Open the app
  2. Start reading an manhwa or webtoon in webtoon scrolling mode
  3. After some chapters the app crashes/force closes while scrolling

Expected behavior

The app should keep working without problems

Actual behavior

Instead the app force closes/crashes without saving the page you were reading. You have to open the app again and scroll to the page. (Annoying for long chapters)

Mangayomi version

Mangayomi Beta 0.2.7

Device

Xiaomi Mi 11X on PixelOS 14 (Android 14)

Other details

Acknowledgements

mumiby commented 3 months ago

I tried logcat with Logfox while isolating Mangayomi Here what I got in the crash log: FATAL EXCEPTION: CronetInit Process: com.kodjodevf.mangayomi, PID: 14414 m.he: Native stack trace: at org.chromium.base.JniAndroid.handleException(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):10) at J.N.M6Dz0nZ5(Native Method) at m.lw.run(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):10) at android.os.Handler.handleCallback(Handler.java:959) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.os.HandlerThread.run(HandlerThread.java:68) Caused by: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 14414, callerPackage: com.kodjodevf.mangayomi at android.os.Parcel.createExceptionOrNull(Parcel.java:3190) at android.os.Parcel.createException(Parcel.java:3166) at android.os.Parcel.readException(Parcel.java:3149) at android.os.Parcel.readException(Parcel.java:3091) at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5819) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1853) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1800) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:775) at m.gy.c(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):7) at m.gy.a(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):2) at org.chromium.net.ProxyChangeListener.start(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):56) ... 7 more Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14417) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2633) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2804) at android.os.Binder.execTransactInternal(Binder.java:1496) at android.os.Binder.execTransact(Binder.java:1440)

phamduyphat commented 3 months ago

can you set your preloaded pages to 4 pages. You should be able to set it in the settings page. On my iphone X after scrolling through the search for a while ram usage would spike to nearly 1GB which causes the app to crash when I open any manga and/or load high resolution mangas.

mumiby commented 3 months ago

@phamduyphat The crashes still happens randomly. Is there something in the crash log I posted earlier that may point to the specific issue? I'm not a dev so I don't know how to read and understand a logcat.

mumiby commented 3 months ago

Update : it still happens on Mangayomi v0.2.75

phamduyphat commented 3 months ago

can you tell us what sources were the mangas from? From the logs it seems like Android is forcefully shutting down the app because it has too many "instances" downloading files Also try reading from a different source to see if it resolves by itself like mangadex or bato.to

mumiby commented 3 months ago

I use Mangakakalot source. I'm in the process of transferring my library from Tachiyomi and since the backup and restore option didn't work between platform, I have to do that one by one and most of it is from Mangakakalot source. The "migrate" option would have helped greatly for changing sources. About those "multiples instances", I think it has to do with the policies of the download manager. Trying to download a whole manhwa (~50 chapters) for offline reading, I expected the chapters to.download.one after another or at most 2 at a time (like in OG Tachiyomi) instead the whole 50 chapters are downloading at the same time. Eventually some fail and the download stops for the rest of the chapters. I didn't report about that since it is still a beta after all.

phamduyphat commented 3 months ago

For the backup and restore thing not working, you can force install ver 0.1.75 to restore and then update to the latest version for convenience sake.

phamduyphat commented 3 months ago

I use Mangakakalot source

Wait a minute, I think it got shutdown like 2 years ago, though the site doesn't return a 404 or 403 but a message so maybe i got region blocked?

phamduyphat commented 3 months ago

ok got my self a vpn and tested it out. Replicatable on my iphone. Ram usage spiked at 1.3GB before crashing. Seems like it's extension specific so you should try another source to read from. Most likely it's just that the images are stored and not cleared when out of sight, never had i experienced it on mangadex or bato so maybe you should try those out.

mumiby commented 3 months ago

Thanks for quick response. I'll try other sources for now and see if it happens again. If not then it is in fact bad cache/ram management from the extension and I'll report it to the extension repository page. And then close this thread

mumiby commented 3 months ago

Unfortunately, the issue's still there although it took way more time reading to manifest itself. And I managed to get more info from the logcat some E lines before the Fatal Exception:

1721311712.453 10277 15767 15767 D VRI[MainActivity]: applyTransactionOnDraw applyImmediately 1721311712.460 10277 15767 15767 D VRI[MainActivity]: applyTransactionOnDraw applyImmediately 1721311712.472 10277 15767 15767 D VRI[MainActivity]: Start draw after previous draw not visible 1721311730.453 10277 15767 15767 W Choreographer: Frame time is 0.099791 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase. 1721311837.716 10277 15767 15767 E FrameTracker: force finish cuj, time out: JIME_INSETS_HIDE_ANIMATION::1@1@com.kodjodevf.mangayomi 1721311840.247 10277 15767 15767 W Choreographer: Frame time is 0.17036399 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase. 1721311854.384 10277 15767 15767 W Choreographer: Frame time is 0.196874 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase. 1721312025.585 10277 15767 15806 E chromium: [0718/151345.585493:ERROR:jni_android.cc(158)] Crashing due to uncaught Java exception 1721312025.591 10277 15767 15806 E chromium: [0718/151345.591394:ERROR:jni_android.cc(202)] Native stack trace: 1721312025.592 10277 15767 15806 E cr_JniAndroid: Handling uncaught Java exception 1721312025.592 10277 15767 15806 E cr_JniAndroid: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 15767, callerPackage: com.kodjodevf.mangayomi 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Parcel.createExceptionOrNull(Parcel.java:3190) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Parcel.createException(Parcel.java:3166) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Parcel.readException(Parcel.java:3149) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Parcel.readException(Parcel.java:3091) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5819) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1853) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.app.ContextImpl.registerReceiver(ContextImpl.java:1800) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:775) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at m.gy.c(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):7) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at m.gy.a(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):2) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at org.chromium.net.ProxyChangeListener.start(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):56) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at J.N.M6Dz0nZ5(Native Method) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at m.lw.run(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):10) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Handler.handleCallback(Handler.java:959) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Handler.dispatchMessage(Handler.java:100) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Looper.loopOnce(Looper.java:232) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Looper.loop(Looper.java:317) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.HandlerThread.run(HandlerThread.java:68) 1721312025.592 10277 15767 15806 E cr_JniAndroid: Caused by: android.os.RemoteException: Remote stack trace: 1721312025.592 10277 15767 15806 E cr_JniAndroid: at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14417) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2633) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2804) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Binder.execTransactInternal(Binder.java:1496) 1721312025.592 10277 15767 15806 E cr_JniAndroid: at android.os.Binder.execTransact(Binder.java:1440) 1721312025.592 10277 15767 15806 E AndroidRuntime: FATAL EXCEPTION: CronetInit 1721312025.592 10277 15767 15806 E AndroidRuntime: Process: com.kodjodevf.mangayomi, PID: 15767 1721312025.592 10277 15767 15806 E AndroidRuntime: m.he: Native stack trace: 1721312025.592 10277 15767 15806 E AndroidRuntime: at org.chromium.base.JniAndroid.handleException(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):10) 1721312025.592 10277 15767 15806 E AndroidRuntime: at J.N.M6Dz0nZ5(Native Method) 1721312025.592 10277 15767 15806 E AndroidRuntime: at m.lw.run(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):10) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:959) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:232) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Looper.loop(Looper.java:317) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:68) 1721312025.592 10277 15767 15806 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 15767, callerPackage: com.kodjodevf.mangayomi 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3190) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3166) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3149) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3091) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5819) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1853) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.app.ContextImpl.registerReceiver(ContextImpl.java:1800) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:775) 1721312025.592 10277 15767 15806 E AndroidRuntime: at m.gy.c(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):7) 1721312025.592 10277 15767 15806 E AndroidRuntime: at m.gy.a(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):2) 1721312025.592 10277 15767 15806 E AndroidRuntime: at org.chromium.net.ProxyChangeListener.start(:com.google.android.gms.dynamite_cronetdynamite@242632038@24.26.32 (190400-0):56) 1721312025.592 10277 15767 15806 E AndroidRuntime: ... 7 more 1721312025.592 10277 15767 15806 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace: 1721312025.592 10277 15767 15806 E AndroidRuntime: at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14417) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2633) 1721312025.592 10277 15767 15806 E AndroidRuntime: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2804) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Binder.execTransactInternal(Binder.java:1496) 1721312025.592 10277 15767 15806 E AndroidRuntime: at android.os.Binder.execTransact(Binder.java:1440) 1721312025.598 10277 15767 15806 I Process : Sending signal. PID: 15767 SIG: 9

Sorry I should have send it in .txt file

mumiby commented 2 months ago

Sorry for insisting, I really wish that app to get better. The app keep crashing randomly while reading/scrolling but this time I had the same crash log for downloading multiple chapters + one different crash log. It did it twice while downloading (for offline reading) the different crash log (crash log B.txt) displayed an app crash message from the system. crash log A.txt crash log B.txt

phamduyphat commented 2 months ago

Can you test out version 0.2.25 and 0.1.75 to see if the issue persists. Try to reset your network configurations and disable all vpns as well. I don't have an up to date android phone so I'm just shooting blind tbh.

mumiby commented 2 months ago

At this point, I just gave up. I'll use the app only as my go-to for anime for the time being since I don't have time rn (high season at work). Weirdly it never crashed while watching anime only some extension issue (403 error and more). The manga reader is usable but buggy (extensions issues, page not loading or straight-up crash). I don't use VPN but I use an ad-blocking DNS (on the OS level not an app) and never had issues on either Tachiyomi nor Mihon. Do you think it's what cause those issues? I didn't forget that this is a beta version so I'll keep waiting for improvement. Nevertheless I'll report in two weeks from now. Have a great day/night.