Physics Warnings in the console

I see a lot of Physics warnings such as this one:
Apr 21, 2020 7:34:57 PM com.jme3.bullet.PhysicsSpace removeRigidBody
WARNING: RigidBody com.jme3.bullet.control.RigidBodyControl@7f0d1004 does not exist in PhysicsSpace, cannot remove.

Is it something that I’m doing wrong?
I’m looking for memory leaks because after a few times of opening my SimpleApplication based window the application is crashing and I suspect I’m not cleaning something right in some component. I also suspect it is in the Physiscs (bullet) component because the crash happens in native code…

Thanks

It’s very likely something you’re doing wrong, such as removing the same body more than once. You may want to enable logging on PhysicsSpace.

It could be that if you were more specific then we could help.

2 Likes

I’m putting here the entire crash log . Hope it gives a clue…
Maybe I’m not setting the correct JVM arguments when running my app - can you recommend what is best (or mandatory) setup?

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffe100d9d9b, pid=632, tid=4540
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [bulletjme.dll+0x149d9b]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x0000000002f8a800):  JavaThread "Finalizer" daemon [_thread_in_native, id=4540, stack(0x0000000016820000,0x0000000016920000)]

siginfo: ExceptionCode=0xc0000005, reading address 0xffffffffffffffff

Registers:
RAX=0x00007ffe10187720, RBX=0x00000000393e2888, RCX=0x000000003ec76b60, RDX=0x000000003f720180
RSP=0x000000001691ea80, RBP=0x000000001691ee80, RSI=0x000000003a1db940, RDI=0x00000000eb00c120
R8 =0x0000000037695a10, R9 =0x000000003f721c00, R10=0x0000000000008000, R11=0x000000001691ea70
R12=0x0000000000000000, R13=0x00000000393e2888, R14=0x000000001691eeb0, R15=0x0000000002f8a800
RIP=0x00007ffe100d9d9b, EFLAGS=0x0000000000010206

Top of Stack: (sp=0x000000001691ea80)
0x000000001691ea80:   000000003ec76b60 00007ffe0ffd4386
0x000000001691ea90:   000000003d2c5408 0000000000000004
0x000000001691eaa0:   0000000000000000 000000003ec76b60
0x000000001691eab0:   000000003d2f7af0 000000003ec76b60
0x000000001691eac0:   0000000000000000 00007ffe0ffd254b
0x000000001691ead0:   0000000031a2e3f0 000000003f720180
0x000000001691eae0:   000000003f721c00 0000000037695a10
0x000000001691eaf0:   ffffffff00000004 0000000400000004
0x000000001691eb00:   00000009393e2888 000000003d124980
0x000000001691eb10:   0000000b00000016 0000000048d73739
0x000000001691eb20:   000000001691ebb4 00007ffe0ffc5e64
0x000000001691eb30:   0000000000000000 00007ffe1009d95a
0x000000001691eb40:   000000003ebf8260 00000000445081a1
0x000000001691eb50:   000000003a1db940 00007ffe0ffc5df8
0x000000001691eb60:   00007ffe10189fe8 000000003d377200
0x000000001691eb70:   0000000000000001 00000000eb00c120 

Instructions: (pc=0x00007ffe100d9d9b)
0x00007ffe100d9d7b:   28 00 74 1f 48 8b 44 24 28 48 8b 00 4c 8b 4c 24
0x00007ffe100d9d8b:   60 4c 8b 44 24 68 48 8b 54 24 58 48 8b 4c 24 28
0x00007ffe100d9d9b:   ff 50 38 33 c0 48 83 c4 48 c3 cc cc cc cc cc cc
0x00007ffe100d9dab:   cc cc cc cc cc 44 88 4c 24 20 4c 89 44 24 18 48 


Register to memory mapping:

RAX=0x00007ffe10187720 is an unknown value
RBX={method} {0x00000000393e2890} 'finalizeNative' '(J)V' in 'com/jme3/bullet/PhysicsSpace'
RCX=0x000000003ec76b60 is an unknown value
RDX=0x000000003f720180 is an unknown value
RSP=0x000000001691ea80 is pointing into the stack for thread: 0x0000000002f8a800
RBP=0x000000001691ee80 is pointing into the stack for thread: 0x0000000002f8a800
RSI=0x000000003a1db940 is pointing into metadata
RDI=0x00000000eb00c120 is an oop
java.lang.String 
 - klass: 'java/lang/String'
