In my code, bullet was skipping some enqueued tasks, i found out that pQueue.poll() is called twice at the beginning of this code
|
AppTask task = pQueue.poll(); |
|
task = pQueue.poll(); |
|
while (task != null) { |
|
while (task.isCancelled()) { |
|
task = pQueue.poll(); |
|
} |
|
try { |
|
task.invoke(); |
|
} catch (Exception ex) { |
|
logger.log(Level.SEVERE, null, ex); |
|
} |
|
task = pQueue.poll(); |
|
} |
This looks like the issue to me and without the double poll the issue is gone. I need some confirmations that i'm not breaking something i don't know.
In my code, bullet was skipping some enqueued tasks, i found out that pQueue.poll() is called twice at the beginning of this code
jmonkeyengine/jme3-bullet/src/main/java/com/jme3/bullet/PhysicsSpace.java
Lines 194 to 206 in cd1d145
This looks like the issue to me and without the double poll the issue is gone. I need some confirmations that i'm not breaking something i don't know.