i don't know why error thrown. when loop used app crash. importing arraylist < arraylist < point > > ndk. can't open video files in ndk opencv videoprocessing, hence getting positions javacv on java side (i new android in general , not find more elegant method)
the outer array has length of 10 (max 50) , inner has varying length (200 - 500)
i thought maybe due memory limits in android. believe cannot because ran empty loop iterating 10 times. gives me same error. don't understand error means.
i new android. can me out? how should go this? grateful , suggestions. in advance!
code:
// class totd obj arraylist jclass totd = env -> findclass ("java/util/arraylist"); //methods in totd jmethodid totd_get = env-> getmethodid (totd, "get", "(i)ljava/lang/object;"); jmethodid totd_size = env-> getmethodid (totd, "size", "()i"); //get length of arraylist jint totd_len = env-> callintmethod (totdat,totd_size); //start loop each frame process data: jint i; vector<vector<point> > totalpnts; (i=0;i<=totd_len;i++){ //get postion data current frame jobject fd = env-> callobjectmethod (totdat,totd_get,i); jclass curd = env-> findclass ("java/util/arraylist"); //get methods of inner array jmethodid curd_get = env-> getmethodid (curd, "get", "(i)ljava/lang/object;"); jmethodid curd_size = env-> getmethodid (curd, "size", "()i"); //get no. of objects found jint objcnt = env-> callintmethod (fd,curd_size); //extract data point jlong j = 0; vector<point> framepnts; //for(j = 0; j <= objcnt ; j++){ //id objlist jobject ptxy = env-> callobjectmethod (fd,curd_get,j); jclass pnt = env-> getobjectclass(ptxy); jmethodid constr = env->getmethodid(pnt, "<init>", "(ii)v"); jfieldid fix = env->getfieldid(pnt, "x", "i"); jfieldid fiy = env->getfieldid(pnt, "y", "i"); point xy; xy.x = env-> getintfield(ptxy,fix); xy.y = env-> getintfield(ptxy,fiy); framepnts.push_back(xy); //} totalpnts.push_back(framepnts); }
error:
05-08 13:30:38.593: e/dalvikvm(17064): vm aborting 05-08 13:30:38.595: a/libc(17064): fatal signal 6 (sigabrt) @ 0x000042a8 (code=-6), thread 17064 (st.trackerproto)
im not ndk/c++ world i know debugging in ndk world complicated task. java side fatal signal n (sigabrt)
(no matter happens on ndk layer) means there error happens in c++ code. wont know kind of error (however n value different 6 or 11) since java , can't know why. thinking loop issue don't know sure, maybe happens after loop or before or inside. wrong c++ code sure.
please refer debugging android ndk native apps
Comments
Post a Comment