Ask Your Question
0

v.4.0.1 android SIGBUS crash

asked 2019-02-24 08:27:51 -0600

Vlad_O gravatar image

updated 2019-02-25 16:46:05 -0600

Hi, I've built v.4.0.1 for android both for armv7 and arm64 using the c++_shared stl on windows. Both builds were successfull. When executing calcOpticalFlowPyrLK(prevGray, gray, inPoints, outPoints, status, err, winSize, maxLevel, termcrit, lkFlags, minEigenThreshold); on an arm64 device, all seems to work well but on a 32bit armv7, I get a SIGBUS signal telling me i have some data alignment issues with this trace:
2019-02-24 16:15:01.112 22884-22884/? A/DEBUG: backtrace: 2019-02-24 16:15:01.112 22884-22884/? A/DEBUG: #00 pc 002aae0e /data/app/com.sesame.phone_nougat-1/lib/arm/libSesameEngine.so 2019-02-24 16:15:01.113 22884-22884/? A/DEBUG: #01 pc 002a72cd /data/app/com.sesame.phone_nougat-1/lib/arm/libSesameEngine.so 2019-02-24 16:15:01.113 22884-22884/? A/DEBUG: #02 pc 002a6cad /data/app/com.sesame.phone_nougat-1/lib/arm/libSesameEngine.so (_ZN2cv7pyrDownERKNS_11_InputArrayERKNS_12_OutputArrayERKNS_5Size_IiEEi+168) 2019-02-24 16:15:01.113 22884-22884/? A/DEBUG: #03 pc 001fab51 /data/app/com.sesame.phone_nougat-1/lib/arm/libSesameEngine.so (_ZN2cv23buildOpticalFlowPyramidERKNS_11_InputArrayERKNS_12_OutputArrayENS_5Size_IiEEibiib+800) 2019-02-24 16:15:01.113 22884-22884/? A/DEBUG: #04 pc 001fc91f /data/app/com.sesame.phone_nougat-1/lib/arm/libSesameEngine.so 2019-02-24 16:15:01.113 22884-22884/? A/DEBUG: #05 pc 001fb319 /data/app/com.sesame.phone_nougat-1/lib/arm/libSesameEngine.so (_ZN2cv20calcOpticalFlowPyrLKERKNS_11_InputArrayES2_S2_RKNS_17_InputOutputArrayERKNS_12_OutputArrayES8_NS_5Size_IiEEiNS_12TermCriteriaEid+100) I've checked all the matrices and vectors and they all seem fine, I've also tried v.3.4.5, and got the same results. This crash is also occuring for me on the official release binaries for 4.0.1 with c++_static stl.

Maybe i'm building OpenCV wrong or something but i can't figure it out. Can anyone point me in the right direction?

Edit: Doesn't happen in 3.1.0.

edit retag flag offensive close merge delete

Comments

I've been struggling with this same issue all week! I'm also using OpenCV 4.0.1. I ran across the crash in the same module (pyramids), but in a different function -- pyrDown.

Getting the error: signal 7 (SIGBUS), code 1 (BUS_ADRALN)

Are you by any chance testing on an LG phone? In production we've only seen this issue crop up with the following list of devices:

LG Stylo 4 (cv7a), LG K8(2018) (cv1), LG Premier Pro (cv3), LG Q7+ (cv5a), LG K20 (lv517n), LG Q6 (mh), LG Aristo 3 (cv1s), LG Q6 (mhn)

All other devices seem to be able to run this function just fine and I don't have any problems. We've been unable to reproduce the issue locally, as the LG Stylo 4 we bought to test this problem (sadly) works just fine. We only see the bug on a few users' phones.

HanClinto gravatar imageHanClinto ( 2019-03-28 10:22:24 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-03-28 12:20:46 -0600

HanClinto gravatar image

My guess is that this is the issue that we're running into: https://github.com/opencv/opencv/issu...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-02-24 08:27:51 -0600

Seen: 541 times

Last updated: Mar 28 '19