Error when connecting to native library: E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1

╄→гoц情女王★ 提交于 2020-06-01 07:42:29

问题


I am trying to pass data to a native C library within a Java Android app and i keep getting this error?

HostConnection::get() New Host Connection established 0xe209a150, tid 16633
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
D/EGL_emulation: eglMakeCurrent: 0xe9ce5920: ver 3 0 (tinfo 0xe3a70b10)
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 3 2
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 16632 (AsyncTask #1), pid 16586 (.app.matlabtest)

Does anyone have any information or experience with this error, is this related to my JNA passing data at all?

I am pretty sure my JNA implementations are all in order now however i still cannot pass my data.

Full backtrace as below:

05-18 07:47:35.915 16586 16632 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 16632 (AsyncTask #1), pid 16586 (.app.matlabtest)
05-18 07:47:36.136 16641 16641 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-18 07:47:36.136 16641 16641 F DEBUG   : Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
05-18 07:47:36.136 16641 16641 F DEBUG   : Revision: '0'
05-18 07:47:36.136 16641 16641 F DEBUG   : ABI: 'x86'
05-18 07:47:36.136 16641 16641 F DEBUG   : pid: 16586, tid: 16632, name: AsyncTask #1  >>> com.waymap.app.matlabtest <<<
05-18 07:47:36.136 16641 16641 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
05-18 07:47:36.136 16641 16641 F DEBUG   :     eax 00000000  ebx 000040ca  ecx 000040f8  edx 00000006
05-18 07:47:36.136 16641 16641 F DEBUG   :     edi 000040ca  esi d0608597
05-18 07:47:36.136 16641 16641 F DEBUG   :     ebp d0261868  esp d02617f8  eip ee704b39
05-18 07:47:36.194 16641 16641 F DEBUG   : 
05-18 07:47:36.194 16641 16641 F DEBUG   : backtrace:
05-18 07:47:36.195 16641 16641 F DEBUG   :     #00 pc 00000b39  [vdso:ee704000] (__kernel_vsyscall+9)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #02 pc 00022ed3  /system/lib/libc.so (abort+115)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #03 pc 000d295b  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libcom.waymap.app.matlabtest.so (rtDynamicBoundsError+203)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #04 pc 00033039  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libcom.waymap.app.matlabtest.so
05-18 07:47:36.195 16641 16641 F DEBUG   :     #05 pc 000299be  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libcom.waymap.app.matlabtest.so (b_dxfParseFileContentsNEW+446)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #06 pc 000ddb06  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libcom.waymap.app.matlabtest.so (mapParse+1766)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #07 pc 000f7cc0  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libcom.waymap.app.matlabtest.so (TraceMap+352)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #08 pc 000f7480  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libcom.waymap.app.matlabtest.so (TraceInitialise+112)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #09 pc 00011129  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libjnidispatch.so (ffi_call_SYSV+25)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #10 pc 00010da0  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libjnidispatch.so (ffi_call+176)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #11 pc 000051e0  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libjnidispatch.so
05-18 07:47:36.195 16641 16641 F DEBUG   :     #12 pc 00007d5f  /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/lib/x86/libjnidispatch.so (Java_com_sun_jna_Native_invokeVoid+63)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #13 pc 005f6a17  /system/lib/libart.so (art_quick_generic_jni_trampoline+71)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #14 pc 005f0bd2  /system/lib/libart.so (art_quick_invoke_static_stub+418)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #15 pc 000a2f5f  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+239)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #16 pc 0029bb22  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+338)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #17 pc 00293cc8  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1048)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #18 pc 005bdb1f  /system/lib/libart.so (MterpInvokeStatic+207)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #19 pc 005e2d21  /system/lib/libart.so (ExecuteMterpImpl+14625)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #20 pc 00286478  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/base.apk (deleted) (com.sun.jna.Function.invoke+960)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #21 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #22 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #23 pc 00293cab  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #24 pc 005bc353  /system/lib/libart.so (MterpInvokeVirtual+691)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #25 pc 005e2ba1  /system/lib/libart.so (ExecuteMterpImpl+14241)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #26 pc 002865f0  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/base.apk (deleted) (com.sun.jna.Function.invoke+348)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #27 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #28 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #29 pc 002950a9  /system/lib/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+985)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #30 pc 005bdee8  /system/lib/libart.so (MterpInvokeVirtualRange+664)
05-18 07:47:36.195 16641 16641 F DEBUG   :     #31 pc 005e2ea1  /system/lib/libart.so (ExecuteMterpImpl+15009)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #32 pc 00287604  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/base.apk (deleted) (com.sun.jna.Library$Handler.invoke+524)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #33 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #34 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #35 pc 00293cab  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #36 pc 005bd434  /system/lib/libart.so (MterpInvokeInterface+1444)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #37 pc 005e2da1  /system/lib/libart.so (ExecuteMterpImpl+14753)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #38 pc 000cd0be  /system/framework/boot.vdex (java.lang.reflect.Proxy.invoke+4)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #39 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #40 pc 0026c50e  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+126)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #41 pc 005a93fd  /system/lib/libart.so (artQuickToInterpreterBridge+1277)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #42 pc 005f6aed  /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #43 pc 005f0bd2  /system/lib/libart.so (art_quick_invoke_static_stub+418)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #44 pc 000a2f5f  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+239)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #45 pc 004d3209  /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+89)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #46 pc 004d402d  /system/lib/libart.so (art::InvokeWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+429)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #47 pc 0039a9dd  /system/lib/libart.so (art::JNI::CallStaticObjectMethodA(_JNIEnv*, _jclass*, _jmethodID*, jvalue*)+925)
05-18 07:47:36.196 16641 16641 F DEBUG   :     #48 pc 000da6c8  /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodA(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, jvalue*, art::Primitive::Type, art::InvokeType)+1720)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #49 pc 000c6039  /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticObjectMethodA(_JNIEnv*, _jclass*, _jmethodID*, jvalue*)+73)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #50 pc 00586103  /system/lib/libart.so (art::InvokeProxyInvocationHandler(art::ScopedObjectAccessAlreadyRunnable&, char const*, _jobject*, _jobject*, std::__1::vector<jvalue, std::__1::allocator<jvalue>>&)+627)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #51 pc 005aa4e7  /system/lib/libart.so (artQuickProxyInvokeHandler+1335)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #52 pc 005f6746  /system/lib/libart.so (art_quick_proxy_invoke_handler+54)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #53 pc 005f0a02  /system/lib/libart.so (art_quick_invoke_stub+338)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #54 pc 000a2f4e  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+222)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #55 pc 0029bb22  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+338)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #56 pc 002950c6  /system/lib/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1014)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #57 pc 005bf044  /system/lib/libart.so (MterpInvokeInterfaceRange+1444)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #58 pc 005e30a1  /system/lib/libart.so (ExecuteMterpImpl+15521)
05-18 07:47:36.197 16641 16641 F DEBUG   :     #59 pc 002965a2  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.waymap.app.matlabtest-I2nnoNIzamg5_DsTdhWXRA==/base.apk (deleted) (com.waymap.app.matlabtest.MainActivity$1.run+34)
05-18 07:47:36.244 16641 16641 F DEBUG   :     #60 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.246 16641 16641 F DEBUG   :     #61 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.253 16641 16641 F DEBUG   :     #62 pc 00293cab  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
05-18 07:47:36.253 16641 16641 F DEBUG   :     #63 pc 005bd434  /system/lib/libart.so (MterpInvokeInterface+1444)
05-18 07:47:36.253 16641 16641 F DEBUG   :     #64 pc 005e2da1  /system/lib/libart.so (ExecuteMterpImpl+14753)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #65 pc 00ad5c2c  /system/framework/boot-framework.vdex (android.os.AsyncTask$SerialExecutor$1.run+4)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #66 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #67 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #68 pc 00293cab  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #69 pc 005bd434  /system/lib/libart.so (MterpInvokeInterface+1444)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #70 pc 005e2da1  /system/lib/libart.so (ExecuteMterpImpl+14753)
05-18 07:47:36.255 16641 16641 F DEBUG   :     #71 pc 00117114  /system/framework/boot.vdex (java.util.concurrent.ThreadPoolExecutor.runWorker+162)
05-18 07:47:36.256 16641 16641 F DEBUG   :     #72 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.256 16641 16641 F DEBUG   :     #73 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.256 16641 16641 F DEBUG   :     #74 pc 00293cab  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
05-18 07:47:36.256 16641 16641 F DEBUG   :     #75 pc 005bc353  /system/lib/libart.so (MterpInvokeVirtual+691)
05-18 07:47:36.256 16641 16641 F DEBUG   :     #76 pc 005e2ba1  /system/lib/libart.so (ExecuteMterpImpl+14241)
05-18 07:47:36.257 16641 16641 F DEBUG   :     #77 pc 00116442  /system/framework/boot.vdex (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
05-18 07:47:36.257 16641 16641 F DEBUG   :     #78 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.257 16641 16641 F DEBUG   :     #79 pc 0026c61c  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
05-18 07:47:36.257 16641 16641 F DEBUG   :     #80 pc 00293cab  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #81 pc 005bd434  /system/lib/libart.so (MterpInvokeInterface+1444)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #82 pc 005e2da1  /system/lib/libart.so (ExecuteMterpImpl+14753)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #83 pc 000ca806  /system/framework/boot.vdex (java.lang.Thread.run+12)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #84 pc 00266096  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #85 pc 0026c50e  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+126)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #86 pc 005a93fd  /system/lib/libart.so (artQuickToInterpreterBridge+1277)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #87 pc 005f6aed  /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #88 pc 005f0a02  /system/lib/libart.so (art_quick_invoke_stub+338)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #89 pc 000a2f4e  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+222)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #90 pc 004d3209  /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+89)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #91 pc 004d44b7  /system/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+471)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #92 pc 0050944c  /system/lib/libart.so (art::Thread::CreateCallback(void*)+1484)
05-18 07:47:36.259 16641 16641 F DEBUG   :     #93 pc 0008f065  /system/lib/libc.so (__pthread_start(void*)+53)
05-18 07:47:36.260 16641 16641 F DEBUG   :     #94 pc 0002485b  /system/lib/libc.so (__start_thread+75)

It must be somethign in the way i am mapping to the emxArray_char_T structure which i:

@Structure.FieldOrder({ "str", "size", "allocatedSize", "numDimensions", "canFreeData"})
public class emxArray_char_T extends Structure implements Structure.ByReference{


    public Pointer str;
    public Pointer size;
    public int allocatedSize;
    public int numDimensions;
    public int canFreeData;

    //Static
    public emxArray_char_T(Pointer str, Pointer size) {
        this.str = str;
        this.size = size;
    }

    //Dynamic
    public emxArray_char_T(Pointer str, Pointer size, int allocatedSize, int numDimensions, int canFreeData) {
        this.str = str;
        this.size = size;
        this.allocatedSize = allocatedSize;
        this.numDimensions = numDimensions;
        this.canFreeData = canFreeData;
    }

    public emxArray_char_T() {
    }
}

to map to the matlab struct as i have mentioned:

struct emxArray_char_T
{
  char *data;
  int *size;
  int allocatedSize;
  int numDimensions;
  bool canFreeData;
};

The documentation: https://uk.mathworks.com/help/coder/ug/use-c-arrays-in-the-generated-function-interfaces.html#mw_0cae9a4a-b74d-43f9-aae0-ed192db73d22

I pass the Size pointer which is to an int[] which is my only worry as:

Pointer PTRinitialDynamicSize = new Memory(2*Native.getNativeSize(Integer.TYPE));
        PTRinitialDynamicSize.setInt(0*Native.getNativeSize(Integer.TYPE),1);
        PTRinitialDynamicSize.setInt(1*Native.getNativeSize(Integer.TYPE), initialDynamicAllocatedSize);

        Pointer PTRallFloorsSize = new Memory(2*Native.getNativeSize(Integer.TYPE));
        PTRallFloorsSize.setInt(0*Native.getNativeSize(Integer.TYPE),1);
        PTRallFloorsSize.setInt(1*Native.getNativeSize(Integer.TYPE), allFloorsAllocatedSize);

来源:https://stackoverflow.com/questions/61864031/error-when-connecting-to-native-library-e-eglcodeccommon-goldfishaddressspaceh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!