ART Runtime Collision Error

I was working on a fairly simple game for android. It works perfectly on my 4.1.2 phone, but on my 5.0.1 tablet(Official release, no root) it crashes shortly into playing it. This is the error message given in logcat.
http://pastebin.com/4BtkKdbk (It’s incredibly long)
Based on my interpretation of it, there seems to be an issue with System.arraycopy, used in collision. The code that handles collision:


        results = new CollisionResults();
        for(int i = 0; i < 8; i++)
        {
            player.collideWith(levelNode.getChild(i).getWorldBound(), results);
        }

(Called in simpleUpdate)
player is a node containing a basic model. levelNode is a node filled with cubes. Is there any way to fix this error? If not, is there a way to avoid it with alternative collision methods?

@undo15 said: I was working on a fairly simple game for android. It works perfectly on my 4.1.2 phone, but on my 5.0.1 tablet(Official release, no root) it crashes shortly into playing it. This is the error message given in logcat. http://pastebin.com/4BtkKdbk (It's incredibly long) Based on my interpretation of it, there seems to be an issue with System.arraycopy, used in collision. The code that handles collision:

        results = new CollisionResults();
        for(int i = 0; i < 8; i++)
        {
            player.collideWith(levelNode.getChild(i).getWorldBound(), results);
        }

(Called in simpleUpdate)
player is a node containing a basic model. levelNode is a node filled with cubes. Is there any way to fix this error? If not, is there a way to avoid it with alternative collision methods?


what about


        results = new CollisionResults();
        for(Spatial child : levelNode.getChildren()) {
            player.collideWith(child, results);
        }

if this works, then there is something wrong with your approach

No, that change didn’t fix the crash. I noticed a weird copy-paste error in my code on top.


for(int i = 0; i < 8; i++)

Should be
for(int i = 0; i < 8; i++)

I managed to fix this issue by using the engine in source form. I replaced the ArrayList in BIHNode with another implementation that did not use System.arraycopy.

Probably a bug with ART and System.arraycopy(), since arraycopy works fine with Dalvik.