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

wikipedia_en_all_novid_2018-06.zim cannot be opened #824

Closed
ghost opened this issue Jul 28, 2018 · 7 comments
Closed

wikipedia_en_all_novid_2018-06.zim cannot be opened #824

ghost opened this issue Jul 28, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jul 28, 2018

When I try opening wikipedia_en_all_novid_2018-06.zim file, I get an error (toast) that it is not a valid ZIM file and after a while I (sometimes) get Dumping memory, app will freeze. Brrr.

* Version of kiwix: https://download.kiwix.org/nightly/2018-07-28/kiwix-android_arm-debug.apk

  • Device : Lenovo K33a42 (also known as Lenovo K6 Power)
  • OS version : 7.0

kiwix.log: logcat starting with clearing kiwix data, then opening kiwix, going to content and opening wikipedia file.
In.txt export from Leaks app. Possibly for a different run.

@mhutti1
Copy link
Contributor

mhutti1 commented Jul 29, 2018

07-29 00:11:28.740 16521 16521 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes()' on a null object reference
07-29 00:11:28.752 16521 16521 W System.err: 	at android.util.Base64.decode(Base64.java:118)
07-29 00:11:28.752 16521 16521 W System.err: 	at org.kiwix.kiwixmobile.library.LibraryAdapter.createBitmapFromEncodedString(LibraryAdapter.java:396)
07-29 00:11:28.753 16521 16521 W System.err: 	at org.kiwix.kiwixmobile.zim_manager.fileselect_view.ZimFileSelectFragment$RescanDataAdapter.getView(ZimFileSelectFragment.java:359)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.AbsListView.obtainView(AbsListView.java:2367)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.ListView.makeAndAddView(ListView.java:1972)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.ListView.fillDown(ListView.java:704)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.ListView.fillFromTop(ListView.java:765)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.ListView.layoutChildren(ListView.java:1744)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.AbsListView.onLayout(AbsListView.java:2161)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:611)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.753 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1769)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:132)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1361)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:874)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.754 16521 16521 W System.err: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
07-29 00:11:28.755 16521 16521 W System.err: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
07-29 00:11:28.755 16521 16521 W System.err: 	at com.android.internal.policy.DecorView.onLayout(DecorView.java:724)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.View.layout(View.java:17523)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.ViewGroup.layout(ViewGroup.java:5618)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2374)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2101)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1278)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6357)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.Choreographer.doCallbacks(Choreographer.java:683)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.Choreographer.doFrame(Choreographer.java:619)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.os.Handler.handleCallback(Handler.java:751)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.os.Looper.loop(Looper.java:154)
07-29 00:11:28.756 16521 16521 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
07-29 00:11:28.756 16521 16521 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
07-29 00:11:28.756 16521 16521 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
07-29 00:11:28.757 16521 16521 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Might be the issue.

@Stevko-sk I think I have also had this issue. If you restart the app and try again does it work?

@ghost
Copy link
Author

ghost commented Jul 29, 2018

I force closed kiwix and then did the following:

  1. Run kiwix from the launcher
  2. Go to menu→Get Content
  3. Click on Wikipedia
    It „opened“: Title changed to Wikipedia, I did not get any visible error. The space with article was completely empty (white).
  4. Search for an article (click on magnifiing glass, write europe). No results were shown.
  5. Go back to empty article (clicking on back arrow in top letft corner)
  6. Try opening Random article (menu→random article). No change in article space. (I think I tried it twice and then also tried Menu→Home)
  7. Go to Menu→Get content.
  8. Click on Wikipedia
    Toast with message that it is not valid ZIM file is shown.

Log for these actions:
kiwix2.log

I have no problems with Rational Wiki, WikEM and Wikivoyage files (I can open then, switch between them, search for articles).
I have a problem with Wiktionary file. When I restart kiwix (after force quit), I can open it and browse and search for articles. If I then go to the library and try opening it again, I get toast that it is invalid file.

@mhutti1
Copy link
Contributor

mhutti1 commented Jul 29, 2018

@Stevko-sk Ok this is an error we are seeing in a few cases. Could I ask if your file is chunked and if so how big are the chunks?

@ghost
Copy link
Author

ghost commented Jul 29, 2018

All the files I have are full size:

$ ls -l                                                                                                              
total 172405248
-rwxrwx--x 1 root sdcard_rw   116756230 2018-07-17 18:09 rationalwiki_en_all_2018-07.zim
-rwxrwx--x 1 root sdcard_rw    38726260 2018-07-17 18:09 wikem_en_all_2018-07.zim
-rwxrwx--x 1 root sdcard_rw 82927821201 2018-07-23 13:23 wikipedia_en_all_novid_2018-06.zim
-rwxrwx--x 1 root sdcard_rw   779539154 2018-07-17 18:08 wikivoyage_en_all_2018-07.zim
-rwxrwx--x 1 root sdcard_rw  4408344149 2018-07-17 18:07 wiktionary_en_all_novid_2018-06.zim

@mhutti1
Copy link
Contributor

mhutti1 commented Jul 29, 2018

Ok thanks for that information, we can now rule out chunking being the cause of this issue and will hopefully produce a fix soon.

@ghost
Copy link
Author

ghost commented Aug 1, 2018

http://download.kiwix.org/nightly/2018-08-01/ fixed this (as indicated in kiwix-lib/issues/162. I can open wikipedia zim (and switch between zim files), search for articles and display them.
I think this can be closed.

@mhutti1
Copy link
Contributor

mhutti1 commented Aug 1, 2018

@Stevko-sk again I can't thank you enough for the help. 👍

@mhutti1 mhutti1 closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants