Search code examples
javaarmraspberry-pijava-3d

Segmentation fault in Java 3D on Raspberry Pi


I'm trying to run a program using Java 3d on a Raspberry Pi and I'm having some problems with the native libraries. I've found a version compiled for ARM on the debian website here

http://packages.debian.org/en/wheezy/armhf/libjava3d-jni/download

I've also tried the 'dfsg-9' version.

When I try and run the program the following output is printed:

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)

 A fatal error has been detected by the Java Runtime Environment:

  SIGILL (0x4) at pc=0xa6e5b9e2, pid=7251, tid=3057575024

 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  [libj3dcore-ogl.so+0x69e2]  Java_javax_media_j3d_NativePipeline_getAWT+0x11

I don't really have any experience debugging problems to do with native code and am hoping for some advice on how to proceed with ths problem.

Thanks for reading.


Solution

  • Raspberry PI is based on an ARMv6 architecture processor. Debian armhf requires ARMv7 (or later). Hence an illegal instruction exception is exactly what I would expect.

    Debian armel distribution works on the RPI. However, if you are adding these packages to something like a raspian installation, that is unlikely to work, and you need to get your packages from a raspian repository.