Coder Social home page Coder Social logo

kiwix / java-libkiwix Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 4.0 1.5 MB

Libkiwix binding for Java & Kotlin

Home Page: https://central.sonatype.com/artifact/org.kiwix/libkiwix

License: GNU General Public License v3.0

C++ 40.31% Java 56.73% Shell 0.92% HTML 0.11% CMake 1.92%
java kiwix kotlin zim libkiwix

java-libkiwix's Introduction

Libkiwix binding for Java/Kotlin

Library for accessing libkiwix and libzim with Java or Kotlin on Android.

Maven Central Build Status Continuous Deployment CodeFactor Codecov License: GPL v3

Build

Install dependencies

./install_deps.sh

Compile

./gradlew buildHeaders
./gradlew build

AAR file will be generated in directory lib/build/outputs/aar

Use the library in your project

First, locate the compiled/generated lib-debug.aar in the lib/build/outputs/aar directory. Then open your project's Gradle configuration file and import the .aar file as a dependency.

If you are using Kotlin for your Gradle file, add the following code snippet:

dependencies {
    implementation(files("path-of-aar-file/lib-debug.aar"))
}

If you are using Groovy for your Gradle file, use this code snippet:

dependencies {
    implementation files("path-to-your-aar-file/lib-debug.aar")
}

Load ZIM file

To load a ZIM file you need to create an Archive object.

val archive = Archive("your-file-path")

Load ZIM main page

The mainPage property is used to retrieve the path of the main entry page for a Kiwix content archive. If the main entry is a redirect, it will fetch the path of the redirected item; otherwise, it will return the path of the main entry itself. If the main entry is not found, the archive will throw an EntryNotFoundException.

val mainPage: String?
    get() =
        try {
            archive.mainEntry.getItem(true).path
        } catch (entryNotFoundException: EntryNotFoundException) {
            // Return `null` if the main entry is not present in the archive.
            null
        } catch (exception: Exception) {
            // Other exception will thrown here e.g. the file is corrupted or any other error happened.
            null
        }

Load a ZIM article via title

    try {
        // If the article with the specified title exists in the archive,
        // retrieve its path using the `getEntryByTitle` method.
        archive.getEntryByTitle(title).path
    } catch (entryNotFoundException: EntryNotFoundException) {
        // If the article with the specified title does not exist in the archive,
        // return `null`.
        null
    }

Load a ZIM article via path

Ensure that the URL path is properly decode before passing it to hasEntryByPath, as Libzim does not support encoded URLs.

    val decodedPath = URLDecoder.decode(actualpath, "UTF-8")
    try {
        // If the article with the specified URL exists in the archive,
        // retrieve its actual path using the `getEntryByPath` method.
        archive.getEntryByPath(decodedPath)
            .getItem(true)
            .path
    } catch (entryNotFoundException: EntryNotFoundException) {
        // If the article with the specified URL does not exist in the archive,
        // return `null`.
        null
    }

License

GPLv3 or later, see COPYING for more details.

java-libkiwix's People

Contributors

kelson42 avatar macgills avatar mgautierfr avatar mohitmalideveloper avatar rgaudin avatar veloman-yunkan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

java-libkiwix's Issues

Release 2.0.0

  • Secure the CI is green on git main
  • Update the Changelog
  • Check if this new release use latest version of libkiwix and libzim
  • Update version
  • Close current milestone and create new one incrementaly (a priori a minor version)
  • Create a tag on git
  • Secure new version is published on Maven Central
  • Update the Github release with the Changelog
  • Create new empty entry in Changelog (placeholder for future entries)
  • Advertise this new version

Reorganise the gradle build script

With PR #27 merged we have now working build system and test.

However, the internal structure of the gradle build system is not perfect. For now we have :

  • target generateHeaderFilesFromJavaWrapper which generate the headers from the java class definition
  • target build which build the jni wrapper. It use the generated header but it doesn't have a dependency to generateHeaderFilesFromJavaWrapper.
  • target createCodeCoverageReport which create the test "binary", run it and then generate the code coverage report. But it create the test binary by recompiling the source of the jni wrapper inside itself.

It would be better to have:

  • target generateHeaders which generate the headers from the java class definition
  • target build which build the jni wrapper. As it needs the generated header, it depends of generateHeaders wrapper.
  • target buildTest which build the test binary. As it need to use the created jni wrapper (as if it was a simple user of the wrapper), it depends of build target.
  • target test which run the test binary. It depends of buildTest target.
  • target createCodeCoverageReport which depends of test target.

Upload a "dev" version to Maven Central

Developers using java-libkiwix can only use the official releases of the library... or compile it themselves... which is a bitcumbersome.

This is is in particular true for kiwix-android devs.
.

Would really ease the integration work around java-libkiwix to publish for each commit, a "dev" version on Maven Central.

Maven publication required some environment variables set on Github Action CI .

We have to set some environment variables for publication task.

 i) OSSRH_USERNAME = this is MavenCentral user name.
 ii) OSSRH_PASSWORD  = this is MavenCentral password.
 iii) SIGNING_KEY_ID = the ID of the GPG key pair, the last eight characters of its fingerprint.
 iv) SIGNING_PASSWORD = the passphrase password of the key pair.
 v) SIGNING_KEY = the base64 encoded private key.
 vi) SONATYPE_STAGING_PROFILE_ID = this is sonatype stagging profile id we can get it from MavenCentral account.

`Archive.getFilesize()` returning the wrong file size

We are encountering an issue with the getFilesize() method in the Archive, as it is returning an incorrect file size. Let's consider an example: the file 100r-off-the-grid_en_2023-07.zim should be 145.6 MB (or 149106 KiB), but when we retrieve the file size using Archive.getFilesize(), it returns 152684582 KiB, which is equivalent to 152684.582 MB.

To confirm this problem, we have a test case in our code repository at https://github.com/kiwix/java-libkiwix/blob/2f951febf31e52886457f521d10db3c78eec1db4/lib/src/test/test.java#L63C52-L63C52

assertEquals(66937, archive.getFilesize()); // The file size is in KiB

However, the expected file size of 66.937 MB is incorrect. In reality, the file size is 65.4 KB, as shown in the image below:

Screenshot from 2023-07-14 19-03-15

Server is crashing while opens on web browser.

We have refactored the kiwix-android code to support the latest java-libkiwix wrapper. All the other functionality are working fine with the changes of the newest wrapper, but there is a problem with the Kiwix server.
The server starts normally from the application, there is no error but when we try to open the URL(server) in the web browser then it is crashing with these error logs.

Logs:

pid: 16875, tid: 17087, name: MHD-single  >>> org.kiwix.kiwixmobile <<<
#04 pc 0000000000091b6c  /data/app/~~agmIistDXIVViCCvMzpIZw==/org.kiwix.kiwixmobile-_OPuxj8AMgZ6OUuAVYejaA==/base.apk!libc++_shared.so (std::__ndk1::mutex::lock()+8) (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
#05 pc 0000000000176b84  /data/app/~~agmIistDXIVViCCvMzpIZw==/org.kiwix.kiwixmobile-_OPuxj8AMgZ6OUuAVYejaA==/base.apk!libkiwix.so (kiwix::Library::getRevision() const+16)
#06 pc 00000000001c3ebc  /data/app/~~agmIistDXIVViCCvMzpIZw==/org.kiwix.kiwixmobile-_OPuxj8AMgZ6OUuAVYejaA==/base.apk!libkiwix.so (kiwix::InternalServer::getLibraryId() const+48)
#07 pc 00000000001c337c  /data/app/~~agmIistDXIVViCCvMzpIZw==/org.kiwix.kiwixmobile-_OPuxj8AMgZ6OUuAVYejaA==/base.apk!libkiwix.so (kiwix::InternalServer::handle_request(kiwix::RequestContext const&)+60)
#08 pc 00000000001c303c  /data/app/~~agmIistDXIVViCCvMzpIZw==/org.kiwix.kiwixmobile-_OPuxj8AMgZ6OUuAVYejaA==/base.apk!libkiwix.so (kiwix::InternalServer::handlerCallback(MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**)+796)
#09 pc 00000000004e8740  /data/app/~~agmIistDXIVViCCvMzpIZw==/org.kiwix.kiwixmobile-_OPuxj8AMgZ6OUuAVYejaA==/base.apk!libkiwix.so

Version: latest main branch

Improve README.md

It should better include:

  • A badge to latest CI run
  • An stub example how to use the library

Prepare/Release version 1.0.0 of org.kiwix.libkiwix

  • Secure the CI is green on git main
  • Update the Changelog
  • Check if this new release use latest version of libkiwix and libzim
  • Update version
  • Close current milestone and create new one incrementaly (a priori a minor version)
  • Create a tag on git
  • Secure new version is published on Maven Central
  • Update the Github release with the Changelog
  • Create new empty entry in Changelog (placeholder for future entries)
  • Advertise this new version

Release 1.0.1

  • Secure the CI is green on git main
  • Update the Changelog
  • Check if this new release use latest version of libkiwix and libzim
  • Update version
  • Close current milestone and create new one incrementaly (a priori a minor version)
  • Create a tag on git
  • Secure new version is published on Maven Central
  • Update the Github release with the Changelog
  • Create new empty entry in Changelog (placeholder for future entries)
  • Advertise this new version

`Library.getBookmark()` throwing error on Android 7 when it have 513 bookmarks in it.

Describe the bug

