[Android Q&A, Help & Troubleshooting] remi0s:
Hello people,

i'm currently modifying the aosp latinime keyboard in order to create a keyboard needed for my university thesis.

So far i have managed to modify it and make it work for Nougat and previous android versions but it crashes all the time when opened in emulator for android Oreo. I have searched everywhere for an answer but it seems i have crashed into a wall so i need your help.

I have builded the app using the guide from here

and builded the libjni_latinime.so libraries using this project which offers native build through android studio (after i have changed all the reference to package into my own package name).

I'm getting the following error when the app tries to load the dictionaries i have imported in res/raw folder:

05-08 12:35:35.573 6826-6845/? A/libc: Fatal signal 7 (SIGBUS), code 2, fault addr 0x8b33da70 in tid 6845 (ExecutorUtils)
05-08 12:35:35.598 6849-6849/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.0.0/OSR1.170901.043/4456315:user/release-keys'
Revision: '0'
ABI: 'x86'
pid: 6826, tid: 6845, name: ExecutorUtils >>> typeofmood.ime <<<
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x8b33da70
eax 8bdddb90 ebx 8c172040 ecx 8b33da70 edx 00000000
05-08 12:35:35.599 6849-6849/? A/DEBUG: esi 0023ca29 edi 01bc7a70
xcs 00000073 xds 0000007b xes 0000007b xfs 0000003b xss 0000007b
eip 8c035714 ebp 8bdddb88 esp 8bdddb30 flags 00010216
05-08 12:35:35.608 6849-6849/? A/DEBUG: backtrace:
#00 pc 0014f714 /data/app/typeofmood.ime-DzXcxTqPXkfULkd3FplRPQ==/lib/x86/libjni_latinime.so (_ZN8latinime11FormatUtils19detectFormatVersionENS_21ReadOnlyByteArrayViewE+100)
#01 pc 0010bd1d /data/app/typeofmood.ime-DzXcxTqPXkfULkd3FplRPQ==/lib/x86/libjni_latinime.so (_ZN8latinime42DictionaryStructureWithBufferPolicyFactory20newPolicyForFileDictEPKcii+525)
#02 pc 0010b51d /data/app/typeofmood.ime-DzXcxTqPXkfULkd3FplRPQ==/lib/x86/libjni_latinime.so (_ZN8latinime42DictionaryStructureWithBufferPolicyFactory28newPolicyForExistingDictFileEPKciib+285)
#03 pc 000c0f8f /data/app/typeofmood.ime-DzXcxTqPXkfULkd3FplRPQ==/lib/x86/libjni_latinime.so
05-08 12:35:35.609 6849-6849/? A/DEBUG: #04 pc 0063ec67 /system/lib/libart.so (art_quick_generic_jni_trampoline+71)
#05 pc 00638ea2 /system/lib/libart.so (art_quick_invoke_static_stub+418)
#06 pc 00112b92 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+306)
#07 pc 003231ff /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+367)
#08 pc 0031cec3 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+803)
#09 pc 0062182d /system/lib/libart.so (MterpInvokeStaticRange+397)
#10 pc 00629d21 /system/lib/libart.so (artMterpAsmInstructionStart+15265)
#11 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#12 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#13 pc 0031ce97 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+759)
#14 pc 0062157e /system/lib/libart.so (MterpInvokeDirectRange+462)
#15 pc 00629ca1 /system/lib/libart.so (artMterpAsmInstructionStart+15137)
#16 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#17 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#18 pc 0031ce97 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+759)
#19 pc 0062157e /system/lib/libart.so (MterpInvokeDirectRange+462)
#20 pc 00629ca1 /system/lib/libart.so (artMterpAsmInstructionStart+15137)
#21 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#22 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#23 pc 0031ce97 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+759)
#24 pc 0062157e /system/lib/libart.so (MterpInvokeDirectRange+462)
#25 pc 00629ca1 /system/lib/libart.so (artMterpAsmInstructionStart+15137)
#26 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#27 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#28 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#29 pc 0061faf4 /system/lib/libart.so (MterpInvokeStatic+484)
#30 pc 00629a21 /system/lib/libart.so (artMterpAsmInstructionStart+14497)
05-08 12:35:35.612 6849-6849/? A/DEBUG: #31 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#32 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#33 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#34 pc 0061e171 /system/lib/libart.so (MterpInvokeVirtual+881)
#35 pc 006298a1 /system/lib/libart.so (artMterpAsmInstructionStart+14113)
#36 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#37 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#38 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#39 pc 0061f3d3 /system/lib/libart.so (MterpInvokeInterface+1635)
#40 pc 00629aa1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
#41 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#42 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#43 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#44 pc 0061f3d3 /system/lib/libart.so (MterpInvokeInterface+1635)
#45 pc 00629aa1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
#46 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#47 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#48 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#49 pc 0061e980 /system/lib/libart.so (MterpInvokeSuper+1776)
#50 pc 00629921 /system/lib/libart.so (artMterpAsmInstructionStart+14241)
#51 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#52 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
05-08 12:35:35.613 6849-6849/? A/DEBUG: #53 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#54 pc 0061f3d3 /system/lib/libart.so (MterpInvokeInterface+1635)
#55 pc 00629aa1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
#56 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#57 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#58 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)
#59 pc 0061e171 /system/lib/libart.so (MterpInvokeVirtual+881)
#60 pc 006298a1 /system/lib/libart.so (artMterpAsmInstructionStart+14113)
#61 pc 002f5f59 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
#62 pc 002fdeda /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
#63 pc 0031bdb5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+773)

Is there anyone that can help me fixing this?

Thank you for your time!