RioBus / android-app

RioBus mobile app written with Java
http://riob.us
GNU General Public License v2.0
19 stars 20 forks source link

App closes when the user cancels the search #72

Closed fmsouza closed 8 years ago

fmsouza commented 8 years ago

The error happens when the back button is pressed in the SearchActivity after some search has been loaded to the map.

Error happened in a Motorola Moto X (2014) with Android 6.0.1.

03-24 00:39:09.907 24343-24343/com.tormentaLabs.riobus E/com.tormentaLabs.riobus.map.MapFragment_: search canceled
03-24 00:39:09.908 24343-24343/com.tormentaLabs.riobus D/AndroidRuntime: Shutting down VM
03-24 00:39:09.912 24343-24343/com.tormentaLabs.riobus E/AndroidRuntime: FATAL EXCEPTION: main
                                                                         Process: com.tormentaLabs.riobus, PID: 24343
                                                                         Theme: themes:{default=overlay:com.materialos.cm.theme, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system}
                                                                         java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65540, result=0, data=null} to activity {com.tormentaLabs.riobus/com.tormentaLabs.riobus.RioBusActivity_}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.Intent.getCharSequenceExtra(java.lang.String)' on a null object reference
                                                                             at android.app.ActivityThread.deliverResults(ActivityThread.java:3733)
                                                                             at android.app.ActivityThread.handleSendResult(ActivityThread.java:3776)
                                                                             at android.app.ActivityThread.-wrap16(ActivityThread.java)
                                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                             at android.os.Looper.loop(Looper.java:148)
                                                                             at android.app.ActivityThread.main(ActivityThread.java:5461)
                                                                             at java.lang.reflect.Method.invoke(Native Method)
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                          Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.Intent.getCharSequenceExtra(java.lang.String)' on a null object reference
                                                                             at com.tormentaLabs.riobus.RioBusActivity.onActivityResult(RioBusActivity.java:144)
                                                                             at android.app.Activity.dispatchActivityResult(Activity.java:6456)
                                                                             at android.app.ActivityThread.deliverResults(ActivityThread.java:3729)
                                                                             at android.app.ActivityThread.handleSendResult(ActivityThread.java:3776) 
                                                                             at android.app.ActivityThread.-wrap16(ActivityThread.java) 
                                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412) 
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                             at android.os.Looper.loop(Looper.java:148) 
                                                                             at android.app.ActivityThread.main(ActivityThread.java:5461) 
                                                                             at java.lang.reflect.Method.invoke(Native Method) 
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)