The Library.getBookmark() method returns all the bookmarks that we have saved in the library. However, when there is 513 bookmarks in it and we call this method to get the bookmarks it crashes the process on Android 7(API level 24) since this API has the limitation of a local reference table of 512. We do not have any method available in Library that can return the requested number of bookmarks from Library to avoid this type of potential error e.g. Library.getBookmark(count).

https://github.com/kiwix/libkiwix/blob/9c5f5c7be083dfe5b184f8dae9b8a9183a3d1d20/src/library.cpp#L379

art/runtime/indirect_reference_table.cc:116] JNI ERROR (app bug): local reference table overflow (max=512)
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116] local reference table dump:
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]   Last 10 entries (of 512):
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       511: 0x136e5530 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       510: 0x136e5520 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       509: 0x136e5510 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       508: 0x136e5500 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       507: 0x136e54f0 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       506: 0x136e54e0 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       505: 0x136e54d0 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       504: 0x136e54c0 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       503: 0x136e54b0 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       502: 0x136e54a0 org.kiwix.libkiwix.Bookmark
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]   Summary:
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]         1 of android.app.Instrumentation$InstrumentationThread
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]       507 of org.kiwix.libkiwix.Bookmark (507 unique instances)
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]         1 of org.kiwix.libkiwix.Bookmark[] (1000 elements)
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116]         3 of java.lang.Class (2 unique instances)
2024-01-16 14:42:58.291 10521-10566 art                     pid-10521                            A  art/runtime/indirect_reference_table.cc:116] 
2024-01-16 14:42:58.298 10521-10521 AppCompatViewInflater   pid-10521                            I  app:theme is now deprecated. Please move to using android:theme instead.
2024-01-16 14:42:58.308  1676-1708  WindowManager           pid-1676                             I  Destroying surface Surface(name=Starting org.kiwix.kiwixmobile) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:491 com.android.server.wm.WindowAnimator.updateWindowsLocked:303 com.android.server.wm.WindowAnimator.animateLocked:704 
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403] Runtime aborting...
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403] Aborting thread:
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403] "Instr: androidx.test.runner.AndroidJUnitRunner" prio=10 tid=34 Runnable
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   | group="" sCount=0 dsCount=0 obj=0x12d5af70 self=0x767ca1d76600
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   | sysTid=10566 nice=-8 cgrp=default sched=0/0 handle=0x767c4ae0c450
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   | state=R schedstat=( 0 0 0 ) utm=3 stm=0 core=3 HZ=100
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   | stack=0x767c4ad0a000-0x767c4ad0c000 stackSize=1037KB
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   | held mutexes= "abort lock" "mutator lock"(shared held)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: #00 pc 000000000052c4ee  /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+238)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#1 pc 00000000004fd45c  /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+412)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#2 pc 00000000004ea43b  /system/lib64/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+43)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#3 pc 00000000004ea1a2  /system/lib64/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+274)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#4 pc 00000000004dd19d  /system/lib64/libart.so (_ZN3art7Runtime5AbortEv+125)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#5 pc 000000000014bda8  /system/lib64/libart.so (_ZN3art10LogMessageD1Ev+1240)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#6 pc 00000000002ca370  /system/lib64/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+304)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#7 pc 0000000000293c9e  /system/lib64/libart.so (_ZN3art2gc4Heap21AddFinalizerReferenceEPNS_6ThreadEPPNS_6mirror6ObjectE+606)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#8 pc 000000000018b287  /system/lib64/libart.so (_ZN3art6mirror5Class11AllocObjectEPNS_6ThreadE+1111)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#9 pc 00000000003bdeb8  /system/lib64/libart.so (_ZN3art3JNI10NewObjectVEP7_JNIEnvP7_jclassP10_jmethodIDP13__va_list_tag+872)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#10 pc 000000000015c3c2  /system/lib64/libart.so (_ZN3art8CheckJNI10NewObjectVEP7_JNIEnvP7_jclassP10_jmethodIDP13__va_list_tag+994)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#11 pc 000000000000d0e9  /data/app/org.kiwix.kiwixmobile-2/base.apk (???)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#12 pc 0000000000015013  /data/app/org.kiwix.kiwixmobile-2/base.apk (???)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#13 pc 0000000000141b61  /system/lib64/libart.so (art_quick_generic_jni_trampoline+209)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#14 pc 0000000000137234  /system/lib64/libart.so (art_quick_invoke_stub+756)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#15 pc 0000000000145447  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+231)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#16 pc 0000000000310b7f  /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+255)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#17 pc 000000000030908d  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#18 pc 0000000000616452  /system/lib64/libart.so (MterpInvokeVirtual+658)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#19 pc 0000000000128919  /system/lib64/libart.so (artMterpAsmInstructionStart+14105)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#20 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#21 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#22 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#23 pc 0000000000617982  /system/lib64/libart.so (MterpInvokeDirect+418)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#24 pc 0000000000128a19  /system/lib64/libart.so (artMterpAsmInstructionStart+14361)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#25 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#26 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#27 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#28 pc 0000000000617d9a  /system/lib64/libart.so (MterpInvokeStatic+362)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#29 pc 0000000000128a99  /system/lib64/libart.so (artMterpAsmInstructionStart+14489)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#30 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#31 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#32 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#33 pc 0000000000616452  /system/lib64/libart.so (MterpInvokeVirtual+658)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#34 pc 0000000000128919  /system/lib64/libart.so (artMterpAsmInstructionStart+14105)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#35 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#36 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#37 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#38 pc 00000000006176c3  /system/lib64/libart.so (MterpInvokeInterface+1283)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#39 pc 0000000000128b19  /system/lib64/libart.so (artMterpAsmInstructionStart+14617)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#40 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#41 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#42 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#43 pc 00000000006176c3  /system/lib64/libart.so (MterpInvokeInterface+1283)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#44 pc 0000000000128b19  /system/lib64/libart.so (artMterpAsmInstructionStart+14617)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#45 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#46 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#47 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#48 pc 0000000000617982  /system/lib64/libart.so (MterpInvokeDirect+418)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#49 pc 0000000000128a19  /system/lib64/libart.so (artMterpAsmInstructionStart+14361)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#50 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#51 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#52 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#53 pc 0000000000617d9a  /system/lib64/libart.so (MterpInvokeStatic+362)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#54 pc 0000000000128a99  /system/lib64/libart.so (artMterpAsmInstructionStart+14489)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#55 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#56 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#57 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#58 pc 0000000000617d9a  /system/lib64/libart.so (MterpInvokeStatic+362)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#59 pc 0000000000128a99  /system/lib64/libart.so (artMterpAsmInstructionStart+14489)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#60 pc 00000000002e1059  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+409)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#61 pc 00000000002e734c  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+172)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#62 pc 0000000000309072  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+738)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   native: kiwix/libkiwix#63 pc 00000000006176c3  /system/lib64/libart.so (MterpInvokeInterface+1283)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  art/runtime/runtime.cc:403]   at org.kiwix.libkiwix.Library.getBookmarks(Native method)
2024-01-16 14:42:58.354 10521-10566 art                     pid-10521                            A  

