Android/Ouya: Vector errStack bug
Monkey Forums/Monkey Bug Reports/Android/Ouya: Vector errStack bug
| ||
Here's a tough bug to track down: I am playing with the Ouya target, and things seem to work. I make a small test prog and controller seems to work. Then i bring in miniB3D. I start getting strange error every so often, but they are all "ArrayOutOfBounds" errors. Located in the MonkeyGame "popErr()" function. Things work just fine in Android phones, OS 4.1.1. Strange. DO a quick googl on Vector class in java and it seems in some java versions it is deprecated because of concurrency errors. Odd. I change the errStack to use ArrayDeque instead, and errors go away (but very slow). Then I use a "synchornized" like so: static synchronized void popErr(){ if( errStack.size()==0 ) throw new Error( "STACK ERROR!" ); errInfo=(String)(errStack.remove( errStack.size()-1 )); } oh, my, the errors go away. What are you doing Ouya? threading my routines? interesting stuff, but this cures it. weird. ideas? |
| ||
Is it possible to use an ArrayList instead of an ArrayDeque without much modifications? It might not be as slow |