Description
Hi,
As mentioned earlier, OpenCV's extra class have been imported through python-for-android. My mobile app loads the lbfmodel, but then crashes somewhere inside the fit function during 'ff_locations_01 = l_det.fit(img, faces)'. Below is the an extract of the code:
img_1 = cv2.imread(ii_file)
img = cv2.cvtColor(img_1, cv2.COLOR_BGR2GRAY)
det = cv2.CascadeClassifier(lm_model)
faces = det.detectMultiScale(img)
l_det = cv2.face.createFacemarkLBF()
l_det.loadModel(lm_model_2)
ff_locations_01 = l_det.fit(img, faces)
I'm using the following:
OpenCV/OpenCV_contrib 4.01
NDK 19
Here is an extract from the log:
06-02 11:13:05.604 785 870 V ActivityManager: Broadcast sticky: Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 (has extras) } ordered=false userid=-1 callerApp=ProcessRecord{d7667b7 785:system/1000}
06-02 11:13:05.610 25171 25171 D AndroidRuntime: Shutting down VM
06-02 11:13:05.657 25030 25055 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 25055 (SDLThread)
06-02 11:13:05.660 521 521 D AEE_AED :
06-02 11:13:05.660 521 521 D AEE_AED : p 2 poll events 1 revents 1
06-02 11:13:05.662 521 521 D AEE_AED : PPM cpu cores:4, online:2
06-02 11:13:05.662 521 521 D AEE_AED : aed_main_fork_worker: generator 0xaaa14db0, worker 0xbee15944, recv_fd 0
06-02 11:13:05.664 25180 25180 I AEE_AED : handle_request(0)
06-02 11:13:05.664 25180 25180 I AEE_AED : check process 25030 name:m.aniface.aface
06-02 11:13:05.664 25180 25180 I AEE_AED : tid 25055 abort msg address:0xa2015000, si_code:-6 (request from 25030:10138)
06-02 11:13:05.664 25180 25180 W AEE_AED : debuggerd: handling request: pid=25030 uid=10138 gid=10138 tid=25055
06-02 11:13:05.670 25180 25180 I AEE_AED : [preset_info] pid: 25030, tid: 25055, name: SDLThread >>> com.aniface.aface <<<
06-02 11:13:05.671 25180 25180 D AEE_AED : ptrace_siblings
06-02 11:13:05.731 25180 25180 D AEE_AED : debuggerd: drop privileges
06-02 11:13:05.781 25180 25180 I AEE_AED : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-02 11:13:05.782 25180 25180 I AEE_AED : Build fingerprint: 'OUKITEL/U22/U22:7.0/NRD90M/1508468660:user/release-keys'
06-02 11:13:05.782 25180 25180 I AEE_AED : Revision: '0'
06-02 11:13:05.782 25180 25180 I AEE_AED : ABI: 'arm'
06-02 11:13:05.782 25180 25180 I AEE_AED : pid: 25030, tid: 25055, name: SDLThread >>> com.aniface.aface <<<
06-02 11:13:05.782 25180 25180 I AEE_AED : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
06-02 11:13:05.794 25180 25180 I AEE_AED : Abort message: '/buildbot/src/android/ndk-release-r19/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::length_error: vector" failed'
06-02 11:13:05.795 25180 25180 I AEE_AED : r0 00000000 r1 000061df r2 00000006 r3 00000008
06-02 11:13:05.795 25180 25180 I AEE_AED : r4 911fc978 r5 00000006 r6 911fc920 r7 0000010c
06-02 11:13:05.795 25180 25180 I AEE_AED : r8 8f656e49 r9 911f9b28 sl fbd00bff fp 00000000
06-02 11:13:05.795 25180 25180 I AEE_AED : ip 00000000 sp 911f9528 lr a9b867d7 pc a9b89034 cpsr 200f0010
06-02 11:13:05.815 25180 25180 I AEE_AED :
06-02 11:13:05.815 25180 25180 I AEE_AED : backtrace:
06-02 11:13:05.815 25180 25180 I AEE_AED : #00 pc 0004b034 /system/lib/libc.so (tgkill+12)
06-02 11:13:05.815 25180 25180 I AEE_AED : #1 pc 000487d3 /system/lib/libc.so (pthread_kill+34)
06-02 11:13:05.815 25180 25180 I AEE_AED : #2 pc 0001d785 /system/lib/libc.so (raise+10)
06-02 11:13:05.815 25180 25180 I AEE_AED : #3 pc 000192c1 /system/lib/libc.so (__libc_android_abort+34)
06-02 11:13:05.815 25180 25180 I AEE_AED : #4 pc 00017034 /system/lib/libc.so (abort+4)
06-02 11:13:05.816 25180 25180 I AEE_AED : #5 pc 0001b77f /system/lib/libc.so (__libc_fatal+22)
06-02 11:13:05.816 25180 25180 I AEE_AED : #6 pc 000194bb /system/lib/libc.so (__assert2+18)
06-02 11:13:05.816 25180 25180 I AEE_AED : #7 pc 00156019 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #8 pc 00156121 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #9 pc 00154679 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #10 pc 0015400f /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #11 pc 00153fd7 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so (__cxa_throw+74)
06-02 11:13:05.816 25180 25180 I AEE_AED : #12 pc 0000b04d /data/app/com.aniface.aface-2/lib/arm/libopencv_face.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #13 pc 0001d277 /data/app/com.aniface.aface-2/lib/arm/libopencv_face.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #14 pc 00021aeb /data/app/com.aniface.aface-2/lib/arm/libopencv_face.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #15 pc 0016844f /data/data/com.aniface.aface/files/app/_python_bundle/site-packages/cv2.so
06-02 11:13:05.816 25180 25180 I AEE_AED : #16 pc 00060750 /data/app/com.aniface.aface-2/lib/arm/libpython3.8m.so
06-02 11:13:06.399 212 212 I wmt_launcher: fw log ctrl flag has been set
06-02 11:13:06.399 212 212 I wmt_launcher: fw dynamic ctrl flag has been set
06-02 11:13:06.967 248 248 I thermal_repeater: oh, queryMdThermalInfo (0)No such file or directory
06-02 11:13:06.976 248 248 I thermal_repeater: [recvMdThermalInfo] ret=15, strLen=127, 2, 32767, -127
06-02 11:13:07.185 236 407 D AALLightSensor: newLux = 225, [225, 225] -> 319
06-02 11:13:08.400 212 212 I wmt_launcher: fw log ctrl flag has been set
06-02 11:13:08.400 212 212 I wmt_launcher: fw dynamic ctrl flag has been set
06-02 11:13:08.489 785 3234 D BatteryService: mBatteryVoltage=3716, batteryLevel=50
06-02 11:13:08.491 785 785 V ActivityManager: Broadcast sticky: Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) } ordered=false userid=-1 callerApp=null
06-02 11:13:08.499 908 908 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
06-02 11:13:08.502 908 908 D PowerUI : mBatteryProps.batteryTemperature=320,mLastBatteryTemperature =320
06-02 11:13:08.502 908 908 D PowerUI : oldTempBucket=0,tempBucket =0
06-02 11:13:08.502 785 1753 D AlarmManager: manual remove option = PendingIntent{63fdfe5: PendingIntentRecord{97d2879 com.android.systemui broadcastIntent}}
06-02 11:13:08.504 785 785 D fenghuan2: LowBatterystatus
06-02 11:13:08.505 785 785 D WifiService: onReceive, action:android.intent.action.BATTERY_CHANGED
06-02 11:13:08.505 785 869 D WifiController: DeviceActiveState{ when=0 what=155652 arg1=2 target=com.android.internal.util.StateMachine$SmHandler }
06-02 11:13:08.505 785 869 D WifiController: StaEnabledState{ when=0 what=155652 arg1=2 target=com.android.internal.util.StateMachine$SmHandler }
06-02 11:13:08.505 785 869 D WifiController: DefaultState{ when=0 what=155652 arg1=2 target=com.android.internal.util.StateMachine$SmHandler }
06-02 11:13:08.505 785 869 D WifiController: battery changed pluggedType: 2
06-02 11:13:08.507 785 798 D AlarmManager: manual remove option = PendingIntent{f884aba: PendingIntentRecord{11c7a1f com.android.systemui broadcastIntent}}
06-02 11:13:08.510 908 908 D BatteryMeterDrawable: onBatteryLevelChanged level:18,plugedIn:true,charging:true
06-02 11:13:08.510 908 908 D BatteryMeterDrawable: onBatteryLevelChanged level:18,plugedIn:true,charging:true
06-02 11:13:08.512 908 908 D KeyguardUpdateMonitor: handleBatteryUpdate
06-02 11:13:08.522 1321 1686 D HeadsetStateMachine: Disconnected process message: 10, size: 0
06-02 11:13:08.532 222 1216 I BufferQueueProducer: StatusBar queueBuffer: fps=0.25 dur=4032.60 max=4032.60 min=4032.60
06-02 11:13:08.538 222 222 I DisplayDevice: [Built-in Screen (type:0)] fps:0.248878,dur:4018.03,max:4018.03,min:4018.03
06-02 11:13:08.541 908 908 D BatteryMeterDrawable: onBatteryLevelChanged level:18,plugedIn:true,charging:true
06-02 11:13:08.543 908 908 D BatteryMeterDrawable: onBatteryLevelChanged level:18,plugedIn:true,charging:true
06-02 11:13:08.594 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.597 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.608 785 870 D WifiStateMachine: ConnectedState !CMD_RSSI_POLL rt=28236887/87850303 44 0 "TALKTALK1BACCC" 74:a5:28:1b:ac:d4 rssi=-61 f=2462 sc=60 link=65 tx=2.5, 0.0, 0.0 rx=9.0 bcn=0 [on:0 tx:0 rx:0 period:2999] from screen [on:0 period:1954889087] gl hn rssi=-56 ag=0 hr ticks 0,2,228 ls-=0 [56,56,56,56,61] brc=0 lrc=0 offload-stopped
06-02 11:13:08.611 785 870 D WifiStateMachine: L2ConnectedState !CMD_RSSI_POLL rt=28236889/87850305 44 0 "TALKTALK1BACCC" 74:a5:28:1b:ac:d4 rssi=-61 f=2462 sc=60 link=65 tx=2.5, 0.0, 0.0 rx=9.0 bcn=0 [on:0 tx:0 rx:0 period:3] from screen [on:0 period:1954889090] gl hn rssi=-56 ag=0 hr ticks 0,2,228 ls-=0 [56,56,56,56,61] brc=0 lrc=0 offload-stopped
06-02 11:13:08.611 785 870 D WifiStateMachine: get link layer stats 0
06-02 11:13:08.615 785 870 D WifiStateMachine: fetchRssiLinkSpeedAndFrequencyNative rssi=-61 linkspeed=65 freq=2462
06-02 11:13:08.615 785 870 D WifiStateMachine: mLastSignalLevel:3, newSignalLevel:3
06-02 11:13:08.615 785 870 D WifiConfigManager: updateConfiguration freq=2462 BSSID=74:a5:28:1b:ac:d4 RSSI=-60 "TALKTALK1BACCC"WPA_PSK
06-02 11:13:08.616 785 870 D WifiStateMachine: calculateWifiScore freq=2462 speed=65 score=60 highRSSI -> txbadrate=0.00 txgoodrate=1.25 txretriesrate=0.00 rxrate=4.52 userTriggerdPenalty0
06-02 11:13:08.616 785 870 D WifiStateMachine: good link -> stuck count =0
06-02 11:13:08.617 785 870 D WifiStateMachine: badRSSI count0 lowRSSI count0 --> score 56
06-02 11:13:08.617 785 870 D WifiStateMachine: isHighRSSI ---> score=61
06-02 11:13:08.619 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.619 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.620 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.621 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.620 785 870 V ActivityManager: Broadcast sticky: Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 (has extras) } ordered=false userid=-1 callerApp=ProcessRecord{d7667b7 785:system/1000}
06-02 11:13:08.624 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.630 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.630 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.630 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.634 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.635 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.636 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.641 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.641 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.641 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.644 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.645 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.703 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.703 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.703 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.704 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.705 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.707 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.708 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.708 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:08.708 25180 25180 E AEE_AED : aee_try_get_word: open:538976288 failed:2-No such file or directory
06-02 11:13:10.401 212 212 I wmt_launcher: fw log ctrl flag has been set
06-02 11:13:10.401 212 212 I wmt_launcher: fw dynamic ctrl flag has been set
06-02 11:13:10.411 25180 25180 I AEE_AED : request.action: 0
06-02 11:13:10.411 25180 25180 V AEE_AED : dashboard_record_update() : rec->module = com.aniface.aface
06-02 11:13:10.411 25180 25180 D AEE_AED : Duplicated exception, cnt = 9
06-02 11:13:10.411 25180 25180 D AEE_AED : Last exception time: 1591034251
06-02 11:13:10.411 25180 25180 D AEE_AED : cur time: 1591092790
06-02 11:13:10.411 25180 25180 D AEE_AED : Skip for Exp level'0'
06-02 11:13:10.424 521 521 D AEE_AED : clear ppm settings
06-02 11:13:10.424 521 521 D AEE_AED :
06-02 11:13:10.426 785 828 I BootReceiver: Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
06-02 11:13:10.449 785 25181 W ActivityManager: Force finishing activity com.aniface.aface/org.kivy.android.PythonActivity
06-02 11:13:10.463 785 25181 V WindowManager: Looking for focus: 12 = Window{eba5fd6 u0 StatusBar}, flags=-2122055608, canReceive=false
06-02 11:13:10.471 785 25181 V WindowManager: Set focused app to: AppWindowToken{928f698 token=Token{f91180a ActivityRecord{d015075 u0 com.android.launcher3/.Launcher t7040}}} old focus=AppWindowToken{5d06539 token=Token{4cd9383 ActivityRecord{ba71a32 u0 com.aniface.aface/org.kivy.android.PythonActivity t7072}}} moveFocusNow=true
06-02 11:13:10.471 785 25181 V WindowManager: Looking for focus: 12 = Window{eba5fd6 u0 StatusBar}, flags=-2122055608, canReceive=false
06-02 11:13:10.471 785 25181 V WindowManager: findFocusedWindow: Reached focused app=AppWindowToken{928f698 token=Token{f91180a ActivityRecord{d015075 u0 com.android.launcher3/.Launcher t7040}}} target=AppWindowToken{5d06539 token=Token{4cd9383 ActivityRecord{ba71a32 u0 com.aniface.aface/org.kivy.android.PythonActivity t7072}}}
06-02 11:13:10.483 785 25182 D AES : onEndOfErrorDumpThread: data_app_native_crash Process: com.aniface.aface
06-02 11:13:10.483 785 25182 D AES : Flags: 0x3888be46
06-02 11:13:10.483 785 25182 D AES : Package: com.aniface.aface v7211 (0.1)
06-02 11:13:10.483 785 25182 D AES : Foreground: Yes
06-02 11:13:10.483 785 25182 D AES : Build: OUKITEL/U22/U22:7.0/NRD90M/1508468660:user/release-keys
06-02 11:13:10.483 785 25182 D AES :
06-02 11:13:10.483 785 25182 D AES : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-02 11:13:10.483 785 25182 D AES : Build fingerprint: 'OUKITEL/U22/U22:7.0/NRD90M/1508468660:user/release-keys'
06-02 11:13:10.483 785 25182 D AES : Revision: '0'
06-02 11:13:10.483 785 25182 D AES : ABI: 'arm'
06-02 11:13:10.483 785 25182 D AES : pid: 25030, tid: 25055, name: SDLThread >>> com.aniface.aface <<<
06-02 11:13:10.483 785 25182 D AES : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
06-02 11:13:10.483 785 25182 D AES : Abort message: '/buildbot/src/android/ndk-release-r19/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::length_error: vector" failed'
06-02 11:13:10.483 785 25182 D AES : r0 00000000 r1 000061df r2 00000006 r3 00000008
06-02 11:13:10.483 785 25182 D AES : r4 911fc978 r5 00000006 r6 911fc920 r7 0000010c
06-02 11:13:10.483 785 25182 D AES : r8 8f656e49 r9 911f9b28 sl fbd00bff fp 00000000
06-02 11:13:10.483 785 25182 D AES : ip 00000000 sp 911f9528 lr a9b867d7 pc a9b89034 cpsr 200f0010
06-02 11:13:10.483 785 25182 D AES :
06-02 11:13:10.483 785 25182 D AES : backtrace:
06-02 11:13:10.483 785 25182 D AES : #00 pc 0004b034 /system/lib/libc.so (tgkill+12)
06-02 11:13:10.483 785 25182 D AES : #1 pc 000487d3 /system/lib/libc.so (pthread_kill+34)
06-02 11:13:10.483 785 25182 D AES : #2 pc 0001d785 /system/lib/libc.so (raise+10)
06-02 11:13:10.483 785 25182 D AES : #3 pc 000192c1 /system/lib/libc.so (__libc_android_abort+34)
06-02 11:13:10.483 785 25182 D AES : #4 pc 00017034 /system/lib/libc.so (abort+4)
06-02 11:13:10.483 785 25182 D AES : #5 pc 0001b77f /system/lib/libc.so (__libc_fatal+22)
06-02 11:13:10.483 785 25182 D AES : #6 pc 000194bb /system/lib/libc.so (__assert2+18)
06-02 11:13:10.483 785 25182 D AES : #7 pc 00156019 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:10.483 785 25182 D AES : #8 pc 00156121 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:10.483 785 25182 D AES : #9 pc 00154679 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:10.483 785 25182 D AES : #10 pc 0015400f /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so
06-02 11:13:10.483 785 25182 D AES : #11 pc 00153fd7 /data/app/com.aniface.aface-2/lib/arm/libopencv_core.so (__cxa_throw+74)
06-02 11:13:10.483 785 25182 D AES : #12 pc 0000b04d /data/app/com.aniface.aface-2/lib/arm/libopencv_face.so
06-02 11:13:10.483 785 25182 D AES : #13 pc 0001d277 /data/app/com.aniface.aface-2/lib/arm/libopencv_face.so
06-02 11:13:10.483 785 25182 D AES : #14 pc 00021aeb /data/app/com.aniface.aface-2/lib/arm/libopencv_face.so
06-02 11:13:10.483 785 25182 D AES : #15 pc 0016844f /data/data/com.aniface.aface/files/app/_python_bundle/site-packages/cv2.so
06-02 11:13:10.483 785 25182 D AES : #16 pc 00060750 /data/app/com.aniface.aface-2/lib/arm/libpython3.8m.so
06-02 11:13:10.483 785 25182 D AES : 25030
06-02 11:13:10.483 785 25182 W AES : Exception Log handling...
06-02 11:13:10.485 222 222 I DisplayDevice: [Built-in Screen (type:0)] fps:0.513412,dur:1947.75,max:1947.75,min:1947.75
06-02 11:13:10.497 785 25182 D AES : ExceptionLog: notify aed
06-02 11:13:10.497 785 25182 D AES : process : com.aniface.aface
06-02 11:13:10.497 785 25182 D AES : module : com.aniface.aface v7211 (0.1)
06-02 11:13:10.497 785 25182 D AES :
06-02 11:13:10.497 785 25182 D AES : cause : data_app_native_crash
06-02 11:13:10.497 785 25182 D AES : pid : 25030