Solutation you suggest

@mgautierfr can you please have a look at this issue?

Libkiwix is not working below `Android 7.0`

Libkiwix is not working with Android 7(Api level 24) and below. However, our minimum SDK is 21 in java-libkiwix as well as in kiwix-android.

Apart from this, in Android 7 and above the libkiwix is working fine so it might be some compatibility issue with the older version of android.

Logs:

Android 21, Android 22


  E  dlopen("/data/app/org.kiwix.kiwixmobile-1/lib/x86_64/libkiwix.so", RTLD_LAZY) failed: dlopen failed: empty/missing DT_HASH in "/data/app/org.kiwix.kiwixmobile-1/lib/x86_64/libkiwix.so" (built with --hash-style=gnu?)
2023-07-27 12:53:12.044  2814-2814  art                     pid-2814                             E  dlopen("/data/data/org.kiwix.kiwixmobile/app_lib/libkiwix.so", RTLD_LAZY) failed: dlopen failed: empty/missing DT_HASH in "/data/data/org.kiwix.kiwixmobile/app_lib/libkiwix.so" (built with --hash-style=gnu?)
--------- beginning of crash
E  FATAL EXCEPTION: main
Process: org.kiwix.kiwixmobile, PID: 2814
java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "/data/data/org.kiwix.kiwixmobile/app_lib/libkiwix.so" (built with --hash-style=gnu?)
at java.lang.Runtime.load(Runtime.java:331)
at java.lang.System.load(System.java:981)
at com.getkeepsafe.relinker.SystemLibraryLoader.loadPath(SystemLibraryLoader.java:31)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:206)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
at org.kiwix.libkiwix.JNIKiwix.<init>(JNIKiwix.java:30)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule.providesJNIKiwix(JNIModule.kt:29)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule_ProvidesJNIKiwixFactory.providesJNIKiwix(JNIModule_ProvidesJNIKiwixFactory.java:45)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule_ProvidesJNIKiwixFactory.get(JNIModule_ProvidesJNIKiwixFactory.java:36)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule_ProvidesJNIKiwixFactory.get(JNIModule_ProvidesJNIKiwixFactory.java:13)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.jNIInitialiser(DaggerCoreComponent.java:528)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.injectCoreApp(DaggerCoreComponent.java:734)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.inject(DaggerCoreComponent.java:699)
                                                                                                    	at org.kiwix.kiwixmobile.core.CoreApp.onCreate(CoreApp.kt:81)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)


Android 23

 FATAL EXCEPTION: main
Process: org.kiwix.kiwixmobile, PID: 3192
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__write_chk" referenced by "/data/data/org.kiwix.kiwixmobile/app_lib/libkiwix.so"...
at java.lang.Runtime.load(Runtime.java:332)
at java.lang.System.load(System.java:1069)
at com.getkeepsafe.relinker.SystemLibraryLoader.loadPath(SystemLibraryLoader.java:31)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:206)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
at org.kiwix.libkiwix.JNIKiwix.<init>(JNIKiwix.java:30)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule.providesJNIKiwix(JNIModule.kt:29)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule_ProvidesJNIKiwixFactory.providesJNIKiwix(JNIModule_ProvidesJNIKiwixFactory.java:45)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule_ProvidesJNIKiwixFactory.get(JNIModule_ProvidesJNIKiwixFactory.java:36)
at org.kiwix.kiwixmobile.core.di.modules.JNIModule_ProvidesJNIKiwixFactory.get(JNIModule_ProvidesJNIKiwixFactory.java:13)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.jNIInitialiser(DaggerCoreComponent.java:528)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.injectCoreApp(DaggerCoreComponent.java:734)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.inject(DaggerCoreComponent.java:699)
at org.kiwix.kiwixmobile.core.CoreApp.onCreate(CoreApp.kt:81)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

`Manager` is unable to read the bookmarks from file.

Manager is unable to read the bookmarks from the file if we have not added the book to the library for which book we have saved the bookmarks in that file.

e.g. First I added two books to the library and saved some bookmarks to a file and after that, I closed the application, now I reopened the application and tried to load the bookmarks from that file but it did not read any bookmarks from this file, and return nothing, but if I again add same book to the library then it starts reading the bookmarks from that file for this added book but still not reading the other bookmarks which we had saved for other books. But here it should read all the bookmarks from the file without adding the book to the library as bookmarks are independent.

Steps to reproduce the behavior

  • Add a book to the library.
  • Try to save the bookmark in the library.
  • Save the bookmarks in a file.
  • Create a new library and manager objects.
  • Try to read the bookmarks from the saved file.
  • You will see it is unable to read the bookmarks from that file.

you can add these test cases in the test.java class for testing, create a bookmark.txt file inside test package add these bookmarks to that file, and run the test cases.

<bookmarks>
  <bookmark>
    <book>
      <id>8a3066ca-b324-b8ef-3e70-ef944b1a22a3</id>
      <title>Alpine Linux Wiki</title>
      <language>eng</language>
      <date>2022-10-17</date>
    </book>
    <title>Alpine Linux Wiki</title>
    <url>https://bookmarkurl.com/</url>
  </bookmark>
</bookmarks>
 @Test
    public void testSavedBookMarks() throws Exception, ZimFileFormatException, JNIKiwixException {
        TestLibrary lib = new TestLibrary();
        TestManager manager = new TestManager(lib);
        boolean isReaded = manager.readBookmarkFile("bookmark.txt");
        assertEquals(true, isReaded);
        TestBookmark[] bookmarkArray = lib.getBookmarks(true);
        assertEquals(1, bookmarkArray.length);
    }

Improve CD: Pinned/Synced/Fixed Libkiwix dependency

We just released java-libkiwix on maven with version code 11.0.0. However, the libkiwix and libzim are 12.0.0 so it should be published with the version code 12.0.0, but we have published it with the 11.0.0 tag which is not ideal and, manually changing the version code every time before release is not a good idea. So we should automate this process.

Behaviour
It should automatically set the library version as libkiwix and libzim have.

`Illustration.getData()` does not provide the `Illustration` for book.

We have an functionality to writing/reading library in a file.

public native boolean writeToFile(String path);

public native boolean readFile(String path);

The library has the book objects and it has an illustration for the book, but when I try to get the Illustration.getData() from the book object it is giving an error.

pid: 19731, tid: 19772, name: RxCachedThreadS  >>> org.kiwix.kiwixmobile <<<
A        #10 pc 000000000001f0f4  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/base.apk!libkiwix_wrapper.so (Java_org_kiwix_libkiwix_Illustration_getData+156) (BuildId: d509aa2e940c165a50d156c0469c5234d4108a96)
A        #17 pc 0000000000009e46  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.getBookmarksList+538)
A        #23 pc 0000000000009a7a  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.access$getBookmarksList+18)
A        #26 pc 0000000000008fd0  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks$bookmarkListBehaviour$2.invoke+12)
A        #32 pc 0000000000009000  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks$bookmarkListBehaviour$2.invoke+8)
A        #37 pc 000000000078369a  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (kotlin.SynchronizedLazyImpl.getValue+80)
A        #43 pc 0000000000009924  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.getBookmarkListBehaviour+12)
A        #49 pc 000000000000a8c6  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.flowableBookmarkList$lambda-19+38)
A        #52 pc 000000000000a2d8  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.$r8$lambda$cGKTklQTmUYsuOCbDLX4HqreYBg+0)
A        #55 pc 0000000000008dc8  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks$$ExternalSyntheticLambda4.subscribe+4)
A        #60 pc 00000000006dff4e  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual+146)
A        #65 pc 00000000006b5f66  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.Flowable.subscribe+62)
A        #70 pc 00000000006f0eb8  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual+78)
2023-11-03 18:48:49.336 19925-19925 DEBUG                   pid-19925                           pid: 19731, tid: 19772, name: RxCachedThreadS  >>> org.kiwix.kiwixmobile <<<
A        #10 pc 000000000001f0f4  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/base.apk!libkiwix_wrapper.so (Java_org_kiwix_libkiwix_Illustration_getData+156) (BuildId: d509aa2e940c165a50d156c0469c5234d4108a96)
A        #17 pc 0000000000009e46  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.getBookmarksList+538)
A        #23 pc 0000000000009a7a  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.access$getBookmarksList+18)
A        #26 pc 0000000000008fd0  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks$bookmarkListBehaviour$2.invoke+12)
A        #32 pc 0000000000009000  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks$bookmarkListBehaviour$2.invoke+8)
A        #37 pc 000000000078369a  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (kotlin.SynchronizedLazyImpl.getValue+80)
A        #43 pc 0000000000009924  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.getBookmarkListBehaviour+12)
A        #49 pc 000000000000a8c6  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.flowableBookmarkList$lambda-19+38)
A        #52 pc 000000000000a2d8  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks.$r8$lambda$cGKTklQTmUYsuOCbDLX4HqreYBg+0)
A        #55 pc 0000000000008dc8  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes2.dex (org.kiwix.kiwixmobile.core.dao.LibkiwixBookmarks$$ExternalSyntheticLambda4.subscribe+4)
A        #60 pc 00000000006dff4e  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual+146)
A        #65 pc 00000000006b5f66  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.Flowable.subscribe+62)
A        #70 pc 00000000006f0eb8  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual+78)
A        #75 pc 00000000006b5f66  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.Flowable.subscribe+62)
A        #80 pc 00000000006b6002  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.Flowable.subscribe+32)
A        #85 pc 000000000070217a  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run+40)
A        #90 pc 000000000075ed84  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.schedulers.ScheduledRunnable.run+40)
A        #95 pc 000000000075eb60  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.schedulers.ScheduledRunnable.call+8)
A        #75 pc 00000000006b5f66  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.Flowable.subscribe+62)
A        #80 pc 00000000006b6002  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.Flowable.subscribe+32)
A        #85 pc 000000000070217a  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run+40)
A        #90 pc 000000000075ed84  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.schedulers.ScheduledRunnable.run+40)
A        #95 pc 000000000075eb60  /data/app/~~zahB8XNGeTaxc8wT7PQJQg==/org.kiwix.kiwixmobile-VznQm-J2n72KVceDytHSPA==/oat/arm64/base.vdex (io.reactivex.internal.schedulers.ScheduledRunnable.call+8)

Library content is:

<library version="20110515">
<book id="78603798-2235-9c50-24ae-3fdaf25ee355" path="../wikipedia_af_all_maxi_2023-09.zim" title="Wikipedia" description="aflyn weergawe van Wikipedia in Afrikaans" language="afr" creator="Wikipedia" publisher="Kiwix" name="wikipedia_af_all" flavour="maxi" tags="wikipedia;_category:wikipedia;_pictures:yes;_videos:no;_details:yes;_ftindex:yes" faviconMimeType="text/plain" favicon="iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAARQklEQVR4nO1ZeWyb93lm2qEbumDZihXdOgz7Y1uLDMu6biuQYS2WDeiwoWiKLHPTtUuwOHZ8yI5jO3Z8h9ZF3RctWTclkRJv6qYpURJJibolUhdJiSJF8RBlWZJt+ZBsx+Y7PO+nT3HawE07d90f+QE/UKT4fd97PO/zPu+PEsln67O1s3Q63XOVlZVfkjztJSX63NTUTK7X67N1dts6y8vLv/Y07qtWN3+13WL515YW84tVNcpX9QZT1NTUGtCZTN+VPK21sUFf6uvrLwiFF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z/kiNXanW02d/gBCTih0xk44uiiWnHrDJwBRByGVytqeZdVVAE2/kJ5cbZCpfq/M/ynl06ne1av17+kM5guqLW6Nq3OMKvTG9e1OsPWpeLLDy9eTH5YWHRpq6ZOtaaoqfWVlle0XiopvXC5ouKl4uLiZyX/3xZ+PVEoFH9QW1v7NaVS843SqqpvlJYq/ryiouIrRUVFv/nrtu+zJXnK638AM6p7hAbGBRoAAAAASUVORK5CYII=" date="2023-09-02" articleCount="110800" mediaCount="145624" size="1465527"/>
</library>

