Sorry, I misread your code before. It looks the same as lunarview and also the same as my game loop, both of which work fine, so I think it must be something you are doing outside of this code snippet.
You do have to unlock for every successful lock (but not if you get a null back), so your code looks correct to me in this regard The error looks like the one you would get if the canvas was already locked when you called lock, so are you sure you aren't doing something elsewhere in the code that is locking the canvas? Maybe you could also add some more trace info - is the unlock call definitely being reached, and is the exception thrown the 1st time round the loop or after a number of iterations? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

