Hello, We are using threads in our app, to ask for an xml and some remote images which load on our activity's listview. This activity also uses Tabs, so when we click on the tab buttons the info on the listview is updated.
However, in certain occasions we get a Fatal Error: Asynctask #1 (or 2, or 5, etc....) This starts with a NullPointerException when trying to read the xml from the server. However, this xml is available (and correct) all the time, so not quite sure why it's doing this. Investigating we have found this must be a thread error, which happens when we are using various threads at the same time on the same activity. We believe we must have some control of this threads, to prevent the error from happening. For instance, when we order a new thread to load content on the list, it would be interesting to stop the previous thread executions to prevent "collisions" between them. We also have investigated ThreadSafeClientConnManager, which may be a good way to control conflicts between thread executions...but haven't managed to solve the problem. Can somebody throw some light into our problem...? How can we handle threads and prevent this asynctask errors?! Many thanks in advance! -- 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

