-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
next frame die~~crash when grab the next frame #13
Comments
Hi, Thank you for reporting this, but could you please elaborate more about when this situation occurred? Is If this is the case, then grabber in native code is already destroyed, so this code, called in capture.cpp from OpenIMAJ natives will most probably fail: void grabNextFrame(VideoGrabber * grabber) {
for (;;) {
fd_set fds;
struct timeval tv;
int r;
FD_ZERO (&fds);
FD_SET (grabber->fd, &fds); If this is not the case, I will have to deep a little more to find possible root cause. |
I was able to reproduce java core with this code plus public class TestMe implements WebcamListener {
static {
Webcam.handleTermSignal(true);
}
public TestMe() {
Webcam w = Webcam.getDefault();
w.addWebcamListener(this);
while (true) {
w.getImage();
}
}
public static void main(String[] args) throws Throwable {
new TestMe();
}
@Override
public void webcamOpen(WebcamEvent we) {
System.err.println("Now, kill me please!");
}
@Override
public void webcamClosed(WebcamEvent we) { }
@Override
public void webcamDisposed(WebcamEvent we) { }
} But native stack trace is a little bit different:
However, I performed some tuning in threads synchronization and was able to eliminate it. In case of your problem my assumption is that there are two threads, first one destroy native grabber, and the second one try to use it. Could you please verify if the newest code drop fixed issue you are facing in your project? Please reopen the issue if problem persist. |
https://gist.github.com/4489935 i grab the image from another thread,and if i reproduce this crash again,i will report here,thanks.it just some times happen. |
The second thread which was disposing However this was fixed and I'm looking forward to hear some good news from you :) |
yes,i have implement the p2p video chat via your project and the xuggler,for now ,i need to handle the android p2p filetransfer and videochat too... |
Great! Thank you @hepin1989 !! |
The text was updated successfully, but these errors were encountered: