android - samsung nexus (4.4.4): Fatal signal 6 (SIGABRT) code=-6 -


i'm using dlib development of head pose estimation android app. problem appears only when i'm trying run app on samsung nexus (android 4.4.4). on samsung gt-p3110 (with android 4.1.2) works.

this logs:

i/native: jni_head_pose_det.cpp:183 initializing new headposeestimation, landmarkpath /storage/emulated/0/selfear2/data/shape_predictor_68_face_landmarks.dat , mode 0and params...  a/libc: fatal signal 6 (sigabrt) @ 0x0000081b (code=-6), thread 2075 

while researching on error code tried - https://stackoverflow.com/a/34218851/5582959 - (known issue getstringutfchars), change encoding of landmarkpath didn't help.

would appreciate help.

edit: code jniinit method:

jint jniexport jnicall dlib_jni_method(jniinit)(jnienv* env, jobject thiz,         jstring landmarkpath,         jint mode,         jfloat fx,         jfloat fy,         jfloat cx,         jfloat cy,         jfloat k1,         jfloat k2,         jfloat p1,         jfloat p2,         jfloat k3) { // initialize new estimator if it's not there if (!gheadposeestimationptr) { const char* landmarkmodel_path = env->getstringutfchars(landmarkpath, 0); log(info) << "initializing new headposeestimation, landmarkpath " << landmarkmodel_path << " , mode "<< mode << "and params..."; gheadposeestimationptr = std::make_shared<headposeestimation>(landmarkmodel_path, mode, fx, fy, cx, cy, k1, k2, p1, p2, k3); env->releasestringutfchars(landmarkpath, landmarkmodel_path); } 
  • landmarkpath = /storage/emulated/0/selfear2/data/shape_predictor_68_face_landmarks.dat
  • jint mode = 0
  • as jfloat parameters i'm passing zeroes

constructor headposeestimation

headposeestimation::headposeestimation(const string& face_detection_model, int mod,  float fx, float fy, float cx, float cy,  float k1, float k2, float p1, float p2, float k3) { // load face detection , pose estimation models. detector = get_frontal_face_detector(); deserialize(face_detection_model) >> pose_model; mode = mod; // set correct mode  // set cameramatrix cv::mat m = cv::mat::zeros(3,3,cv_32f); cameramatrix = m; cameramatrix(0,0) = fx; // focallengthx cameramatrix(1,1) = fy; // focallengthy cameramatrix(0,2) = cx; // opticalcenterx cameramatrix(1,2) = cy; // opticalcentery cameramatrix(2,2) = 1; log(info) << "initialized camera matrix with:\n{fx} = " << fx << " {0}" << " {cx} = " << cx          << "\n{0}" << " {fy} = " << fy << " {cy} = " << cy <<         "\n{0} {0} {1}";  distcoeffs = (mat1d(1, 5) << k1, k2, p1, p2, k3); log(info) << "initialized default camera distortion matrix with:\n{k1} = " << k1 << " {k2} = " << k2 << " {p1} = " << p1  << " {p2} = " << p2<< " {k3} = " << k3;  } 

edit 2 after debugging constructor found exception thrown while deserializing:

error deserializing object of type short                                                             while  deserializing floating point number.                                                             while  deserializing dlib::matrix                                                             while  deserializing object of type std::vector                                                             while  deserializing object of type std::vector                                                             while  deserializing object of type std::vector 


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -