Again, the physics engine gives me an error…
It is:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fb0d2801150, pid=12369, tid=12457
#
# JRE version: OpenJDK Runtime Environment (11.0.11+9) (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [libbulletjme.so+0x105150] btDbvtBroadphase::setAabb(btBroadphaseProxy*, btVector3 const&, btVector3 const&, btDispatcher*)+0x20
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to game/core.12369)
#
# An error report file with more information is saved as:
# game/hs_err_pid12369.log
#
# If you would like to submit a bug report, please visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
This happens randomly. Also, I haven’t changed the code that I’ve used for jme3-jbullet before.
I see you’re using a BulletAppState in parallel-threaded mode. I wonder if perhaps the PhysicsSpace is being modified by multiple threads. Does the same problem occur if you set the BulletAppState to the default (single-threaded) mode?
I believe the fuzzyZero crash relates to creating mesh collision shapes with zero thickness in createBox() when x=0 or y=0. I assume you didn’t intend to do that.
Of course, a zero-thickness shape shouldn’t crash the JRE. That’s a bug in my code. I’ll open an issue against Minie and develop a fix.
If for some reason you need to create zero-thickness shapes, you can work around the bug by using Minie v4.4.0 instead of v4.5.0.
Yes, I have created this test game to reproduce that bug in a hurry, so I haven’t expected that. In my main game that chunks are moving in a grid, so there is no that fuzzyZero bug. Downgrading helps, there is no that native bug, thanks!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fef65cf2136, pid=27475, tid=27476
#
# JRE version: OpenJDK Runtime Environment (11.0.11+9) (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [libbulletjme.so+0x12a136] removeleaf(btDbvt*, btDbvtNode*)+0x16
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to game/core.27475)
#
# An error report file with more information is saved as:
# game/hs_err_pid27475.log
#
# If you would like to submit a bug report, please visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Also, I have error when exporting app to .jar:
java.lang.UnsatisfiedLinkError: 'void
com.jme3.bullet.collision.shapes.CollisionShape.setContactFilterEnabled(long, boolean)'
at com.jme3.bullet.collision.shapes.CollisionShape.setContactFilterEnabled(Native Method)
at com.jme3.bullet.collision.shapes.CollisionShape.setContactFilterEnabled(CollisionShape.java:326)
at com.jme3.bullet.collision.shapes.CapsuleCollisionShape.createShape(CapsuleCollisionShape.java:213)
at com.jme3.bullet.collision.shapes.CapsuleCollisionShape.<init>(CapsuleCollisionShape.java:90)
at com.jme3.bullet.control.BetterCharacterControl.getShape(BetterCharacterControl.java:843)
at com.jme3.bullet.control.BetterCharacterControl.<init>(BetterCharacterControl.java:185)
...
It’s about native libraries. When I run it in vscode, all is fine.
java.lang.UnsatisfiedLinkError: 'void com.jme3.bullet.collision.shapes.CollisionShape.setContactFilterEnabled(long, boolean)'
at com.jme3.bullet.collision.shapes.CollisionShape.setContactFilterEnabled(Native Method)
at com.jme3.bullet.collision.shapes.CollisionShape.setContactFilterEnabled(CollisionShape.java:326)
at com.jme3.bullet.collision.shapes.CapsuleCollisionShape.createShape(CapsuleCollisionShape.java:213)
at com.jme3.bullet.collision.shapes.CapsuleCollisionShape.<init>(CapsuleCollisionShape.java:90)
at com.jme3.bullet.control.BetterCharacterControl.getShape(BetterCharacterControl.java:843)
at com.jme3.bullet.control.BetterCharacterControl.<init>(BetterCharacterControl.java:185)
at com.mais3d.game.App.initPlayer(App.java:164)
at com.mais3d.game.App.initGame(App.java:96)
at com.mais3d.util.graphics.UI.screens.MainScreen$1$1$1.call(MainScreen.java:40)
at com.mais3d.util.graphics.UI.screens.MainScreen$1$1$1.call(MainScreen.java:1)
at com.jme3.app.AppTask.invoke(AppTask.java:142)
at com.jme3.app.LegacyApplication.runQueuedTasks(LegacyApplication.java:701)
at com.jme3.app.LegacyApplication.update(LegacyApplication.java:715)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:246)
at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:530)
at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:632)
at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:466)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
at com.mais3d.game.App.setUp(App.java:197)
at com.mais3d.game.App.main(App.java:62)