R8 =0x0000000037695a10 is an unknown value
R9 =0x000000003f721c00 is an unknown value
R10=0x0000000000008000 is an unknown value
R11=0x000000001691ea70 is pointing into the stack for thread: 0x0000000002f8a800
R12=0x0000000000000000 is an unknown value
R13={method} {0x00000000393e2890} 'finalizeNative' '(J)V' in 'com/jme3/bullet/PhysicsSpace'
R14=0x000000001691eeb0 is pointing into the stack for thread: 0x0000000002f8a800
R15=0x0000000002f8a800 is a thread


Stack: [0x0000000016820000,0x0000000016920000],  sp=0x000000001691ea80,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [bulletjme.dll+0x149d9b]
C  [bulletjme.dll+0x4254b]
C  [bulletjme.dll+0x4289f]
C  [bulletjme.dll+0x422bc]
C  [bulletjme.dll+0x9c15d]
C  [bulletjme.dll+0xc0cba]
C  [bulletjme.dll+0x18492]
C  [bulletjme.dll+0x2b580]
C  [bulletjme.dll+0x2fad7]
C  [bulletjme.dll+0x148d63]
C  [bulletjme.dll+0x19e27]
C  [bulletjme.dll+0x199b8]
C  0x0000000002fa5e34

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.jme3.bullet.PhysicsSpace.finalizeNative(J)V+0
j  com.jme3.bullet.PhysicsSpace.finalize()V+34
J 895 C1 java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62 bytes) @ 0x00000000032f3b8c [0x00000000032f3600+0x58c]
J 894 C1 java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V (6 bytes) @ 0x00000000032f329c [0x00000000032f3240+0x5c]
j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x0000000017baa000 JavaThread "OkHttp WebSocket http://178.128.144.17:3060/..." [_thread_blocked, id=704, stack(0x00000000399d0000,0x0000000039ad0000)]
  0x0000000017bab800 JavaThread "OkHttp Dispatcher" [_thread_blocked, id=10368, stack(0x0000000038590000,0x0000000038690000)]
  0x0000000017b9f800 JavaThread "pool-3-thread-1" [_thread_blocked, id=9668, stack(0x0000000033f00000,0x0000000034000000)]
  0x0000000017ba5800 JavaThread "jME3 Audio Decoder" daemon [_thread_blocked, id=6812, stack(0x0000000034e00000,0x0000000034f00000)]
  0x0000000017b9f000 JavaThread "jME3 Main" [_thread_blocked, id=6640, stack(0x00000000188d0000,0x00000000189d0000)]
  0x0000000017b9e000 JavaThread "SwingWorker-pool-2-thread-6" daemon [_thread_blocked, id=2660, stack(0x00000000185c0000,0x00000000186c0000)]
  0x0000000017ba1000 JavaThread "SwingWorker-pool-2-thread-5" daemon [_thread_blocked, id=6352, stack(0x00000000010d0000,0x00000000011d0000)]
  0x0000000017ba5000 JavaThread "SwingWorker-pool-2-thread-4" daemon [_thread_blocked, id=7480, stack(0x00000000186c0000,0x00000000187c0000)]
  0x0000000017ba2000 JavaThread "SwingWorker-pool-2-thread-3" daemon [_thread_blocked, id=8032, stack(0x00000000184c0000,0x00000000185c0000)]
  0x0000000017ba3800 JavaThread "SwingWorker-pool-2-thread-2" daemon [_thread_blocked, id=5820, stack(0x00000000183c0000,0x00000000184c0000)]
  0x0000000031bc4800 JavaThread "SwingWorker-pool-2-thread-1" daemon [_thread_blocked, id=3276, stack(0x00000000187d0000,0x00000000188d0000)]
  0x0000000031bca800 JavaThread "Okio Watchdog" daemon [_thread_blocked, id=8872, stack(0x0000000034a00000,0x0000000034b00000)]
  0x0000000031bc9800 JavaThread "OkHttp ConnectionPool" daemon [_thread_blocked, id=6928, stack(0x0000000034900000,0x0000000034a00000)]
  0x0000000031bc5000 JavaThread "OkHttp http://178.128.144.17:3060/..." [_thread_in_native, id=7660, stack(0x0000000034000000,0x0000000034100000)]
  0x0000000031a78800 JavaThread "TimerQueue" daemon [_thread_blocked, id=2604, stack(0x0000000032f00000,0x0000000033000000)]
  0x0000000017bd0800 JavaThread "Thread-1" daemon [_thread_in_native, id=10260, stack(0x0000000031310000,0x0000000031410000)]
  0x0000000002e94000 JavaThread "DestroyJavaVM" [_thread_blocked, id=6356, stack(0x0000000002b90000,0x0000000002c90000)]
  0x000000001797d000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=6568, stack(0x00000000182c0000,0x00000000183c0000)]
  0x000000001797c000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=9888, stack(0x0000000018060000,0x0000000018160000)]
  0x000000001797b800 JavaThread "AWT-Shutdown" [_thread_blocked, id=8844, stack(0x0000000017f60000,0x0000000018060000)]
  0x000000001797a800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=7092, stack(0x0000000017520000,0x0000000017620000)]
  0x0000000016e03800 JavaThread "Service Thread" daemon [_thread_blocked, id=3484, stack(0x0000000017320000,0x0000000017420000)]
  0x0000000016dfe000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=1036, stack(0x0000000017220000,0x0000000017320000)]
  0x0000000016dfd800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=4256, stack(0x0000000017120000,0x0000000017220000)]
  0x0000000016da4800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=2492, stack(0x0000000017020000,0x0000000017120000)]
  0x0000000016da1800 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=7384, stack(0x0000000016f20000,0x0000000017020000)]
  0x00000000155c0000 JavaThread "Attach Listener" daemon [_thread_blocked, id=9044, stack(0x0000000016a20000,0x0000000016b20000)]
  0x00000000155bf000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3344, stack(0x0000000016920000,0x0000000016a20000)]
