Android (opencv) ndk development: 0 xdeadbaad (code = 1) error and disable armeabi and libnative_camera_r2.2.2.so generation

Source: Internet
Author: User

I. opencv transplanted to Android, encountered in the development of the error: Android fatal signal 11 (SIGSEGV) at 0 xdeadbaad (code = 1). It is very tangled, refer to the https://community.freescale.com/docs/DOC-93378 Terminal. However, after careful research, it is found that if the error is: Android fatal signal 11 (SIGSEGV) at 0 xdeadbaad (code = 1). The first check is the local C/C ++ code error. It turns out that the matrix dimension is incorrect during opencv operations, leading to program crash.

2. The app_abi = armeabi armeabi-v7a in the original application. mk file, so there are always two sets of this in the generated libs folder. According to the query, armeabi indicates that the so library is used for general CPU of arm, while the CPU of v7a supports hardware floating point operation. Therefore, armeabi is versatile but slow, while v7a can fully utilize the v7a CPU capabilities. The Huawei u9200cpu model is omap4660 and A9. After checking for half a day, I did not see whether the support does not support hardware floating point operations. After removing armeabi, the original program size is reduced to 2.62 MB. Running well, it seems that slimming is critical.

3. When compiling the local library in ndk-build, libnative_camera_r2.2.2.so and r2.3.3.so are always generated, as shown below. The strange thing is that I didn't use the camera module in my local code.

Refer to here for more information

OPENCV_CAMERA_MODULES:=off 

Sure enough, at the time of re-compilation and installation, the two camera libraries are not installed! Note that this statement is invalid in Android. mk.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.