App crashes with "Failure delivering result"


#1

QuizActivity > “Cheat!” > CheatActivity > Rotate > Back - this sequence crashes the app. The log I get says 10-18 09:59:13.377: E/AndroidRuntime(4549): FATAL EXCEPTION: main10-18 09:59:13.377: E/AndroidRuntime(4549): java.lang.RuntimeException: Unable to resume activity {com.bignerdranch.android.geoquiz/com.bignerdranch.android.geoquiz.QuizActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=0, data=null} to activity {com.bignerdranch.android.geoquiz/com.bignerdranch.android.geoquiz.QuizActivity}: java.lang.NullPointerException Is it because the result returned is null?

Can anyone please help me understand what’s causing this crash?

Thanks.


#2

Yep, it looks like there’s a NullPointerException in your onActivityResult somehow. If you can give a complete stack trace, that will help me see a bit better what’s going on.