-
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
OpenIMAJGrabber fatal error on Beaglebone Black Ubuntu armhf and Java 1.8.0 #152
Comments
Here's what I see output to the console: Here's the hs_err_pid file: Some more details:
|
Hi, Thank you one more time for the report and very detailed description. Could you please remove the copy of <dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture</artifactId>
<version>0.3.10-RC5</version>
</dependency> But you will have to add this repository into your POM: <repository>
<id>SarXos Repository</id>
<url>http://www.sarxos.pl/repo/maven2</url>
</repository> The newest version should work fine without |
Hi, please hold on. I found that I didn't include the fix I mentioned above in the 0.3.10-RC5. Will release 0.3.10-RC6 and let you know ASAP. I'm sorry for making you confused. |
Ok, the newest Webcam Capture API, that is 0.3.10-RC6, contains the fix for *.so files extraction from JAR and some synchronization tweeks. Can you please try it instead of 0.3.9? Repository: <repository>
<id>SarXos Repository</id>
<url>http://www.sarxos.pl/repo/maven2</url>
</repository> Dependency: <dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture</artifactId>
<version>0.3.10-RC6</version>
</dependency> If you do not want to use Maven, you can also download ZIP assembly: If this won't help we will have to investigate this issue much deeper. |
@sarxos, thanks for a quick response! |
Sorry about the delay. Had to get my motherboard replaced, took forever!
This is both on the 1.8.0 and 1.7.0 Java. I removed the OpenIMAJGrabber.so like you asked. |
Ok, I can't seem to run it on my Mac from the command line either. This is probably a missing JAR issue. I'm using Maven, though, and I copied all the libs. Hmm.. Let me see if I can figure this out. update: |
Ok, had to add a few random dependencies to the POM, but it seems to at least run from the command line now. Looks like the issue is still there:
More info is coming in a second |
Here's the output from
Console output: http://www.atomic-cactus.com/armhf/10272013/console.txt PS: as before, this works with OpenJDK 1.7.0 (the soft-float version) |
Hi, Thank you for more details. Indeed, the first issue you've went into was caused by missing BridJ JAR. It can be found in ZIP package: webcam-capture-0.3.10-RC6-dist.zip I will take a closer look on the hs_err_pid you included. I can try to reproduce this issue on my RasPi, but I would have to know from where I can download Ubuntu image you have installed on you HW. I almost know what is happening here but I have to verify this with guys from OpenIMAJ. Stack trace:
We can see that boolean started = grabber.startSession(size.width, size.height, 50, Pointer.pointerTo(device)); It calls native: bool OpenIMAJGrabber::startSession(int width, int height, double rate, Device * device) {
if (device == NULL) {
DeviceList * list = getVideoDevices();
if (list->getNumDevices() > 0) {
device = list->getDevice(0);
}
delete list;
}
if (device == NULL) {
return false;
}
data = new VideoGrabber();
strcpy(VG->dev_name, device->getIdentifier());
VG->requested_width = width;
VG->requested_height = height;
VG->requested_rate = rate;
VG->timeout = 5000;
if (open_device(VG) < 0) return false;
if (init_device(VG) < 0) return false;
if (start_capturing(VG) < 0) return false;
return true;
} And fails on: strcpy(VG->dev_name, device->getIdentifier()); But when you check the last method, it seems to be really trivial: const char* Device::getIdentifier() {
return identifier;
} Therefore I guess that something is wrong with the identifier field - maybe |
It does seem like an OpenIMAJGrabber problem. I have both a Raspberry Pi and a BeagleBone Black which I tried to run this on. On the Pi I could not get the uvcvideo driver to work, so I gave up. Plus, that device is a bit slow for my needs. So I am currently using a BeagleBone Black. Not sure if this helps. Here's the Ubuntu distro I have installed: I haven't looked, but is there an interface one can implement to create a new driver? Maybe I could create a v4l4j driver: https://code.google.com/p/v4l4j/ |
May I ask u one question. May you tell me how to set size frame show camera??(Jpanel show came not jframe) Another Pc when show camera use your lib frame show camera bigger or smaller . I want to fix frame show camera plzz tell me where Can i fix it in your project plzz email for support : spicelove8x@hotmail.com thanks. EDIT: Moved to #154 |
Hi @spicelove, I moved your question to #154, please check it for the answer you are looking for :) I encourage users to create separate issues for the different problems so communication is clear, resolution fast and original issues not affected. |
Hi @AtomicCactus, I had this post almost written, but my stupid WinXP terminated itself with blue screen and now I have to start it over again. Ok, if you want to create new capture driver, it's enough to implement two interfaces - WebcamDriver and WebcamDevice, but why to bother and creating new driver for v4l4j if there is existing one webcam-capture-driver-v4l4j. Currently it supports 64-bit Linux only, but with a little bit of development magic it should easily run on any arch. I've customized v4l4j a little bit and added one class to make this magic easier to cast. My fork can be found here: https://github.com/sarxos/v4l4j-wc And the only class added to the overall solution is: https://github.com/sarxos/v4l4j-wc/blob/master/src/main/java/au/edu/jcu/v4l4j/V4L4J.java It must be modified to support architectures other than 64-bit. Especially, native libraries have to be compiled for these archs. Take a look on the code - it's trivial, what would have to be added here is a detection feature which will check runtime against 64-, 32-, armel or armhf architecture, and load specific *.so object. This is how I would see it: try {
if (!isLinux()) {
throw new RuntimeException("Ooops, only Linux is supported!");
} else {
if (is64()) {
NativeUtils.loadLibraryFromJar("/META-INF/native/linux64", new String[] { "video", "v4l4j" });
} else if (is32()) {
NativeUtils.loadLibraryFromJar("/META-INF/native/linux32", new String[] { "video", "v4l4j" });
} else if (isArmel()) {
NativeUtils.loadLibraryFromJar("/META-INF/native/linuxarmel", new String[] { "video", "v4l4j" });
} else if (isArmhf()) {
NativeUtils.loadLibraryFromJar("/META-INF/native/linuxarmhf", new String[] { "video", "v4l4j" });
}
}
} catch (IOException e) {
e.printStackTrace();
} After native *.so are ready and above code modified, it's enough to change POM in webcam-capture-driver-v4l4j to use newer version and Please let me know if you would like to follow this path to use v4l4j under the hood of Webcam Capture on your BeagleBone. I will then try to compile it first on my RasPi. |
I encounter the same issue currently on Arch Linux but cannot seem to figure out how to fix this.. |
Trying to get Webcam Capture working on the Beaglebone Black running Ubuntu Precise 12.04.2 LTS Hard Float Minimal Image.
Webcam Capture version:
BridJ Jar replaced with this version (was having issues with the one included in 0.3.9):
Java version:
I'm able to get the list of webcams:
However, trying to grab an image from a webcam results in:
I have compiled my own OpenIMAJGrabber.so from source on the Beaglebone.
*** PLEASE NOTE *** that this setup works perfectly fine with the following Java version
(everything else left the same):
I'm trying to get it to work with Java 1.8.0-ea because it has the hard float optimization, where 1.7.0_25 uses soft floats. This is for a computer vision project.
I'll attach the hs_err_pid file and verbose logs in a moment
The text was updated successfully, but these errors were encountered: