kiwix / java-libkiwix

Libkiwix binding for Java & Kotlin
https://central.sonatype.com/artifact/org.kiwix/libkiwix
GNU General Public License v3.0
3 stars 4 forks source link

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

Closed MohitMaliFtechiz closed 9 months ago

MohitMaliFtechiz commented 10 months ago

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?

mgautierfr commented 10 months ago

This is a Jni/wrapper issue. Libkiwix itself has not problem to return a vector bigger than 512 elements.

Moving to java-libkiwix.

MohitMaliFtechiz commented 10 months ago

@mgautierfr Thanks for confirming the issue, can you please move this issue to java-libkiwix and fix it?

kelson42 commented 9 months ago

@mgautierfr What is the root cause here of the issue? Who can fix it?