guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.62k stars 728 forks source link

Crash when deactivating #266

Closed micahflee closed 6 years ago

micahflee commented 6 years ago

I'm running a Nexus 6P with the stock ROM. Here's the logcat of the crash. It consistently happens whenever I activate it, lock the screen, and come back to deactivate.

I'm running Haven nightly from the F-Droid repository, version 0.1.0-beta-12 (112).

03-11 19:05:00.337  9566  9566 D AndroidRuntime: Shutting down VM
--------- beginning of crash
03-11 19:05:00.342  9566  9566 E AndroidRuntime: FATAL EXCEPTION: main
03-11 19:05:00.342  9566  9566 E AndroidRuntime: Process: org.havenapp.main, PID: 9566
03-11 19:05:00.342  9566  9566 E AndroidRuntime: java.lang.RuntimeException: Unable to destroy activity {org.havenapp.main/org.havenapp.main.MonitorActivity}: java.lang.IllegalArgumentException: Service not registered: org.havenapp.main.sensors.motion.Preview$1@60e08e9
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4383)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4401)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ActivityThread.-wrap5(Unknown Source:0)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:164)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6494)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-11 19:05:00.342  9566  9566 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Service not registered: org.havenapp.main.sensors.motion.Preview$1@60e08e9
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1484)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ContextImpl.unbindService(ContextImpl.java:1638)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.content.ContextWrapper.unbindService(ContextWrapper.java:703)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at org.havenapp.main.sensors.motion.Preview.stopCamera(Preview.java:397)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at org.havenapp.main.ui.CameraFragment.stopCamera(CameraFragment.java:65)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at org.havenapp.main.MonitorActivity.onDestroy(MonitorActivity.java:244)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.Activity.performDestroy(Activity.java:7208)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1249)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4370)
03-11 19:05:00.342  9566  9566 E AndroidRuntime:    ... 9 more
03-11 19:05:00.351  4253  6921 W ActivityManager:   Force finishing activity org.havenapp.main/.ListActivity
03-11 19:05:00.359  4253  4400 I ActivityManager: Showing crash dialog for package org.havenapp.main u0
n8fr8 commented 6 years ago

Should be fixed in 0.2.0 alpha 2