=>0x0000000002f8a800 JavaThread "Finalizer" daemon [_thread_in_native, id=4540, stack(0x0000000016820000,0x0000000016920000)]
  0x0000000002f81000 JavaThread "Reference Handler" daemon [_thread_blocked, id=4384, stack(0x0000000016720000,0x0000000016820000)]

Other Threads:
  0x0000000015588000 VMThread [stack: 0x0000000016620000,0x0000000016720000] [id=2656]
  0x0000000016e6a800 WatcherThread [stack: 0x0000000017420000,0x0000000017520000] [id=9180]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 196096K, used 49K [0x00000000eb000000, 0x00000000fb180000, 0x0000000100000000)
  eden space 136704K, 0% used [0x00000000eb000000,0x00000000eb00c4e0,0x00000000f3580000)
  from space 59392K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f6f80000)
  to   space 62464K, 0% used [0x00000000f7480000,0x00000000f7480000,0x00000000fb180000)
 ParOldGen       total 132096K, used 76034K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 57% used [0x00000000c1000000,0x00000000c5a40bf8,0x00000000c9100000)
 Metaspace       used 34247K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K

Card table byte_map: [0x0000000012350000,0x0000000012550000] byte_map_base: 0x0000000011d48000

Marking Bits: (ParMarkBitMap*) 0x000000006c214040
 Begin Bits: [0x0000000012aa0000, 0x0000000013a60000)
 End Bits:   [0x0000000013a60000, 0x0000000014a20000)

Polling page: 0x0000000002a00000

CodeCache: size=245760Kb used=19343Kb max_used=19521Kb free=226416Kb
 bounds [0x0000000002f90000, 0x00000000042d0000, 0x0000000011f90000]
 total_blobs=6568 nmethods=5781 adapters=698
 compilation: enabled