More reference kiwix/kiwix-android#3474 (comment)

[REGRESSION] `JNIICU.setDataDirectory()` implementation not found

While refactoring the kiwix-android to compile with java-libkiwix wrapper we faced the no implementation found error for JNIICU.setDataDirectory() method of the wrapper.

Logs:

FATAL EXCEPTION: main
Process: org.kiwix.kiwixmobile, PID: 27046
java.lang.UnsatisfiedLinkError: No implementation found for void org.kiwix.libkiwix.JNIICU.setDataDirectory(java.lang.String) (tried Java_org_kiwix_libkiwix_JNIICU_setDataDirectory and Java_org_kiwix_libkiwix_JNIICU_setDataDirectory__Ljava_lang_String_2)
at org.kiwix.libkiwix.JNIICU.setDataDirectory(Native Method)
at org.kiwix.libkiwix.JNIKiwix.setDataDirectory(JNIKiwix.java:35)
at org.kiwix.kiwixmobile.core.JNIInitialiser.<init>(JNIInitialiser.kt:36)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.jNIInitialiser(DaggerCoreComponent.java:528)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.injectCoreApp(DaggerCoreComponent.java:734)
at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.inject(DaggerCoreComponent.java:699)
at org.kiwix.kiwixmobile.core.CoreApp.onCreate(CoreApp.kt:81)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7094)
at android.app.ActivityThread.access$1700(ActivityThread.java:275)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2168)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8280)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)

Since this method is not set on the Android side we have commented this code to test the other parts of the wrapper in Android. It is crashing on the server and search functionality.

For server the logs:

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 29404 (wix.kiwixmobile), pid 29404 (wix.kiwixmobile)
Cmdline: org.kiwix.kiwixmobile
pid: 29404, tid: 29404, name: wix.kiwixmobile  >>> org.kiwix.kiwixmobile <<<
#00 pc 0000000000292b00  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libkiwix.so (kiwix::removeAccents(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)+200)
#01 pc 000000000021ce84  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libkiwix.so
#02 pc 000000000021a550  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libkiwix.so (kiwix::Library::updateBookDB(kiwix::Book const&)+364)
#03 pc 000000000021a0e4  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libkiwix.so (kiwix::Library::addBook(kiwix::Book const&)+80)
#04 pc 0000000000013b7c  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libkiwix_wrapper.so (Java_org_kiwix_libkiwix_Library_addBook+248) (BuildId: 2be3a7525f3187f9c4d6b9966b70d4d6748ca847)
#07 pc 0000000000002ae8  [anon:dalvik-classes19.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes19.dex] (org.kiwix.kiwixmobile.webserver.KiwixServer$Factory.createKiwixServer+148)
#09 pc 000000000000330c  [anon:dalvik-classes19.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes19.dex] (org.kiwix.kiwixmobile.webserver.WebServerHelper.startAndroidWebServer+48)
#11 pc 000000000000340a  [anon:dalvik-classes19.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes19.dex] (org.kiwix.kiwixmobile.webserver.WebServerHelper.startServerHelper+110)
#13 pc 000000000000626a  [anon:dalvik-classes17.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes17.dex] (org.kiwix.kiwixmobile.webserver.wifi_hotspot.HotspotService.onStartCommand+142)

And for search, while we are using getEstimatedMatches() function of the Search class it crashes.

Logs:

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 28887 (DefaultDispatch), pid 28740 (wix.kiwixmobile)
Cmdline: org.kiwix.kiwixmobile
pid: 28740, tid: 28887, name: DefaultDispatch  >>> org.kiwix.kiwixmobile <<<
#00 pc 0000000000218b04  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libzim.so (zim::removeAccents(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)+308)
#01 pc 0000000000254c80  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libzim.so (zim::SuggestionSearch::getEnquire() const+144)
#02 pc 0000000000254a48  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libzim.so (zim::SuggestionSearch::getEstimatedMatches() const+48)
#03 pc 0000000000026808  /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!libzim_wrapper.so (Java_org_kiwix_libzim_SuggestionSearch_getEstimatedMatches+124) (BuildId: acdad51494996579e69008b10b915288d32f13e9)
#06 pc 0000000000009dc6  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes11.dex (org.kiwix.kiwixmobile.core.search.viewmodel.ZimSearchResultGenerator.readResultsFromZim+386)
#08 pc 0000000000009a06  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes11.dex (org.kiwix.kiwixmobile.core.search.viewmodel.ZimSearchResultGenerator.access$readResultsFromZim+18)
#10 pc 00000000000094a6  /data/data/org.kiwix.kiwixmobile/code_cache/.overlay/base.apk/classes11.dex (org.kiwix.kiwixmobile.core.search.viewmodel.ZimSearchResultGenerator$readResultsFromZim$1.invokeSuspend+38)
#12 pc 000000000016c766  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+78)
#14 pc 00000000001d7c7c  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.DispatchedTask.run+512)
#16 pc 0000000000232c04  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.internal.LimitedDispatcher.run+64)
#18 pc 000000000023ff3e  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.scheduling.TaskImpl.run+18)
#20 pc 000000000023e5be  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+18)
#22 pc 000000000023c706  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+74)
#24 pc 000000000023c938  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+128)
#26 pc 000000000023c894  [anon:dalvik-classes30.dex extracted in memory from /data/app/~~ScoK14NZTlGh-DIVTr-gHA==/org.kiwix.kiwixmobile-wbt86NIt8qEBn1s-gqFwHg==/base.apk!classes30.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+8)

