Monkey Testing and Exceptions

Boy have I been learning my lesson about not updating UI components in different thread. This is of course with reference to android programming.

I sorted out running the monkey UI Tester on Days Until and it found a whole series of exceptions being thrown because I was updating UI components on different threads. For the most part it just works but in some instance it can cause problems. The Random monkey tester, whom I think I will name Freddy, seems very good at finding them.

The solution is to use the handler class and post messages to the main UI thread telling it to updates itself.

I suspect anyone with any UI design/programming experience would say Duh of course you idiot that sort of thing is dangerous. As someone who has limited UI programming experience it has been a bit of a tough learning experience. Not a lesson I am going to forget in a hurry.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.