Compilation events (10 events):
Event: 896.614 Thread 0x0000000016dfe000 nmethod 7644 0x000000000335c150 code [0x000000000335c320, 0x000000000335cd58]
Event: 896.624 Thread 0x0000000016dfd800 nmethod 7643 0x0000000003a11550 code [0x0000000003a11760, 0x0000000003a12340]
Event: 898.710 Thread 0x0000000016da4800 7645       4       java.io.File::exists (43 bytes)
Event: 898.714 Thread 0x0000000016da4800 nmethod 7645 0x000000000335bbd0 code [0x000000000335bd20, 0x000000000335bf28]
Event: 898.903 Thread 0x0000000016dfd800 7646   !   4       com.sun.imageio.plugins.png.PNGImageReader::decodePass (1201 bytes)
Event: 898.991 Thread 0x0000000016dfd800 nmethod 7646 0x0000000004073b10 code [0x0000000004073dc0, 0x0000000004077ce0]
Event: 899.989 Thread 0x0000000016da4800 7647       4       java.awt.image.ComponentSampleModel::getNumDataElements (5 bytes)
Event: 899.990 Thread 0x0000000016da4800 nmethod 7647 0x0000000003d095d0 code [0x0000000003d09700, 0x0000000003d09758]
Event: 900.167 Thread 0x0000000016dfe000 7648       3       java.util.logging.LogManager::checkPermission (17 bytes)
Event: 900.167 Thread 0x0000000016dfe000 nmethod 7648 0x0000000003373ed0 code [0x0000000003374040, 0x0000000003374308]

GC Heap History (10 events):
Event: 835.329 GC heap before
{Heap before GC invocations=35 (full 5):
 PSYoungGen      total 186880K, used 184757K [0x00000000eb000000, 0x00000000fa280000, 0x0000000100000000)
  eden space 156160K, 98% used [0x00000000eb000000,0x00000000f4673d30,0x00000000f4880000)
  from space 30720K, 99% used [0x00000000f4f00000,0x00000000f6cf9768,0x00000000f6d00000)
  to   space 46080K, 0% used [0x00000000f7580000,0x00000000f7580000,0x00000000fa280000)
 ParOldGen       total 132096K, used 85941K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ed738,0x00000000c9100000)
 Metaspace       used 34199K, capacity 34501K, committed 34816K, reserved 1079296K
  class space    used 3937K, capacity 4022K, committed 4096K, reserved 1048576K
Event: 835.347 GC heap after
Heap after GC invocations=35 (full 5):
 PSYoungGen      total 190976K, used 26860K [0x00000000eb000000, 0x00000000f9d80000, 0x0000000100000000)
  eden space 150016K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f4280000)
  from space 40960K, 65% used [0x00000000f7580000,0x00000000f8fbb2b8,0x00000000f9d80000)
  to   space 46592K, 0% used [0x00000000f4280000,0x00000000f4280000,0x00000000f7000000)
 ParOldGen       total 132096K, used 85941K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ed738,0x00000000c9100000)
 Metaspace       used 34199K, capacity 34501K, committed 34816K, reserved 1079296K
  class space    used 3937K, capacity 4022K, committed 4096K, reserved 1048576K
}
Event: 856.666 GC heap before
{Heap before GC invocations=36 (full 5):
 PSYoungGen      total 190976K, used 176876K [0x00000000eb000000, 0x00000000f9d80000, 0x0000000100000000)
  eden space 150016K, 100% used [0x00000000eb000000,0x00000000f4280000,0x00000000f4280000)
  from space 40960K, 65% used [0x00000000f7580000,0x00000000f8fbb2b8,0x00000000f9d80000)
  to   space 46592K, 0% used [0x00000000f4280000,0x00000000f4280000,0x00000000f7000000)
 ParOldGen       total 132096K, used 85941K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ed738,0x00000000c9100000)
 Metaspace       used 34239K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
Event: 856.685 GC heap after
Heap after GC invocations=36 (full 5):
 PSYoungGen      total 186368K, used 41476K [0x00000000eb000000, 0x00000000fa200000, 0x0000000100000000)
  eden space 144384K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f3d00000)
  from space 41984K, 98% used [0x00000000f4280000,0x00000000f6b01018,0x00000000f6b80000)
  to   space 51712K, 0% used [0x00000000f6f80000,0x00000000f6f80000,0x00000000fa200000)
 ParOldGen       total 132096K, used 85949K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ef738,0x00000000c9100000)
 Metaspace       used 34239K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
}
Event: 896.506 GC heap before
{Heap before GC invocations=37 (full 5):
 PSYoungGen      total 186368K, used 185860K [0x00000000eb000000, 0x00000000fa200000, 0x0000000100000000)
  eden space 144384K, 100% used [0x00000000eb000000,0x00000000f3d00000,0x00000000f3d00000)
  from space 41984K, 98% used [0x00000000f4280000,0x00000000f6b01018,0x00000000f6b80000)
  to   space 51712K, 0% used [0x00000000f6f80000,0x00000000f6f80000,0x00000000fa200000)
 ParOldGen       total 132096K, used 85949K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ef738,0x00000000c9100000)
 Metaspace       used 34245K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
Event: 896.530 GC heap after
Heap after GC invocations=37 (full 5):
 PSYoungGen      total 188416K, used 51027K [0x00000000eb000000, 0x00000000fab80000, 0x0000000100000000)
  eden space 136704K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f3580000)
  from space 51712K, 98% used [0x00000000f6f80000,0x00000000fa154e58,0x00000000fa200000)
  to   space 59392K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f6f80000)
 ParOldGen       total 132096K, used 85949K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ef738,0x00000000c9100000)
 Metaspace       used 34245K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
}
Event: 899.995 GC heap before
{Heap before GC invocations=38 (full 5):
 PSYoungGen      total 188416K, used 172756K [0x00000000eb000000, 0x00000000fab80000, 0x0000000100000000)
  eden space 136704K, 89% used [0x00000000eb000000,0x00000000f26e0550,0x00000000f3580000)
  from space 51712K, 98% used [0x00000000f6f80000,0x00000000fa154e58,0x00000000fa200000)
  to   space 59392K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f6f80000)
 ParOldGen       total 132096K, used 85949K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ef738,0x00000000c9100000)
 Metaspace       used 34246K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
Event: 900.019 GC heap after
Heap after GC invocations=38 (full 5):
 PSYoungGen      total 196096K, used 41679K [0x00000000eb000000, 0x00000000fb180000, 0x0000000100000000)
  eden space 136704K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f3580000)
  from space 59392K, 70% used [0x00000000f3580000,0x00000000f5e33ea8,0x00000000f6f80000)
  to   space 62464K, 0% used [0x00000000f7480000,0x00000000f7480000,0x00000000fb180000)
 ParOldGen       total 132096K, used 85949K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ef738,0x00000000c9100000)
 Metaspace       used 34246K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
}
Event: 900.019 GC heap before
{Heap before GC invocations=39 (full 6):
 PSYoungGen      total 196096K, used 41679K [0x00000000eb000000, 0x00000000fb180000, 0x0000000100000000)
  eden space 136704K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f3580000)
  from space 59392K, 70% used [0x00000000f3580000,0x00000000f5e33ea8,0x00000000f6f80000)
  to   space 62464K, 0% used [0x00000000f7480000,0x00000000f7480000,0x00000000fb180000)
 ParOldGen       total 132096K, used 85949K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 65% used [0x00000000c1000000,0x00000000c63ef738,0x00000000c9100000)
 Metaspace       used 34246K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
Event: 900.166 GC heap after
Heap after GC invocations=39 (full 6):
 PSYoungGen      total 196096K, used 0K [0x00000000eb000000, 0x00000000fb180000, 0x0000000100000000)
  eden space 136704K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f3580000)
  from space 59392K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f6f80000)
  to   space 62464K, 0% used [0x00000000f7480000,0x00000000f7480000,0x00000000fb180000)
 ParOldGen       total 132096K, used 76034K [0x00000000c1000000, 0x00000000c9100000, 0x00000000eb000000)
  object space 132096K, 57% used [0x00000000c1000000,0x00000000c5a40bf8,0x00000000c9100000)
 Metaspace       used 34246K, capacity 34565K, committed 34816K, reserved 1079296K
  class space    used 3942K, capacity 4022K, committed 4096K, reserved 1048576K
}

Deoptimization events (10 events):
Event: 742.183 Thread 0x0000000017ba1000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003e742cc method=java.nio.Bits.reserveMemory(JI)V @ 37
Event: 840.364 Thread 0x0000000017ba6800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003cb84ec method=java.util.concurrent.ConcurrentLinkedQueue$Itr.advance()Ljava/lang/Object; @ 74
Event: 840.365 Thread 0x0000000017ba6800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000031b2b04 method=java.util.concurrent.ConcurrentLinkedQueue$Itr.advance()Ljava/lang/Object; @ 74
Event: 843.019 Thread 0x0000000031bc5000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003e71d00 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 843.019 Thread 0x0000000031bc5000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003e71d00 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 843.019 Thread 0x0000000031bc5000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003e71d00 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 843.019 Thread 0x0000000031bc5000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003e71d00 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 843.033 Thread 0x0000000017ba7000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003d803d0 method=java.lang.Enum.equals(Ljava/lang/Object;)Z @ 2
Event: 843.033 Thread 0x0000000017ba7000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x00000000039daca4 method=java.util.Collections$UnmodifiableCollection$1.<init>(Ljava/util/Collections$UnmodifiableCollection;)V @ 17
Event: 899.995 Thread 0x0000000017b9f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003e72e7c method=java.nio.Bits.reserveMemory(JI)V @ 37

Internal exceptions (10 events):
Event: 761.159 Thread 0x0000000017b9e000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb6a5090) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 761.159 Thread 0x0000000017b9e000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb6a5c08) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 831.627 Thread 0x0000000017ba5800 Exception <a 'java/lang/InterruptedException': sleep interrupted> (0x00000000ecdc8ac8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 3211]
Event: 834.909 Thread 0x0000000017b9f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000ed037908) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 834.909 Thread 0x0000000017b9f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000ed0384b0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 834.909 Thread 0x0000000017b9f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000ed039028) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 834.909 Thread 0x0000000017b9f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000ed039e70) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 834.909 Thread 0x0000000017b9f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000ed03aa18) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 834.909 Thread 0x0000000017b9f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000ed03b590) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 900.168 Thread 0x0000000002f8a800 Exception <a 'java/lang/NullPointerException': The native object does not exist.> (0x00000000eb00bf50) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jni.cpp, line 735]

Events (10 events):
Event: 899.990 Thread 0x0000000016da4800 flushing nmethod 0x0000000003534b50
Event: 899.995 Thread 0x0000000017b9f000 Uncommon trap: trap_request=0xffffff65 fr.pc=0x0000000003e72e7c
Event: 899.995 Thread 0x0000000017b9f000 DEOPT PACKING pc=0x0000000003e72e7c sp=0x00000000189ce280
Event: 899.995 Thread 0x0000000017b9f000 DEOPT UNPACKING pc=0x0000000002fd582a sp=0x00000000189ce208 mode 2
Event: 899.995 Executing VM operation: ParallelGCSystemGC
Event: 900.166 Executing VM operation: ParallelGCSystemGC done
Event: 900.166 Executing VM operation: BulkRevokeBias
Event: 900.166 Executing VM operation: BulkRevokeBias done
Event: 900.166 Executing VM operation: RevokeBias
Event: 900.167 Executing VM operation: RevokeBias done


VM Arguments:
jvm_args: -XX:MaxDirectMemorySize=512m -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\lib\idea_rt.jar=52144:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\bin -Dfile.encoding=UTF-8 
java_command: com.scenemax.desktop.MainApp
java_class_path (initial): C:\Program Files\Java\jdk1.8.0_45\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\rt.jar;C:\dev\scenemax_desktop\out\production\scenemax_desktop;C:\dev\scenemax_desktop\libs\okio-2.5.0.jar;C:\dev\scenemax_desktop\libs\ftp4j-1.7.2.jar;C:\dev\scenemax_desktop\libs\zip4j-1.3.3.jar;C:\dev\scenemax_desktop\libs\okhttp-3.8.1.jar;C:\dev\scenemax_desktop\libs\okhttp-4.5.0.jar;C:\dev\scenemax_desktop\libs\json-20180813.jar;C:\dev\scenemax_desktop\libs\commons-io-2.6.jar;C:\dev\scenemax_desktop\libs\scenemax_parser.jar;C:\dev\scenemax_desktop\libs\slf4j-api-1.7.7.jar;C:\dev\scenemax_desktop\libs\jni4net.j-0.8.8.0.jar;C:\dev\scenemax_desktop\libs\commons-lang3-3.10.jar;C:\dev\scenemax_desktop\libs\sqlite-jdbc-3.27.2.jar;C:\dev\scenemax_desktop\libs\antlr-4.5.3-c
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
PATH=C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk1.8.0_45\bin;C:\Program Files\Gource\cmd;C:\Program Files\dotnet\;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\gradle\gradle-5.6.4\bin;C:\Users\user\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java\jdk1.8.0_45\bin;C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;
USERNAME=user
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 18362 (10.0.18362.778)

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, ht, tsc, tscinvbit

Memory: 4k page, physical 4127084k(391968k free), swap 7141740k(1784784k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.45-b02) for windows-amd64 JRE (1.8.0_45-b14), built on Apr 10 2015 10:34:15 by "java_re" with MS VC++ 10.0 (VS2010)

