iink SDK on Device

Answered

android crash by so

I have a background service for identifying after receiving the data. There is no problem in normal use, but when I hold my screen, this error appears, indicating that there is a problem with the so library. 


2019-12-17 16:16:48.195 21722-21722/? A/DEBUG: backtrace:
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #00 pc 000000000027c8a8  /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/lib/arm64/libiink.so (myscript::iink::DiagramBackend::pointerMove(atk::core::PointerInfo const&)+4)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #01 pc 0000000000295e64  /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/lib/arm64/libiink.so (myscript::iink::EditorImpl::pointerMove_(float, float, long, float, myscript::iink::PointerType, int, bool)+416)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #02 pc 000000000038035c  /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/lib/arm64/libiink.so (Java_com_myscript_iink_NativeFunctions_pointerMove+44)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #03 pc 0000000000565de0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #04 pc 000000000055d04c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #05 pc 00000000000d0740  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #06 pc 0000000000280d90  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #07 pc 000000000027bec4  /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+748)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #08 pc 000000000052f344  /system/lib64/libart.so (MterpInvokeStaticRange+148)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #09 pc 000000000054f814  /system/lib64/libart.so (ExecuteMterpImpl+15380)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #10 pc 000000000033a620  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/base.apk (deleted) (com.myscript.iink.Editor.pointerMove+32)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #11 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #12 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #13 pc 000000000027bea8  /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+720)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #14 pc 000000000052de5c  /system/lib64/libart.so (MterpInvokeVirtualRange+576)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #15 pc 000000000054f694  /system/lib64/libart.so (ExecuteMterpImpl+14996)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #16 pc 00000000000b8b10  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/base.apk!classes2.dex (deleted) (com.eningqu.aipen.myscript.IInkSdkManager.pointerMove+16)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #17 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #18 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #19 pc 000000000027bea8  /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+720)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #20 pc 000000000052de5c  /system/lib64/libart.so (MterpInvokeVirtualRange+576)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #21 pc 000000000054f694  /system/lib64/libart.so (ExecuteMterpImpl+14996)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #22 pc 0000000000082f1a  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/base.apk!classes2.dex (deleted) (com.eningqu.aipen.afsdk.AFPenClientCtrl.toRecorgnize+202)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #23 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #24 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.195 21722-21722/? A/DEBUG:     #25 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #26 pc 000000000052d970  /system/lib64/libart.so (MterpInvokeDirect+296)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #27 pc 000000000054f494  /system/lib64/libart.so (ExecuteMterpImpl+14484)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #28 pc 0000000000081b60  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/base.apk!classes2.dex (deleted) (com.eningqu.aipen.afsdk.AFPenClientCtrl.checkEveryDot+60)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #29 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #30 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #31 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #32 pc 000000000052d970  /system/lib64/libart.so (MterpInvokeDirect+296)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #33 pc 000000000054f494  /system/lib64/libart.so (ExecuteMterpImpl+14484)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #34 pc 0000000000081a78  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/base.apk!classes2.dex (deleted) (com.eningqu.aipen.afsdk.AFPenClientCtrl.access$1000)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #35 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #36 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #37 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #38 pc 000000000052db34  /system/lib64/libart.so (MterpInvokeStatic+204)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #39 pc 000000000054f514  /system/lib64/libart.so (ExecuteMterpImpl+14612)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #40 pc 0000000000080ed8  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.eningqu.aipen-1ArzDbtSejtcgcJRn3JWvA==/base.apk!classes2.dex (deleted) (com.eningqu.aipen.afsdk.AFPenClientCtrl$DotConsumerForBroadcastThread.run+312)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #41 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #42 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #43 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #44 pc 000000000052d5ac  /system/lib64/libart.so (MterpInvokeInterface+1392)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #45 pc 000000000054f594  /system/lib64/libart.so (ExecuteMterpImpl+14740)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #46 pc 00000000001abdda  /system/framework/boot-core-oj.vdex (java.util.concurrent.Executors$RunnableAdapter.call+4)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #47 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #48 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #49 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #50 pc 000000000052d5ac  /system/lib64/libart.so (MterpInvokeInterface+1392)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #51 pc 000000000054f594  /system/lib64/libart.so (ExecuteMterpImpl+14740)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #52 pc 00000000001b1016  /system/framework/boot-core-oj.vdex (java.util.concurrent.FutureTask.run+62)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #53 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #54 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #55 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #56 pc 000000000052d5ac  /system/lib64/libart.so (MterpInvokeInterface+1392)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #57 pc 000000000054f594  /system/lib64/libart.so (ExecuteMterpImpl+14740)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #58 pc 00000000001b9ee4  /system/framework/boot-core-oj.vdex (java.util.concurrent.ThreadPoolExecutor.runWorker+162)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #59 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #60 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #61 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #62 pc 000000000052c630  /system/lib64/libart.so (MterpInvokeVirtual+588)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #63 pc 000000000054f394  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #64 pc 00000000001b8f80  /system/framework/boot-core-oj.vdex (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #65 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #66 pc 000000000025a59c  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #67 pc 000000000027ad88  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #68 pc 000000000052d5ac  /system/lib64/libart.so (MterpInvokeInterface+1392)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #69 pc 000000000054f594  /system/lib64/libart.so (ExecuteMterpImpl+14740)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #70 pc 00000000000dff84  /system/framework/boot-core-oj.vdex (java.lang.Thread.run+12)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #71 pc 0000000000254aa8  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.223931584+488)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #72 pc 000000000051cee4  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #73 pc 0000000000565efc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #74 pc 000000000055cd88  /system/lib64/libart.so (art_quick_invoke_stub+584)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #75 pc 00000000000d0720  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #76 pc 000000000045f5a8  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #77 pc 0000000000460664  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #78 pc 000000000048eab4  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1092)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #79 pc 0000000000081dac  /system/lib64/libc.so (__pthread_start(void*)+36)
2019-12-17 16:16:48.196 21722-21722/? A/DEBUG:     #80 pc 0000000000023788  /system/lib64/libc.so (__start_thread+68)

 


