yggdrasil-network / crispa-android

Community-contributed application for connecting to the Yggdrasil Network on Android devices
https://t.me/yggdrasil_android
Mozilla Public License 2.0
116 stars 22 forks source link

Crash on inconsistent state #48

Closed mwarning closed 3 years ago

mwarning commented 3 years ago

Affected Version:

Steps to reproduce:

  1. start ygg
  2. enable "Static IP" and "Ygg me!"
  3. close ygg window
  4. open ygg window via Notification entry (it says "Yggdrasil service is running")
  5. disable "Static IP" and "Ygg me!"
  6. close ygg window
  7. open ygg window via Notification entry (et say "Yggdrasil service stopped")
  8. "Static IP" and "Ygg me!" are now displayed as enabled!
  9. to try to disable "Ygg me!" now crashes the app

Stacktrace:

2021-01-22 08:41:19.037 19671-19671/io.github.chronosx88.yggdrasil D/AndroidRuntime: Shutting down VM
2021-01-22 08:41:19.038 19671-19671/io.github.chronosx88.yggdrasil E/AndroidRuntime: FATAL EXCEPTION: main
    Process: io.github.chronosx88.yggdrasil, PID: 19671
    java.lang.RuntimeException: Unable to start service io.github.chronosx88.yggdrasil.YggdrasilTunService@68296bd with Intent { cmp=io.github.chronosx88.yggdrasil/.YggdrasilTunService (has extras) }: kotlin.UninitializedPropertyAccessException: lateinit property tunInputStream has not been initialized
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3368)
        at android.app.ActivityThread.-wrap21(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1601)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6186)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
     Caused by: kotlin.UninitializedPropertyAccessException: lateinit property tunInputStream has not been initialized
        at io.github.chronosx88.yggdrasil.YggdrasilTunService.stopVpn(YggdrasilTunService.kt:234)
        at io.github.chronosx88.yggdrasil.YggdrasilTunService.onStartCommand(YggdrasilTunService.kt:54)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3351)
        at android.app.ActivityThread.-wrap21(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1601) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6186) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 
vikulin commented 3 years ago

Fixed in https://github.com/vikulin/crispa-android/releases/tag/v2.0.16-RC1