[android-developers] Undefined behaviors due to Non-thread safe nature of Bitmaps(Skia)

2012-04-23 Thread mark robinsion
Solving heap corruption/ undefined behaviors is really frustrating. And Bitmap / is one of such culprit, there are two major issues with Bitmap. 1) App developer doesn't have a clue that Bitmap is wrapped over Skia, and Skia is *thread-UNSAFE.* So, all those using Bitmap in non-UI threads

[android-developers] (Heap Corruption)Parameter passed to anonymous AsyncTask goes out of scope or GC-ed in ICS.

2012-04-22 Thread mark robinsion
I'm in doubt that Parameter passed to Anonymous AsyncTask may go out of scope or would be Garbage Collected before AsyncTask 's doInBackground() gets called and behaves randomly, end up in heap corruption. Below is an example(non AsyncTask, we can assume Cat() is AysncTask()) and its ByteCode