I suspect that it is crashing on these functionalities because we have not set JNIICU.setDataDirectory on the Android side.

CrashReport 3.3.3 & 9.2.3: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) kiwix::Reader::getNextSuggestion(std::string&, std::string&)

pid: 0, tid: 0 >>> org.kiwix.kiwixmobile <<<

backtrace:
  #00  pc 000000000017b258  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/base.apk (offset 0x666000) (kiwix::Reader::getNextSuggestion(std::string&, std::string&)+32)
  kiwix/libkiwix#1  pc 00000000001c1254  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/base.apk (offset 0x666000) (Java_org_kiwix_kiwixlib_JNIKiwixReader_getNextSuggestion+160)
  kiwix/libkiwix#2  pc 0000000000088dd4  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/oat/arm64/base.odex (offset 0x86000) (org.kiwix.kiwixlib.JNIKiwixReader.getNextSuggestion [DEDUPED]+180)
  kiwix/libkiwix#3  pc 000000000055f988  /system/lib64/libart.so (art_quick_invoke_stub+584)
  kiwix/libkiwix#4  pc 00000000000cfd40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
  kiwix/libkiwix#5  pc 0000000000283de0  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
  kiwix/libkiwix#6  pc 000000000027ddac  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
  kiwix/libkiwix#7  pc 0000000000531dc8  /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
  kiwix/libkiwix#8  pc 0000000000555d14  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  kiwix/libkiwix#9  pc 00000000001d8cd8  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/oat/arm64/base.vdex (org.kiwix.kiwixmobile.core.search.viewmodel.ZimSearchResultGenerator$suggestionResults$1.invoke+34)
  kiwix/libkiwix#10  pc 00000000002578a8  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.2078119297)+496)
  kiwix/libkiwix#11  pc 000000000025d428  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  kiwix/libkiwix#12  pc 000000000027dd90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  kiwix/libkiwix#13  pc 000000000052fcf0  /system/lib64/libart.so (MterpInvokeInterface+1392)
  kiwix/libkiwix#14  pc 0000000000552194  /system/lib64/libart.so (ExecuteMterpImpl+14740)
  kiwix/libkiwix#15  pc 00000000001afcc0  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/oat/arm64/base.vdex (kotlin.sequences.GeneratorSequence$iterator$1.calcNext+18)
  kiwix/libkiwix#16  pc 00000000002578a8  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.2078119297)+496)
  kiwix/libkiwix#17  pc 000000000025d428  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  kiwix/libkiwix#18  pc 000000000027dd90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  kiwix/libkiwix#19  pc 0000000000531dc8  /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
  kiwix/libkiwix#20  pc 0000000000555d14  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  kiwix/libkiwix#21  pc 00000000001afc38  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/oat/arm64/base.vdex (kotlin.sequences.GeneratorSequence$iterator$1.hasNext+8)
  kiwix/libkiwix#22  pc 00000000002578a8  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.2078119297)+496)
  kiwix/libkiwix#23  pc 000000000025d428  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  kiwix/libkiwix#24  pc 000000000027dd90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  kiwix/libkiwix#25  pc 000000000052fcf0  /system/lib64/libart.so (MterpInvokeInterface+1392)
  kiwix/libkiwix#26  pc 0000000000552194  /system/lib64/libart.so (ExecuteMterpImpl+14740)
  kiwix/libkiwix#27  pc 00000000001afaa6  /data/app/org.kiwix.kiwixmobile-5gSE8N6WL0sQY3dpFahR4A==/oat/arm64/base.vdex (kotlin.sequences.DistinctIterator.computeNext+4)
  kiwix/libkiwix#28  pc 00000000002578a8  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.2078119297)+496)
  kiwix/libkiwix#29  pc 000000000051f4d0  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
  kiwix/libkiwix#30  pc 0000000000568afc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
  kiwix/libkiwix#31  pc 0000000000000f90  /dev/ashmem/dalvik-jit-code-cache (deleted)

Could be just a bad zim file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.