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

Crash loading the Download Fragment page #3949

Closed
CalebKL opened this issue Jul 19, 2024 · 1 comment · Fixed by #3953
Closed

Crash loading the Download Fragment page #3949

CalebKL opened this issue Jul 19, 2024 · 1 comment · Fixed by #3953
Assignees
Labels
Milestone

Comments

@CalebKL
Copy link
Contributor

CalebKL commented Jul 19, 2024

Describe the bug

When Loading ZimFiles on the Download fragment, it takes time and crashes. I have seen this crash only but I managed to capture the logs.
Expected behavior

It should not crash
Steps to reproduce the behavior:

  1. Fresh install the app
  2. Click on download tab
  3. As the app refreshes to fetch the files, it crashes.

Screenshots

Environment

  • Version of Kiwix Android : 3.11.1
  • Device : PIXEL 7A Api 28
  • OS version :

Logs

2024-07-19 09:52:28.807  7562-7683  AndroidRuntime          org.kiwix.kiwixmobile                E  FATAL EXCEPTION: RxCachedThreadScheduler-11
                                                                                                    Process: org.kiwix.kiwixmobile, PID: 7562
                                                                                                    io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | java.lang.OutOfMemoryError: Failed to allocate a 19896 byte allocation with 7096 free bytes and 6KB until OOM, max allowed footprint 50331648, growth limit 50331648
                                                                                                    	at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
                                                                                                    	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:69)
                                                                                                    	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
                                                                                                    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                                                                                                    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                                                                                                    	at java.lang.Thread.run(Thread.java:764)
                                                                                                    Caused by: java.lang.OutOfMemoryError: Failed to allocate a 19896 byte allocation with 7096 free bytes and 6KB until OOM, max allowed footprint 50331648, growth limit 50331648
                                                                                                    	at java.util.Arrays.copyOf(Arrays.java:3260)
                                                                                                    	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:125)
                                                                                                    	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:605)
                                                                                                    	at java.lang.StringBuilder.append(StringBuilder.java:191)
                                                                                                    	at [org.kxml2.io](http://org.kxml2.io/).KXmlParser.readValue(KXmlParser.java:1435)
                                                                                                    	at [org.kxml2.io](http://org.kxml2.io/).KXmlParser.parseStartTag(KXmlParser.java:1123)
                                                                                                    	at [org.kxml2.io](http://org.kxml2.io/).KXmlParser.next(KXmlParser.java:372)
                                                                                                    	at [org.kxml2.io](http://org.kxml2.io/).KXmlParser.next(KXmlParser.java:313)
                                                                                                    	at org.simpleframework.xml.stream.PullReader.read(PullReader.java:105)
                                                                                                    	at org.simpleframework.xml.stream.PullReader.next(PullReader.java:89)
                                                                                                    	at org.simpleframework.xml.stream.PullReader.peek(PullReader.java:72)
                                                                                                    	at org.simpleframework.xml.stream.NodeReader.readElement(NodeReader.java:160)
                                                                                                    	at org.simpleframework.xml.stream.InputElement.getNext(InputElement.java:233)
                                                                                                    	at org.simpleframework.xml.core.CompositeInlineList.read(CompositeInlineList.java:172)
                                                                                                    	at org.simpleframework.xml.core.CompositeInlineList.read(CompositeInlineList.java:124)
                                                                                                    	at org.simpleframework.xml.core.Composite.readVariable(Composite.java:623)
                                                                                                    	at org.simpleframework.xml.core.Composite.readInstance(Composite.java:573)
                                                                                                    	at org.simpleframework.xml.core.Composite.readUnion(Composite.java:549)
                                                                                                    	at org.simpleframework.xml.core.Composite.readElement(Composite.java:532)
                                                                                                    	at org.simpleframework.xml.core.Composite.readElements(Composite.java:445)
                                                                                                    	at org.simpleframework.xml.core.Composite.access$400(Composite.java:59)
                                                                                                    	at org.simpleframework.xml.core.Composite$Builder.read(Composite.java:1383)
                                                                                                    	at org.simpleframework.xml.core.Composite.read(Composite.java:201)
                                                                                                    	at org.simpleframework.xml.core.Composite.read(Composite.java:148)
                                                                                                    	at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
                                                                                                    	at org.simpleframework.xml.core.Persister.read(Persister.java:625)
                                                                                                    	at org.simpleframework.xml.core.Persister.read(Persister.java:606)
                                                                                                    	at org.simpleframework.xml.core.Persister.read(Persister.java:584)
                                                                                                    	at org.simpleframework.xml.core.Persister.read(Persister.java:562)
                                                                                                    	at retrofit2.converter.simplexml.SimpleXmlResponseBodyConverter.convert(SimpleXmlResponseBodyConverter.java:37)
                                                                                                    	at retrofit2.converter.simplexml.SimpleXmlResponseBodyConverter.convert(SimpleXmlResponseBodyConverter.java:23)
                                                                                                    	at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:243)
                                                                                                    	at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
                                                                                                    	at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46)
                                                                                                    	at io.reactivex.Observable.subscribe(Observable.java:12284)
                                                                                                    	at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
2024-07-19 09:52:28.807  7562-7683  AndroidRuntime          org.kiwix.kiwixmobile                E  	at io.reactivex.Observable.subscribe(Observable.java:12284)
                                                                                                    	at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
                                                                                                    	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:608)
                                                                                                    	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
                                                                                                    	... 6 more
2024-07-19 09:52:28.836  1659-1727  InputDispatcher         system_server                        E  channel '6819c41 org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
@kelson42 kelson42 added the bug label Jul 19, 2024
@kelson42 kelson42 added this to the 3.12.0 milestone Jul 19, 2024
@MohitMaliFtechiz
Copy link
Collaborator

@CalebKL Can you please put the emulator configuration on which you are facing this issue? We are testing this functionality in our CI emulators and there is no this type of crash. It seems your emulator does not have enough memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants