I have an if statment that if the condition is met, I do a setImageResource() on an ImageView and occasionaly it works, but most of the time it force closes after the fact. If I comment out the setImageResource() it will do all the other calculations and such fine. Can anyone shed some light on this?