Hi,
I have a question about the crash, when running the "get()" method from the smartphone, the android device cannot get information and will have a crash, this problem only occurs on the HTC phones. We found out there is problem of "removeListener(_JNIEnv*, _jobject*)" method in "JniListenerManager.h" file in jni layer. Please help me out where I am going wrong in my understanding. Log: ********** Crash dump: ********** Build fingerprint: 'htc/himauhl_htc_asia_tw/htc_himauhl:6.0/MRA58K/676746.3:user/release-keys' pid: 30426, tid: 31048, name: Thread-25889 >>> org.u.iot <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 Stack frame #00 pc 00042d26 /system/lib/libc.so (pthread_mutex_lock+3) Stack frame #01 pc 00241570 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so: Routine __gthread_mutex_lock at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include/bits/gthr-default.h:761 Stack frame #02 pc 00241bd4 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so (std::mutex::lock()+24): Routine std::mutex::lock() at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.9/include/mutex:135 Stack frame #03 pc 0026bda8 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so (JniListenerManager<JniOnGetListener>::removeListener(_JNIEnv*, _jobject*)+36): Routine JniListenerManager<JniOnGetListener>::removeListener(_JNIEnv*, _jobject*) at /home/ABC/Desktop/iotivity-1.2.1/android/android_api/base/jni/JniListenerMan ager.h:132 Stack frame #04 pc 0028f66c /data/app/org.u.iot-1/lib/arm/libocstack-jni.so (JniOcAccountManager::removeOnGetListener(_JNIEnv*, _jobject*)+40): Routine JniOcAccountManager::removeOnGetListener(_JNIEnv*, _jobject*) at /home/ABC/Desktop/iotivity-1.2.1/android/android_api/base/jni/JniOcAccountMa nager.cpp:109 Stack frame #05 pc 001ce544 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so (JniOnGetListener::checkExAndRemoveListener(_JNIEnv*)+284): Routine JniOnGetListener::checkExAndRemoveListener(_JNIEnv*) at /home/ABC/Desktop/iotivity-1.2.1/android/android_api/base/jni/JniOnGetListen er.cpp:212 Stack frame #06 pc 001ce3b8 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so (JniOnGetListener::onGetCallback(std::vector<OC::HeaderOption::OCHeaderOptio n, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)+1064): Routine JniOnGetListener::onGetCallback(std::vector<OC::HeaderOption::OCHeaderOption , std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int) at /home/ABC/Desktop/iotivity-1.2.1/android/android_api/base/jni/JniOnGetListen er.cpp:174 Stack frame #07 pc 00260bb4 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so: Routine operator() at /home/ABC/Desktop/iotivity-1.2.1/android/android_api/base/jni/JniOcResource. cpp:84 Stack frame #08 pc 0026e990 /data/app/org.u.iot-1/lib/arm/libocstack-jni.so: Routine _M_invoke at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.9/include/functional:2039 (discriminator 1) Stack frame #09 pc 00533d54 /data/app/org.u.iot-1/lib/arm/liboc.so (std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)>::operator()(std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int) const+124): Routine std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)>::operator()(std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int) const at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.8/include/functional:2471 Stack frame #10 pc 00532b30 /data/app/org.u.iot-1/lib/arm/liboc.so (_ZNSt12_Bind_simpleIFSt8functionIFvRKSt6vectorIN2OC12HeaderOption14OCHeader OptionESaIS4_EERKNS2_16OCRepresentationEiEES6_S9_13OCStackResultEE9_M_invoke IILj0ELj1ELj2EEEEvSt12_Index_tupleIIXspT_EEE+148): Routine void std::_Bind_simple<std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)> (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> >, OC::OCRepresentation, OCStackResult)>::_M_invoke<0u, 1u, 2u>(std::_Index_tuple<0u, 1u, 2u>) at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.8/include/functional:1732 Stack frame #11 pc 00531bbc /data/app/org.u.iot-1/lib/arm/liboc.so (std::_Bind_simple<std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)> (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> >, OC::OCRepresentation, OCStackResult)>::operator()()+24): Routine std::_Bind_simple<std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)> (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> >, OC::OCRepresentation, OCStackResult)>::operator()() at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.8/include/functional:1720 Stack frame #12 pc 005315bc /data/app/org.u.iot-1/lib/arm/liboc.so (std::thread::_Impl<std::_Bind_simple<std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)> (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> >, OC::OCRepresentation, OCStackResult)> >::_M_run()+28): Routine std::thread::_Impl<std::_Bind_simple<std::function<void (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> > const&, OC::OCRepresentation const&, int)> (std::vector<OC::HeaderOption::OCHeaderOption, std::allocator<OC::HeaderOption::OCHeaderOption> >, OC::OCRepresentation, OCStackResult)> >::_M_run() at /home/ABC/Desktop/iotivity-1.2.1/extlibs/android/ndk/android-ndk-r10d/source s/cxx-stl/gnu-libstdc++/4.8/include/thread:115 Stack frame #13 pc 0009197b /data/app/org.u.iot-1/lib/arm/libgnustl_shared.so (execute_native_thread_routine+14): Routine execute_native_thread_routine at /s/ndk-toolchain/src/gcc/gcc-4.9/libstdc++-v3/src/c++11/thread.cc:84 Stack frame #14 pc 0004232b /system/lib/libc.so (__pthread_start(void*)+30) Stack frame #15 pc 00019315 /system/lib/libc.so (__start_thread+6) Best Regards, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170117/7f2dc93b/attachment.html>
