I am trying to implement a raycast vehicle with jbullet specifically gbullet but I get some garbage collecter issue in android 5.0 Lollipop. I do use a pure java port so and this runs on GLThread. I used Samsung Galaxy 5S. Here is the stack trace:
02-17 16:55:29.693 8918-8956/com.rdgames.rocket.android E/art: Tried to mark 0xb4d7d47d not contained by any spaces
02-17 16:55:29.703 8918-8956/com.rdgames.rocket.android E/art: Attempting see if it's a bad root
02-17 16:55:29.703 8918-8956/com.rdgames.rocket.android E/art: Found invalid root: 0xb4d7d47d with type RootJavaFrame
02-17 16:55:29.703 8918-8956/com.rdgames.rocket.android A/art: art/runtime/gc/collector/mark_sweep.cc:387] Can't mark invalid object
02-17 16:55:29.953 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] Runtime aborting...
02-17 16:55:29.953 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] Aborting thread:
02-17 16:55:29.953 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] "GLThread 5437" prio=10 tid=11 Runnable
02-17 16:55:29.953 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] | group="" sCount=0 dsCount=0 obj=0x12c05c70 self=0xaee77800
02-17 16:55:29.953 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] | sysTid=8956 nice=-11 cgrp=apps sched=0/0 handle=0xaeec9500
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] | state=R schedstat=( 3533070928 392497227 4543 ) utm=314 stm=39 core=0 HZ=100
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] | stack=0xb3b8f000-0xb3b91000 stackSize=1036KB
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] | held mutexes= "abort lock" "mutator lock"(shared held)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #00 pc 00004640 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #01 pc 00002e8d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #02 pc 00247ff1 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #03 pc 0022c97b /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+146)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #04 pc 0021ccd7 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, art::Thread*)+22)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #05 pc 0021cf15 /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+324)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #06 pc 0021d109 /system/lib/libart.so (art::Runtime::Abort()+72)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #07 pc 000a831b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #08 pc 00124dd5 /system/lib/libart.so (bool art::gc::accounting::HeapBitmap::AtomicTestAndSet<art::gc::collector::MarkSweepMarkObjectSlowPath>(art::mirror::Object const*, art::gc::collector::MarkSweepMarkObjectSlowPath const&)+264)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #09 pc 00124f79 /system/lib/libart.so (art::gc::collector::MarkSweep::MarkObjectParallel(art::mirror::Object const*)+128)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #10 pc 00125eab /system/lib/libart.so (art::gc::collector::MarkSweep::MarkRootParallelCallback(art::mirror::Object**, void*, unsigned int, art::RootType)+14)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #11 pc 00230d79 /system/lib/libart.so (art::ReferenceMapVisitor<art::RootCallbackVisitor>::VisitQuickFrame()+800)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #12 pc 00231079 /system/lib/libart.so (art::ReferenceMapVisitor<art::RootCallbackVisitor>::VisitFrame()+128)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #13 pc 00224773 /system/lib/libart.so (art::StackVisitor::WalkStack(bool)+250)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #14 pc 0022705b /system/lib/libart.so (art::Thread::VisitRoots(void (*)(art::mirror::Object**, void*, unsigned int, art::RootType), void*)+702)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #15 pc 001250e5 /system/lib/libart.so (art::gc::collector::CheckpointMarkThreadRoots::Run(art::Thread*)+116)
02-17 16:55:29.963 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #16 pc 00227421 /system/lib/libart.so (art::Thread::RunCheckpointFunction()+172)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #17 pc 002844ab /system/lib/libart.so (artTestSuspendFromCode+54)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #18 pc 000a4177 /system/lib/libart.so (art_quick_test_suspend+22)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] native: #19 pc 0018ac2b /data/dalvik-cache/arm/data@[email protected]@[email protected] (Java_javax_vecmath_Tuple3f_set__FFF+58)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at javax.vecmath.Tuple3f.set(Tuple3f.java:145)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at javax.vecmath.Matrix3f.transform(Matrix3f.java:2165)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.linearmath.Transform.transform(Transform.java:85)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.collision.narrowphase.SubsimplexConvexCast.calcTimeOfImpact(SubsimplexConvexCast.java:122)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.collision.dispatch.CollisionWorld.rayTestSingle(CollisionWorld.java:299)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.collision.dispatch.CollisionWorld.rayTestSingle(CollisionWorld.java:373)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.collision.dispatch.CollisionWorld.rayTest(CollisionWorld.java:572)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.vehicle.DefaultVehicleRaycaster.castRay(DefaultVehicleRaycaster.java:49)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.vehicle.RaycastVehicle.rayCast(RaycastVehicle.java:223)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.vehicle.RaycastVehicle.updateVehicle(RaycastVehicle.java:326)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.DiscreteDynamicsWorld.updateVehicles(DiscreteDynamicsWorld.java:487)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.DiscreteDynamicsWorld.internalSingleStepSimulation(DiscreteDynamicsWorld.java:408)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.DiscreteDynamicsWorld.stepSimulation(DiscreteDynamicsWorld.java:352)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.bulletphysics.dynamics.DynamicsWorld.stepSimulation(DynamicsWorld.java:58)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.nilunder.bdx.Scene.update(Scene.java:823)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.nilunder.bdx.Bdx.main(Bdx.java:225)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.rdgames.rocket.screens.GameScreen.render(GameScreen.java:61)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.badlogic.gdx.Game.render(Game.java:46)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.rdgames.rocket.BdxApp.render(BdxApp.java:22)
02-17 16:55:29.973 8918-8956/com.rdgames.rocket.android A/art: art/runtime/runtime.cc:286] at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:424)