Hello,
since I’ve switched from jbullet to native bullet when I try to create the CollisionShape of certain nodes the application crashes and i get this error
[java]
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f11a8b156b6, pid=19971, tid=139713814628096
JRE version: Java™ SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
Java VM: Java HotSpot™ 64-Bit Server VM (25.0-b70 mixed mode linux-amd64 compressed oops)
Problematic frame:
C [libbulletjme64.so+0x11b6b6] btStridingMeshInterface::InternalProcessAllTriangles(btInternalTriangleIndexCallback*, btVector3 const&, btVector3 const&) const+0x356
Core dump written. Default location: /st/projects/Game/core or core.19971
An error report file with more information is saved as:
/st/projects/Game/hs_err_pid19971.log
If you would like to submit a bug report, please visit:
I’ve also got this error some time ago, but I don’t have a solution for it. There was also an old thread about this topic, but I don’t know if I can find it.
What I do as workaround is to make a custom control that creates a box collision shape at runtime. You can attach this custom control in the scene composer to a node.
Thanks for the reply.
I can’t use your workaround because I need the collisionshape for a complex mesh, so I think I will keep using jbullet insted of the native one.
I’ve got the same issue. I tried to follow @EmpirePhoenix advice from Thread linked previously : I check every spatial (the loaded j3o + created by code) with the following code :
[java]
public static boolean checkIndexesOfPosition(Spatial s) {
boolean b = true;
if (s instanceof Geometry) {
b = checkIndexesOfPosition(((Geometry) s).getMesh());
}
if (s instanceof Node) {
for(Spatial child : ((Node)s).getChildren()) {
b = b && checkIndexesOfPosition(child);
}
}
return b;
}
public static boolean checkIndexesOfPosition(Mesh m) {
boolean b = true;
IndexBuffer iis = m.getIndexBuffer();
VertexBuffer ps = m.getBuffer(VertexBuffer.Type.Position);
Buffer psb = ps.getDataReadOnly();
b = b && (psb.remaining() == (ps.getNumElements() * 3) + ps.getOffset()); // 3 float
if (!b) System.out.printf("%d != %d * %d : psb.remaining() == ps.getNumElements() * 3 \n", psb.remaining(), ps.getNumElements());
//VertexBuffer ips = m.getBuffer(VertexBuffer.Type.Normal);
for(int ii = 0; b && ii < iis.size(); ii++) {
int i = iis.get(ii);
b = b && i < ps.getNumElements() && i > -1;
if (!b) System.out.printf("-1 < %d < %d : i < ps.getNumElements()\n", i, ps.getNumElements());
}
return b;
}
[/java]
But every model pass the check. May be I did something wrong in the check code ??
I run the check with jbullet, else, with bullet, the jvm crash on asset.loadModel. May be because model include RigidBody.