Skip to content
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

SIGSEGV when running Webcam Capture API on Raspberry Pi model B #315

Open
sarxos opened this issue Feb 17, 2015 · 2 comments
Open

SIGSEGV when running Webcam Capture API on Raspberry Pi model B #315

sarxos opened this issue Feb 17, 2015 · 2 comments

Comments

@sarxos
Copy link
Owner

sarxos commented Feb 17, 2015

[atomic-processor-1] INFO com.github.sarxos.webcam.ds.cgt.WebcamOpenTask - Opening webcam USB2.0 Camera /dev/video0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xa8838a64, pid=4577, tid=2827678832
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) Client VM (24.0-b56 mixed mode linux-arm )
# Problematic frame:
# C  [OpenIMAJGrabber.so+0x1a64]  Device::getIdentifier()+0x14
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/pi/Desktop/webcam-capture-parent/webcam-capture-examples/webcam-capture-test/hs_err_pid4577.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
@iwasaki-kenta
Copy link

Hello sarxos,

Thanks a lot for the wonderful wrapper for webcam capturing, though do you have any estimated time of date for when this issue notably with the Raspberry Pi B+ will be fixed?

I am currently using the Pi for a regional science fair project competition with your library, and would want to display a demo of the program on a Raspberry Pi. Though, I have obtained this exact error as well.

@sarxos
Copy link
Owner Author

sarxos commented Feb 24, 2015

Hi @Dranithix,

This issue can be observed when using default capture driver (or webcam-capture-vlcj-driver, but the SIGSEGV stack is different in this case). I doubt it can be fixed without changes in the BridJ issue 525 so I would not expect this to be done soon.

The good news is that I managed to run Webcam Capture API on my RasPi model B using webcam-capture-driver-v4l4j. Therefore, everything should work well in your case when you set it instead of default one.

// set Webcam Capture V4L4J driver to be used instead of default one
static {
    Webcam.setDriver(new V4l4jDriver());
}

// do the other things you would like to do
public static void main(String[] args) throws Exception {
    Webcam webcam = Webcam.getDefault();
    webcam.open();
    ImageIO.write(webcam.getImage(), "PNG", new File("hello-world.png"));
    webcam.close();
}

But, as I stated above, it was tested on model B and I'm not sure how B+ will react with the *.so library compiled on B.

Just FYI, to make use of webcam-capture-driver-v4l4j you should add these JARs to your classpath:

sarxos added a commit that referenced this issue Feb 26, 2015
refs #286
refs #315
refs #244
refs #219
refs #194
refs #192
refs #189
refs #184
refs #176
refs #153
refs #152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants