Closed thecosmicfrog closed 9 years ago
This is related to the use of Fragments and is due to the LuasTimesFragment not yet being added to the MainActivity, causing the UI manipulation code in onPostExecute() and setIsLoading() to throw IllegalStateException.
Below is a StackOverflow link outlining the same problem: http://stackoverflow.com/questions/25908626/illegalstateexception-fragment-not-attached-to-activity-when-finish-asynctask
The solution is to add a simple check using if (isAdded()) {} around any UI manipulation code in the Fragment.
Fixed in a310859f8f13c9d22552d7da21e392bb5a67ed69 and 0a484e56fe1999b6a6349fcc9019827cae27266b. Closing.
When Luas at a Glance is open and the handheld device is rotated several times in a short space of time (causing the Activity to redraw many times), the app occasionally crashes.