I have 5000 line algorithm and if fails with SIGSEGV on Android. I found out, that range checking is only done if _DEBUG is defined.
I my Android.mk I have LOCAL_CFLAGS := -D_DEBUG
, but the debug assertions are still not executed. How to enable them? Here is my complete Android.mk
file:
LOCAL_CPPFLAGS := -D_DEBUG
LOCAL_CFLAGS := -D_DEBUG
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_LIB_TYPE:=STATIC
include d:\OpenCV-2.4.11-android-sdk\sdk\native\jni\OpenCV.mk
LOCAL_MODULE := recognizer
LOCAL_SRC_FILES := /* file list */
LOCAL_LDLIBS += -llog
include $(BUILD_SHARED_LIBRARY)