Best Answer

Dear Chad Li,


can you please provide us a full log. This can be done setting the following configuration (ensure you replace PATH_LOG_FILE by the path where you store your log file): conf.setString(“debug.log-file”, "PATH_LOG_FILE");


This may help understand what is occurring.


Best regards,


Olivier


Answer

Dear Chad Li,


can you please provide us a full log. This can be done setting the following configuration (ensure you replace PATH_LOG_FILE by the path where you store your log file): conf.setString(“debug.log-file”, "PATH_LOG_FILE");


This may help understand what is occurring.


Best regards,


Olivier

We have tried to catch the exception, but no exception was thrown.

What should we do now?

Dear Chad Li,


Did you try to catch the exceptions that may be raised on the  pointerMove function:  https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/Editor.html#pointerMove-float-float-long-float-com.myscript.iink.PointerType-int- This may help investigate.


If no exception is raised, in order to be able to investigate further, we would need your project. Indeed, with the below information, it it difficult to understand what is likely to cause the issue.


Best regards,


Olivier

The PointerDown method was used first, and the specific code block is as follows:

if (iinklastDot == null) {
iinklastDot = dot;
IInkSdkManager.getInstance().pointerDown(dot.X, dot.Y, NO_TIMESTAMP, NO_PRESSURE, PointerType.PEN, pointerId);
} else {
if (dot.type == 2) {
IInkSdkManager.getInstance().pointerUp(dot.X, dot.Y, NO_TIMESTAMP, NO_PRESSURE, PointerType.PEN, pointerId);
pointerId++;
iinklastDot = null;
} else {
IInkSdkManager.getInstance().pointerMove(dot.X, dot.Y, NO_TIMESTAMP, NO_PRESSURE, PointerType.PEN, pointerId);
}
}

Dear Chad Li,


currently, I do not see a "PointerDown" event? Indeed, after clearing the editor and when starting adding new stroke, you shall ensure each stroke starts with a "pointerDown".


Each following point shall be added with the pointerMove, and the last pen shall be added with a pointerUp.


Normally, you should have an exception occuring. Can you please try to catch it, which would prevent from crashing and return more information?


Best regards,


Olivier

Hello, our operation process is roughly as follows:

We have a background service here to pass the handwriting data to myscript for identification, and then when we switch pages, we will call the Editor.clear () method, reset the package and contentPart parameters, and then continue to handwriting data to myscript Identify.Then there is a chance that this bug will appear

Dear Chad,


thank you for contacting us.


Currently, the crash by itself doesn't help much. Is it possible to have the exact scenario, so that we can reproduce?


When you say you have a background service, what do you mean? What is the latter doing? You send the strokes via this background service and add strokes from the screen at the same time?


Please explain, so that we can reproduce and better understand what is happening.


Best regards,


Olivier