nakkaya / vision

OpenCV wrapper for Clojure
http://nakkaya.com/vision.html
132 stars 17 forks source link

Java crashes with exit code 134 #1

Closed ghost closed 13 years ago

ghost commented 13 years ago

Hello, I'm trying to run the examples with webcam. After calling start, the window with video is apperars for a moment, and then java process crashes with exit code 134. I found that call to query-frame causes the crash. Java version is 1.6.0_24 by sun and OpenCV version is 2.1.0-2 Here is the log: http://pastebin.com/2pg9Z0ke

nakkaya commented 13 years ago

dnaumov Hi,

query-frame does not do anything, it just calls cvQueryFrame. Can you try putting together a simple webcam app that does the same in C and try that, the reason is that I had the same problem on one of my Linux boxes with ps3 eye. Same symptoms query-frame crash after showing few frames, my C version also crashed when calling cvQueryFrame. In my case I tried switching distros / downgrading opencv but non of them made a difference.

ghost commented 13 years ago

Following C code works fine:

#include <cv.h>
#include <highgui.h>

int main()
{
  CvCapture *capture = cvCreateCameraCapture(0);
  if(capture == NULL)
    return 0;
  IplImage *frame = NULL;
  cvNamedWindow("camera", CV_WINDOW_AUTOSIZE);

  while(1)
    {
      frame = cvQueryFrame(capture);
      cvShowImage("camera", frame);

      char c = cvWaitKey(33);
      if(c == 27) break;
    }

  cvReleaseCapture(&capture);
  return 0;
}

calibrate_cam program also shows the video.

Webcam is normal USB A4Tech PK-720MJ and uname -a is Linux desktop 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux

ghost commented 13 years ago

BTW, I've also have problems with FMJ. FMJStudio crashes, sometimes silently, sometimes with UnsupportedFormatException when I've tried to capture video from the webcam. I'll try to test both vision and FMJ on several linux machines tomorrow.

ghost commented 13 years ago

Same thing on emachines e732g with 2.6.38 kernel. http://pastebin.com/wGFiCR3p

nakkaya commented 13 years ago

dnaumov Hi,

Does the samples that come with OpenCV cause any problems?

ghost commented 13 years ago

Sorry for the delay!

No, samples from opencv-doc package are working well.

Arrgh, sorry for reopening - I've pressed "comment and close" button instead of "comment" again.