RKNN版本
D RKNNAPI: RKNN VERSION:
D RKNNAPI: API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI: DRV: 1.6.0 (159d2d3 build: 2021-01-12 15:23:09)
D RKNNAPI: ==============================================
程序报错输出
double free or corruption (!prev)
报错堆栈
Thread 4 "face_detection" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fae750e40 (LWP 2935)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
#0 0x0000007fb6c7e598 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x0000007fb6c7f974 in __GI_abort () at abort.c:79
#2 0x0000007fb6cb872c in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fb6d797e0 "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x0000007fb6cbeaa4 in malloc_printerr (str=str@entry=0x7fb6d754d8 "double free or corruption (!prev)") at malloc.c:5342
#4 0x0000007fb6cc0714 in _int_free (av=0x7fa4000020, p=0x7fa4296640, have_lock=<optimized out>) at malloc.c:4311
#5 0x0000007fb750fd70 in rockx_image_release () at /home/linaro/workspace/RockX_SDK_V1.6/demo/command_line_demo/install/rockx_linux_rk3399pro/face_detection/../lib/librockx.so
#6 0x0000007fb7540d30 in () at /home/linaro/workspace/RockX_SDK_V1.6/demo/command_line_demo/install/rockx_linux_rk3399pro/face_detection/../lib/librockx.so
#7 0x0000007fb753bdf0 in rockx_face_landmark () at /home/linaro/workspace/RockX_SDK_V1.6/demo/command_line_demo/install/rockx_linux_rk3399pro/face_detection/../lib/librockx.so
#8 0x000000555555966c in detect_face(rockx_handle_t, rockx_handle_t, rockx_handle_t, cv::Mat&, std::vector<FaceObject, std::allocator<FaceObject> >&) (face_det_handle=0x7fa4000b20, face_landmark_handle=0x7fa4004740, face_landmark5_handle=0x7fa40d3300, image=..., faceobjects=std::vector of length 0, capacity 0) at /home/linaro/workspace/RockX_SDK_V1.6/demo/command_line_demo/facedetection/scrfdface.cpp:79
#9 0x0000005555559b1c in process_camera_data() () at /home/linaro/workspace/RockX_SDK_V1.6/demo/command_line_demo/facedetection/scrfdface.cpp:227
#10 0x000000555555b58c in std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) (__f=@0x55555d03e8: 0x5555559948 <process_camera_data()>) at /usr/include/c++/7/bits/invoke.h:60
#11 0x000000555555b048 in std::__invoke<void (*)()>(void (*&&)()) (__fn=@0x55555d03e8: 0x5555559948 <process_camera_data()>) at /usr/include/c++/7/bits/invoke.h:95
#12 0x000000555555c354 in std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x55555d03e8) at /usr/include/c++/7/thread:234
#13 0x000000555555c308 in std::thread::_Invoker<std::tuple<void (*)()> >:perator()() (this=0x55555d03e8) at /usr/include/c++/7/thread:243
#14 0x000000555555c2d4 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() (this=0x55555d03e0) at /usr/include/c++/7/thread:186
#15 0x0000007fb6eb0e94 in () at /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#16 0x0000007fb6dac088 in start_thread (arg=0x7fffffef4f) at pthread_create.c:463
#17 0x0000007fb6d1c0cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
// create rockx_face_array_t for store result
rockx_object_array_t face_array;
memset(&face_array, 0, sizeof(rockx_object_array_t));
// detect face
ret = rockx_face_detect(face_det_handle, &input_image, &face_array);
if (ret != ROCKX_RET_SUCCESS)
{
printf("rockx_face_detect error %d\n", ret);
return -1;
}
/*************** FACE Landmark ***************/
// detect landmark for every face
for (int i = 0; i < face_array.count; i++)
{
int left = face_array.object[i].box.left;
int top = face_array.object[i].box.top;
int right = face_array.object[i].box.right;
int bottom = face_array.object[i].box.bottom;
float score = face_array.object[i].score;
printf("box=(%d %d %d %d) score=%f\n", left, top, right, bottom, score);