elixsr / FwdPortForwardingApp

Port Forwarding App for Android
http://elix.sr/fwd
GNU General Public License v3.0
112 stars 45 forks source link

Crash when importing json with broken syntax/missing half a rule object #6

Closed pegasign closed 7 years ago

pegasign commented 7 years ago
07-23 20:08:24.836 8776-8776/com.elixsr.portforwarder E/AndroidRuntime: FATAL EXCEPTION: main
                                                                        Process: com.elixsr.portforwarder, PID: 8776
                                                                        java.lang.RuntimeException: Failure delivering result ResultInfo{who=android:fragment:0, request=1, result=-1, data=Intent { dat=content://com.google.android.apps.docs.storage/document/acc=6;doc=11404 flg=0x1 }} to activity {com.elixsr.portforwarder/com.elixsr.portforwarder.ui.preferences.SettingsActivity}: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 85 path $[0].isTcp
                                                                            at android.app.ActivityThread.deliverResults(ActivityThread.java:3720)
                                                                            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763)
                                                                            at android.app.ActivityThread.-wrap16(ActivityThread.java)
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:148)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:5443)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
                                                                         Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 85 path $[0].isTcp
                                                                            at com.google.gson.Gson.fromJson(Gson.java:902)
                                                                            at com.elixsr.portforwarder.ui.preferences.SettingsFragment.onActivityResult(SettingsFragment.java:346)
                                                                            at android.app.Activity.dispatchActivityResult(Activity.java:6466)
                                                                            at android.app.ActivityThread.deliverResults(ActivityThread.java:3716)
                                                                            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763) 
                                                                            at android.app.ActivityThread.-wrap16(ActivityThread.java) 
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) 
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                            at android.os.Looper.loop(Looper.java:148) 
                                                                            at android.app.ActivityThread.main(ActivityThread.java:5443) 
                                                                            at java.lang.reflect.Method.invoke(Native Method) 
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
                                                                         Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 85 path $[0].isTcp
                                                                            at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
                                                                            at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1017)
                                                                            at com.google.gson.stream.JsonReader.nextName(JsonReader.java:787)
                                                                            at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
                                                                            at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
                                                                            at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
                                                                            at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
                                                                            at com.google.gson.Gson.fromJson(Gson.java:887)
                                                                            at com.elixsr.portforwarder.ui.preferences.SettingsFragment.onActivityResult(SettingsFragment.java:346) 
                                                                            at android.app.Activity.dispatchActivityResult(Activity.java:6466) 
                                                                            at android.app.ActivityThread.deliverResults(ActivityThread.java:3716) 
                                                                            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763) 
                                                                            at android.app.ActivityThread.-wrap16(ActivityThread.java) 
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) 
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                            at android.os.Looper.loop(Looper.java:148) 
                                                                            at android.app.ActivityThread.main(ActivityThread.java:5443) 
                                                                            at java.lang.reflect.Method.invoke(Native Method) 
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)