Ask Your Question
0

android native camera crash

asked 2013-10-02 06:17:51 -0600

avilleret gravatar image

updated 2013-10-03 04:00:45 -0600

Hi,

I know there are lots of posts regarding Android native camera access issues, but I think my case differ a little bit from other to post my own question... (hope i'm right :-) )

I'm trying to open a camera from a cpp code called from another library (libpd).

When I call : new cv::VideoCapture(CV_CAP_ANDROID + 0);

The app crashes, logcat *:E tells :

E/SensorManager(21134): thread start
E/OpenCV_for_Tegra(21134): Tegra Version detected: 0
E/AudioPolicyService( 1848): getOutput() tid 1848 ++
E/AudioPolicyService( 1848): getOutput() tid 1848 --
E/SpannableStringBuilder(21134): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(21134): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/OpenCV::camera(21134): ||libnative_camera_r2.3.3.so
E/OpenCV::camera(21134): ||libnative_camera_r4.3.0.so
E/OpenCV::camera(21134): ||libnative_camera_r4.2.0.so
E/OpenCV::camera(21134): ||libnative_camera_r2.2.0.so
E/OpenCV::camera(21134): ||libnative_camera_r4.0.0.so
E/OpenCV::camera(21134): ||libnative_camera_r4.0.3.so
E/OpenCV::camera(21134): ||libnative_camera_r4.1.1.so
E/OpenCV::camera(21134): ||libnative_camera_r3.0.1.so
E/DivXPlugin( 1847): DivXPlugin::onOpenDecryptSession() Not a Divx File.
E/OpenCV::camera(21134): calling (*pGetPropertyC)(0x4d9a96f0, 0)
E/OpenCV::camera(21134): calling (*pGetPropertyC)(0x4d9a96f0, 1)
E/OpenCV::camera(21134): calling (*pGetPropertyC)(0x4d9a96f0, 4)
E/cv::error()(21134): OpenCV Error: One of arguments' values is out of range (Failed attempt to GET unsupported camera property.) in virtual double CvCapture_Android::getProperty(int), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/highgui/src/cap_android.cpp, line 293
F/libc    (21134): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 22225 (AudioTrack)
E/SecCameraHardware( 1848): Could not dequeue gralloc buffer!
E/ISecCameraHardware( 1848): previewThread: error, nativeFlushSurface
E/InputDispatcher( 2129): channel ~ Channel is unrecoverably broken and will be disposed!
E/SecCameraHardware( 1848): Could not dequeue gralloc buffer!
E/InputDispatcher( 2129): channel ~ Channel is unrecoverably broken and will be disposed!
E/ISecCameraHardware( 1848): previewThread: error, nativeFlushSurface
E/SecCameraHardware( 1848): Could not dequeue gralloc buffer!
E/ISecCameraHardware( 1848): previewThread: error, nativeFlushSurface
E/SecCameraHardware( 1848): Could not dequeue gralloc buffer!
E/ISecCameraHardware( 1848): previewThread: error, nativeFlushSurface
E/SecCameraHardware( 1848): Could not dequeue gralloc buffer!
E/ISecCameraHardware( 1848): previewThread: error, nativeFlushSurface
E/ISecCameraHardware( 1848): setPreviewWindow: NULL Surface!
E/PowerManagerService( 2129): CurLock p:3 mPS:1

I'm surprised because the sample Native Activity works fine.

I'm using OpenCV4Android 2.4.6 r2 and targeting to Android 4.3 (also tried 4.1.2).

Could someone help me on this ?

Thanks ! a

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-03 04:25:48 -0600

I recommend you to create a ticket on code.opencv.org with full logcat log and full problem description. It looks like a bug on OpenCV size.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-10-02 06:17:51 -0600

Seen: 1,801 times

Last updated: Oct 03 '13