[Solved] Warning from PhysicsSpace update on Desktop App

just switched my app to use Minie versus the older JBullet library. fixed references, built and ran. everything seems fine, but in the console log, i see this this warning repeated approximately 50 times per second:

Nov 18, 2024 10:40:22 AM com.jme3.bullet.PhysicsSpace update
WARNING: invoked from wrong thread

to help narrow this down, i added a call to dump the running threads into the console log as well:


[Thread[com.jme3.network.kernel.tcp.SocketConnector@35aa41b5,5,main], 
Thread[jME3 Audio Decoder,6,main], 
Thread[Finalizer,8,system], 
Thread[Physics Cleaner,5,main], 
Thread[DestroyJavaVM,5,main], 
Thread[com.jme3.network.kernel.tcp.SocketConnector@35aa41b5-writer,5,main],
Thread[AWT-Shutdown,5,system], 
Thread[Signal Dispatcher,9,system], 
Thread[Notification Thread,9,system], 
Thread[Java2D Disposer,10,system], 
Thread[AppKit Thread,5,system], 
Thread[jME3 Main,5,main], 
Thread[com.jme3.network.kernel.udp.UdpConnector@695e1534,5,main], 
Thread[Common-Cleaner,8,InnocuousThreadGroup],
Thread[com.jme3.network.kernel.udp.UdpConnector@695e1534-writer,5,main],
Thread[Reference Handler,10,system]]]

unsure which one could be the culprit, but if anyone else has come across this issue, it would be helpful. i did find a “similar” posting regarding Android, but this is a Desktop app running on MacOSX Big Sur (11.7.10).

1 Like

answering my own question, so that it can help others:

it seems that on a Mac (other OS too?) Desktop App, the physics layer WANTS to be set to parallel threading:

adding the following before attaching the BulletAppState got rid of the constant warnings:


bulletAppState.setThreadingType( BulletAppState.ThreadingType.PARALLEL );

HTH and cheers!

4 Likes

That’s actually a defect in Minie.
I’m glad you found a workaround.

2 Likes