Open ProactiveServices opened 6 years ago
Could you please try to reproduce it with this debug build and tell me what the "status" tab says?
The conditions/settings listed in the Status tab are the same from when I had the crash: Syncthing is running. Allowed to run on mobile data, but not connected Allowed to run on WiFi and connected Allowed to run on non-metered WiFi. Active WiFi is non-metered. Allowed to run on the current WiFi.
In the options: Run when devices is powered by AC and battery. Respect battery saving setting: Enabled Respect Auto-sync data setting: Disabled
When I switch on power saving Syncthing is still running, the status pane is unchanged. I tried exiting and quitting the app, and starting it in power saving mode and the same happens. I can see in the Android options that power saving is enabled.
Ok I've to check the run conditions, recalling there was some code that has been for long in the app to detect power save mode but the code only works on android L or higher. This was taken over by my latest PR as is, maybe theres a bug.
Crashed again and this time the Android log mentions a Syncthing crash, and I received a notification of the crash. The Syncthing logfile only showed the first few lines of a regular start-up and nothing else after folders being ready. I think (but not sure) that I had turned off WiFi at the time. I may have enabled Power Save but not sure. I'm using the debug build you linked earlier.
--------- beginning of main 08-18 00:42:14.005 I/SyncthingNativeCode(14485): [YECXW] INFO: My ID: YECXW42-
08-18 00:42:14.936 E/StrictMode(14485): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. 08-18 00:42:14.936 E/StrictMode(14485): java.lang.Throwable: Explicit termination method 'close' not called 08-18 00:42:14.936 E/StrictMode(14485): at dalvik.system.CloseGuard.open(CloseGuard.java:184) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:271) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.Connection.upgradeToTls(Connection.java:197) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.Connection.connect(Connection.java:151) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:99) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:131) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:120) 08-18 00:42:14.936 E/StrictMode(14485): at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:87) 08-18 00:42:15.006 I/System (14485): exec(sh @ com.nutomic.syncthingandroid.service.SyncthingRunnable.getSyncthingPIDs:229) 08-18 00:42:15.366 I/System (14485): exec(sh @ com.nutomic.syncthingandroid.util.Util.runShellCommand:181) 08-18 00:42:16.397 I/SyncthingNativeCode(14485): [YECXW] INFO: Hashing performance is 14.37 MB/s 08-18 00:42:16.417 I/System (14485): exec(sh @ com.nutomic.syncthingandroid.service.SyncthingRunnable.getSyncthingPIDs:229) 08-18 00:42:19.120 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.140 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.190 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.240 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.250 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.260 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.361 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive) 08-18 00:42:19.571 I/System (14485): exec(sh @ com.nutomic.syncthingandroid.util.Util.runShellCommand:181) 08-18 00:42:19.661 I/SyncthingRunnable(14485): Syncthing exited with code 9 08-18 00:42:19.661 W/SyncthingRunnable(14485): Syncthing has crashed (exit code 9) 08-18 01:13:40.572 I/System (14485): exec(/system/bin/logcat -t 300 -v time -s SyncthingNativeCode @ com.nutomic.syncthingandroid.activities.LogActivity$UpdateLogTask.getLog:155) 08-18 01:13:49.821 I/System (14485): exec(/system/bin/logcat -t 300 -v time *:i ps:s art:s @ com.nutomic.syncthingandroid.activities.LogActivity$UpdateLogTask.getLog:155)
@ProactiveServices : ( When I switch on power saving Syncthing is still running, ) I cannot reproduce this. If I enable power saving mode on my phone, this happens expectedly: Disabling power save mode runs syncthing again. Does the problem still persist in the latest rc . I've added the status tab in my fork: https://github.com/Catfriend1/syncthing-android/releases
I'm currently working on this on my branch.
W/SyncthingRunnable(14485): Syncthing has crashed (exit code 9) The crash handler is little bit outdated, so I'm improving it with the UI telling if syncthing crashed and showing the notification under correct circumstances. When I've tested through enough, I'll make a new RC.
@Catfriend1 That's great, if you intend to contribute this fix back. If this is stuff that you do in your fork and intend to stay in your fork, please do not involve the issue tracker of this project in it.
@calmh Maybe I'll come back one day when I've more time to do the review stuff with the reviewers. For the moment, I'm pushing development on the app forward as it still has major problems on Android 8 and Android 9 which I will use in the near future on my phone. I'm always glad if I can help. For now, it's up to the maintainers if they like to cherry-pick my fixes in here and up to the users which version they like to use. I've filed "proper" PR's against my fork repo, so it shouldn't be too hard to get this over if desired.
Great, you're welcome to do so and always welcome back. But unless you intend to file fixes here, please keep discussion to your own issue tracker.
I switched off power saving mode on my Android and noticed Syncthing's notification icon shuffled, then found this in the log. Syncthing is set to respect battery saving mode.
App Version: 0.10.13 Syncthing Version: v0.14.49-dirty Android Version: Android 5.0.2