Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv-mobile-4.5.3 在Android jni 里使用 cv::cvtColor(roi, roi, cv::COLOR_BGR2GRAY),app崩溃 #22

Closed
meixiansen opened this issue Sep 8, 2021 · 5 comments

Comments

@meixiansen
Copy link

E/cv::error(): OpenCV(4.5.3) Error: Requested object was not found (could not open directory: /data/app/com.tencent.ncnnyolox-ZEvyprlUzrPIBsQ8ClaFTw==/base.apk!/lib/arm64-v8a) in glob_rec, file /home/runner/work/opencv-mobile/opencv-mobile/opencv-4.5.3/modules/core/src/glob.cpp, line 273 A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 10749 (ImageReader-640), pid 10701 (ncent.ncnnyolox)

@coiliaspp
Copy link

您好,我遇到了同样的问题,在使用imread和resize时都复现了,请问这个问题您解决了么?

@meixiansen
Copy link
Author

换成3.4.15就好了

@nihui
Copy link
Owner

nihui commented Nov 24, 2021

fixed in 46fe737

@nihui
Copy link
Owner

nihui commented Dec 2, 2021

已确认修复

@nihui nihui closed this as completed Dec 2, 2021
@teletian
Copy link

teletian commented Mar 6, 2023

@nihui 你好,由于需要支持最低 android 5.0,所以将 api level 设置成 21 重新编译了。
由于是提供的 sdk,使用方的 app 的最低版本的设置不一定是 21.
发现个很奇怪的现象,如果 app 的最低版本也设置成 21,没有问题,如果设置成 24,会报同样的错误。

编译用的 cmake 命令如下:
cmake -DCMAKE_TOOLCHAIN_FILE=/Users/tianjf/Android/sdk/ndk/18.1.5063045/build/cmake/android.toolchain.cmake
-DANDROID_NDK="/Users/tianjf/Android/sdk/ndk/18.1.5063045"
-DANDROID_SDK="/Users/tianjf/Android/sdk"
-DANDROID_ABI="arm64-v8a"
-DANDROID_PLATFORM=android-21
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_BUILD_TYPE=Release
cat ../../opencv4_cmake_options.txt
-DBUILD_opencv_world=OFF ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants