stephengold / Libbulletjme

A JNI interface to Bullet Physics and V-HACD
https://stephengold.github.io/Libbulletjme/lbj-en/English/overview.html
Other
84 stars 10 forks source link

How to disable these kinds of error outputs #35

Open KianBrose opened 3 days ago

KianBrose commented 3 days ago

image

How do I disable / completely remove these errors that seem to be printed out by the library?

stephengold commented 3 days ago

The brute-force way to mask this warning is to use the java.util.logging package:

import java.util.logging.Level;
// ...
PhysicsSpace.logger.setLevel(Level.SEVERE);

However, I don't recommend doing so because the warning indicates a bug in code that invokes the library. Instead of masking the warning, you (or whoever wrote the code) should troubleshoot the bug.

The buggy code is either trying to remove rigid bodies that have already been removed, or else it's trying to remove them from a space to which they were never added.