Hello,
I need to grab the camera image which I am accessing trough the attached code. When I run from the IDE, it works fine, but when I sign the code, it crashes when calling this line:
if (vuImageGetImageInfo(image, info) != VU_SUCCESS) {}
This is the error:
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20 in tid 24378 (GLThread 5756), pid 23872 (snoopstar.stage)
I used the Vuforia Sample and the latest SDK.
How can I debug this problem? I tried a lot of classes in the proguard file, but onyl vuforia code is called in this steps..
This is the code executed in prepareToRender:
VuCameraFrame *frame = nullptr;
if (vuStateGetCameraFrame(state, &frame) != VU_SUCCESS) {
return;
}
VuImageList *images = nullptr;
if (frame != nullptr) {
vuImageListCreate(&images);
vuCameraFrameGetImages(frame, images);
int listSize = 0;
vuImageListGetSize(images, &listSize);
if (listSize > 0) {
for (int i = 0; i < listSize; i++) {
VuImage *image;
if (vuImageListGetElement(images, i, &image) != VU_SUCCESS) {
continue;
}
VuImageInfo* info;
if (vuImageGetImageInfo(image, info) != VU_SUCCESS) {
continue;
}
if (info->width <= 0 || info->height <= 0) {
continue;
}
if (
info->format == VU_IMAGE_PIXEL_FORMAT_YUV420P
|| info->format == VU_IMAGE_PIXEL_FORMAT_YUYV
|| info->format == VU_IMAGE_PIXEL_FORMAT_YV12
|| info->format == VU_IMAGE_PIXEL_FORMAT_NV21
|| info->format == VU_IMAGE_PIXEL_FORMAT_NV12
) {
mImageGrabCallback(info);
}
}
}
vuImageListDestroy(images);
}
Thanks for you help.