time: Wed Apr 22 07:45:56 2020
elapsed time: 900 seconds (0d 0h 15m 0s)

1 Like

I can see in the log that the crash was in bulletjme.dll

# Problematic frame:
# C  [bulletjme.dll+0x149d9b]

And more specific

j  com.jme3.bullet.PhysicsSpace.finalizeNative(J)V+0
j  com.jme3.bullet.PhysicsSpace.finalize()V+34
J 895 C1 java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62 bytes) @ 0x00000000032f3b8c [0x00000000032f3600+0x58c]
J 894 C1 java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V (6 bytes) @ 0x00000000032f329c [0x00000000032f3240+0x5c]
j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub
1 Like

It closely resembles issue 1351 which occurs when a non-empty PhysicsSpace gets garbage collected.

As I said before, enabling logging should help you trace the sequence of events.

Sorry I thought this is the log…
How do I enable debug mode logging in JME? I’m working with InteliJ

1 Like
        Calendar rightNow = Calendar.getInstance();
        int hours = rightNow.get(Calendar.HOUR_OF_DAY);
        int minutes = rightNow.get(Calendar.MINUTE);
        int seconds = rightNow.get(Calendar.SECOND);
        String hhmmss = String.format("%02d%02d%02d", hours, minutes, seconds);

        FileHandler handler = null;
        try {
            handler = new FileHandler(hhmmss + ".txt");
        } catch (IOException e) {
        }
        SimpleFormatter formatter = new SimpleFormatter();
        handler.setFormatter(formatter);

        Logger psLogger = Logger.getLogger("com.jme3.bullet.PhysicsSpace");
        psLogger.addHandler(handler);
        psLogger.setLevel(Level.FINE);

My expectation is that the log will indicate many collision objects added to the PhysicsSpace without ever being removed. Usually this isn’t a problem because the PhysicsSpace never gets garbage collected.

1 Like

Thanks Stephen I’ll try it. Will it help me also diagnosing the crash in bullet native? This is currently my biggest problem. After 2-3 times of running an application with “heavy” graphics (large models & textures) bullet is crashing and I would like to fix it

1 Like

I see that we are collecting logs for: com.jme3.bullet.PhysicsSpace
what other information can I collect from com.jme3.bullet? anything that will give me a clue about the crash

1 Like

The crash is almost certainly due to issue 1351. It occurs when the PhysicsSpace gets finalized (by the garbage collector, presumably) but is not empty.

Unfortunately, I don’t know of any logging that will explain why your PhysicsSpace is getting GCed. For that, I think you must look at your code, your design. However, there are various ways you can determine what collision objects are in the space at the time. One way would be to create a subclass of PhysicsSpace and override the finalizer.

1 Like

Just to be sure we’re all on the same page, you mean starting/stopping a JME application within the same JVM session, right?

Usually when folks say “2-3 times of running an application” they mean restarting the application itself, ie: the jvm. java MyApp.

I think that’s not what you mean.

Edit: because otherwise, one run of the JVM to the next should not affect anything.

1 Like

You are right Paul! My product is a development environment for building JME3 based games. I have a “Play” button which opens the JME application. When we are building simple animations / games with light graphics everything is stable but when big models and textures involved we are facing crashes which appears to be from the native bullet

1 Like

IDE’s typically always start projects in their own process - I think you’ll find if you do the same you’ll save yourself many headaches down the road.

1 Like

Sounds like a good idea… I think it will save me a lot of time solving clean-up issues by doing so.

1 Like

It looks like whenever PhysicsSpace.finalize is called and inside it calls: finallizeNative method then there is an access violation and the application crashes. It is consistent behavior.
I removed the cleanups that I’m doing with physics state so this is happening not due to my code but probably when garbage collector decides to clean previously used bullet app states. I need a way to prevent it from happening for now because opening SimpleApp in a different process requires major refactoring from my side

Looking at issue #1351 I understand that there is no quick fix for this…
I need to think if it’s the right time to refactor the IDE to open the app in a separate process

1 Like

Btw, 1351 will be fixed in the next release of Minie.

1 Like

What is the estimated ETA of the next release?

1 Like

I haven’t set a target date yet for Minie 1.7 . However, I could issue a hotfix in 24 hours, if you don’t mind being the primary tester.

2 Likes