Skip to content

Ever experienced untraceable ArrayIndexOutofBoundsException on RAZR?

Recently spent some time tracing where the heck this Exception is comming from. I’ve put the try/catch on every thread.run() and still was not able to catch it.. bummer.
Well the problem is that we are using Canvas.callSerially() a lot, and i guess on RAZR there is some (undocumented) limit.
So starting a new Thread rather then [...]

J2ME memory optimization tip. Multidimensional arrays.

Mobile phone is a resource constrained device, that imposes some challenges for application developers.
Quite often it is very convenient to use multidimensional arrays, though when doing so, we have to keep in mind that there is an overhead price to pay, that is, for every array object created, overhead == 16 bytes.
int array of size:0 [...]

String memory footprint on mobile (RAZR) and techniques to optimize it.

We are currently working on the application that will have to receive XML. There is a potential problem here, that it is not always known how big the payload will be. The problematic outcome is, it will simply blow the memory.
Here are the results of method that creates new string object of incremental size and [...]