DAVX5 Crashes during Calendar Sync



  • Server: Nextcloud 16.0.3
    Nginx 1.14.2
    Php 7.3
    Raspberrypi 3B+

    Latest version of Dav5x
    Phone: Samsung S8 with Android 9 One UI, latest update

    When syncing the calendar, about halfway through, the app crashes. I log back into the phone and it continues syncing. It seems to sync everything ok. This only happens on calendar sync. Contacts sync does not cause crash.

    I turned on verbose debugging. The log file is very large. I searched for EXCEPTION and found several. I pasted them into pastebin. Link below:

    https://paste.fedoraproject.org/paste/RElapEP8sdOy4ACzvpuu1A

    Please note I did search this forum for answers. I googled for answers and am posting here because after an exhaustive search I found no resolution to the issue.

    Thank you in advance for your help!



  • I seem to have the exact same issue.

    I just got a brand new Galaxy S10+ and my old CalDAV-Sync app didnt work properly anmore for android 9. So I went and got this app and happly paid for it. My phone would then start to randomly lock in the middle of use and it took me a looong time to figure out its davx5. I even did a factory reset, but now I can trigger the behaviour by syncing the calendars.

    Server: Nextcloud 16:0.3
    Apache 2.4.29
    PHP: 7.2.19
    Virtual Machine running Ubuntu 18.04

    Phone: Samsung Galaxy S10+
    latest Samsung Software
    latest DAVx5

    When I trigger the sync, the phone just goes to lock screen and I have to unlock it. This is really annoying when the phone syncs in the background and no matter what Im doing in the foreground the phone will lock. The sync will however finish successful.

    I enabled verbose debugging and nothing jumps at me as an error except the same EXCEPTION davxuser has!

    Any help would be greatly appreciated.

    EDIT: I just enabled “Always show crash dialog” in Android->Developer Options so a popup appears each time an app crashes.
    When I trigger the sync now I get the following pop up, before the screen locks:

    “System UI has stopped”

    davxuser can u confirm or is this a different issue?


  • developer

    2019-07-26 14:14:46 62528 [syncadapter.ContactsSyncAdapterService] Couldn’t sync contacts
    EXCEPTION java.lang.IllegalStateException: No main account assigned to address book account

    Seems like the DAVx⁵ account has gone for some reason. Can you please provide steps DAVx⁵ debug info (DAVx⁵ / Settings / Debug info) as described in [READ BEFORE POSTING] What’s required to diagnose a problem?

    It could also be some update migration artifact… Did you try to uninstall DAVx⁵ and install it again?



  • Mmmm seems I didnt look good enough, I dont have the “EXCEPTION java.lang.IllegalStateException” just the “EXCEPTION java.io.FileNotFoundException: /data/user/0/at.bitfire.davdroid/app_KeyStore/KeyStore.bks (No such file or directory)”.

    So maybe I have a different problem? Should I open a new a thread?


  • developer

    @Twistator said in DAVX5 Crashes during Calendar Sync:

    Mmmm seems I didnt look good enough, I dont have the “EXCEPTION java.lang.IllegalStateException” just the “EXCEPTION java.io.FileNotFoundException: /data/user/0/at.bitfire.davdroid/app_KeyStore/KeyStore.bks (No such file or directory)”.

    This is not a problem, it just tells that there is no key store that contains accepted custom certificates. The log line above this exception should say “No persistent key store (yet), creating in-memory key store. This is not an error!”.

    So if it doesn’t work for you, there must be another problem. Do you mean a real crash (unhandled exception) or does it just not work for some reason?



  • As I said above, I initially thought its davx5, but now it appears to be only the trigger.
    When I enable the option "Always show crash dialog” in Android->Developer Options so a popup appears each time an app crashes, I get the following message during sync:

    “System UI has stopped”

    The sync itself works fine, but since it causes the System UI App to crash my phone locks itself during the sync. Dav5x does not appear to crash, but rather cause a crash of the system UI process, how I do not know.

    The phone is brand new, and it also happened after a factory reset with only davx5 installed. Davx5 is the only app that triggers this behavior! I have already cleared the cache of system UI and wiped the cache partition. It doesnt help. Weirdly enough on my old Galaxy S9 which also runs android9 it works flawlessly, no crash.

    my debug info on the S10:
    debug.txt

    Since its running on my S9 it might be a samsung software problem on the s10, since the kernel and the OneUI version for example are different, despite both being android 9 / current patch? But I have no idea what else could trigger this behaviour. I could provide a adb logcat output.

    Im sorry to derail this thread. I initially though I have the same problem.



  • Hello, I’m using our app personally on a S10+ too, without any problems ever. I also activated the dialog in the dev options, but all runs as usual. We also have a lot of people who have Samsung devices, and a lot of them also own a S8, S9, S10 and S10+, so this must be a very specific problem.

    Do you have any other apps that control system sync or special settings?



  • @rfc2822 Yes I did logout, removed the account. Cleared cache and data, uninstalled the app. Wiped Davik Cache. Then reinstalled the app. Recreated the account.
    Yes, I mean a real crash. It begins to sync, then about half way through it crashes, the screen goes dark momentarily, sort of like a soft reboot of the phone. I have to authenticate to unlock the phone. Upon unlocking the phone, Dav5x is still syncing and finishes normally. At this point, I check the calendar and it has synced properly all items. This happens everytime I sync the calendar.

    It’s worth noting that I installed another app called OpenSync which I found on google play store. It is a fork of the older version of Dav5x, when it was calledDavDroid. I set it up and it syncs perfectly without crashing. However, it looks abandoned and I consider it a temporary workaround until I can get this Dav5x issue resolved. I want to use Dav5x, not OpenSync.

    Do you require that I post the entire log file?

    Thank you for your help in resolving this issue!



  • First of, thank you for the quick replies 🙂

    Im back to thinking we have the same issue. I did exactly the same thing, I went and installed OpenSync as an attempt to find a working solution for now and now its working flawless.

    @davxuser the way you describe the behavior sounds exactly like mine. Im not a developer here, but could you turn on the Developer Option (Always show crash dialog) and do a sync? I also thaught its Davx5 thats crashing, when infact for me it was a system app triggered by the sync. My phone locked, but the sync finished normally.

    @devvv4ever I dont think I do have any other apps that interfere here. Before I knew that this problem was triggered by davx5 I did a full factory reset and only installed davx5 and whatsapp after it and wanted to run it like that for a while, but the problem was immediatly back and even then I didnt make the connection with dav5x.
    Your own “old” code is working (the opensync fork).

    I dont know what else to say 😕 Im kinda happy for now since I have a working solution in the OpenSync fork. I dont mind having paid for davx5, that way you still get reimbursed for your work here, but obviously if the current davx5 were working for me it would be better.


  • developer

    The stack trace of the crash will probably not be in the DAVx⁵ logs, because it seems that not DAVx⁵, but the “System UI” crashes. So, the full system adb logs (taken while a crash occurs) would surely be helpful. Could you send those to play@bitfire.at?



  • @rfc2822 Thank you for your quick response. I just sent the log file to play@bitfire.at

    Thank you!


  • developer

    Thanks for the logs. I guess the crash is this one:

    CalendarManager: No service bound. Query to current context.
    ActivityThread: Failed to find provider info for com.sec.android.calendar.preference
    CalendarManager: No service bound. Query to current context.
    ActivityThread: Failed to find provider info for com.sec.android.calendar.preference
    CalendarManager: No service bound. Query to current context.
    davx5   : [syncadapter.SyncManager] 4e95e726-6f28-4bce-80fe-b4b720fca913.ics has not been changed on server (ETag still 02c38e45b07b8f8de032a00c9e6dbd18)
    ActivityThread: Failed to find provider info for com.sec.android.calendar.preference
    CalendarManager: No service bound. Query to current context.
    SamsungAlarmManager: setLocked to kernel - T:2 / 20190729T135050, SetElapsed=1358497144, nowELAPSED=1358337034
    davx5   : [syncadapter.SyncManager] 4cef6a9d-cbfc-4879-bc65-988d8a85d76d.ics has not been changed on server (ETag still 8b570d8fae70143ef12feeda6b09650d)
    davx5   : [syncadapter.SyncManager] 4d9becb0-93e8-44bd-8b1c-bc604d2264fc.ics has not been changed on server (ETag still 1fb60b7cf426c1e870b4a87e8e64ed6b)
    CalendarManager: No service bound. Query to current context.
    SamsungAlarmManager: setInexact Intent (T:3/F:0/AC:false) 20190729T134840 - CU:10063/CP:24795
    SamsungAlarmManager: setLocked to kernel - T:2 / 20190729T135050, SetElapsed=1358497144, nowELAPSED=1358337044
    …
    CalendarManager: No service bound. Query to current context.
    SamsungAlarmManager: setLocked to kernel - T:2 / 20190729T135050, SetElapsed=1358497144, nowELAPSED=1358337080
    SamsungAlarmManager: setLocked to kernel - T:3 / 20190729T134845, SetElapsed=1358371681, nowELAPSED=1358337080
    SamsungAlarmManager: setInexact Intent (T:3/F:0/AC:false) 20190729T134840 - CU:10063/CP:24795
    SamsungAlarmManager: setLocked to kernel - T:2 / 20190729T135050, SetElapsed=1358497144, nowELAPSED=1358337082
    SamsungAlarmManager: setLocked to kernel - T:3 / 20190729T134845, SetElapsed=1358371681, nowELAPSED=1358337082
    AndroidRuntime: Shutting down VM
    SamsungAlarmManager: setLocked to kernel - T:2 / 20190729T135050, SetElapsed=1358497144, nowELAPSED=1358337106
    SamsungAlarmManager: setLocked to kernel - T:3 / 20190729T134845, SetElapsed=1358371681, nowELAPSED=1358337106
    AndroidRuntime: FATAL EXCEPTION: main
    AndroidRuntime: Process: com.android.systemui, PID: 8108
    AndroidRuntime: java.util.concurrent.RejectedExecutionException: Task android.os.AsyncTask$3@48a3c59 rejected from java.util.concurrent.ThreadPoolExecutor@315001e[Running, pool size = 17, active threads = 17, queued tasks = 128, completed tasks = 9024]
    AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2085)
    AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
    AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
    AndroidRuntime:        at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:651)
    AndroidRuntime:        at com.android.systemui.servicebox.pages.calendar.CalendarManager.loadTodayEvents(CalendarManager.java:278)
    AndroidRuntime:        at com.android.systemui.servicebox.pages.calendar.CalendarManager$3.run(CalendarManager.java:129)
    AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:873)
    AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
    AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
    AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7045)
    AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
    AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
    

    So it seems like com.android.systemui.servicebox.pages.calendar.CalendarManager.loadTodayEvents could have crashed. Are you using a widget/launcher that shows today events or something like that?



  • @rfc2822 I don’t use any widgets on my phone. My calendar is Etar, a very simple lightweight open source calendar. I have a very clean phone. Not many apps. Only what I need.

    Why do you think OpenSync, which is simply a fork of your older code base DavDroid syncs flawlessly without crash? As I mentioned previously I consider it a workaround until I can hopefully resolve this issue with Dav5x and use it without crashing my phone.

    Thanks again for your continued support in resolving this issue!


  • developer

    @davxuser said in DAVX5 Crashes during Calendar Sync:

    @rfc2822 I don’t use any widgets on my phone. My calendar is Etar, a very simple lightweight open source calendar. I have a very clean phone. Not many apps. Only what I need.

    I see. Would be interesting what com.android.systemui.servicebox.pages.calendar.CalendarManager.loadTodayEvents is…

    Why do you think OpenSync, which is simply a fork of your older code base DavDroid syncs flawlessly without crash? As I mentioned previously I consider it a workaround until I can hopefully resolve this issue with Dav5x and use it without crashing my phone.

    I don’t know and I have no hints, nor can I reproduce the problem, nor does it seem to occur that often …



  • @rfc2822

    I see. Would be interesting what com.android.systemui.servicebox.pages.calendar.CalendarManager.loadTodayEvents is…

    How do I know what it is? Is there something I can do to help figure out what it is?


  • developer

    @davxuser I only found https://forum.xda-developers.com/galaxy-s8/help/s8-ui-stopped-triple-vibration-black-t3779065. I guess its some Samsung UI element (in the launcher etc.), but I don’t know which one and I also don’t know why it crashes on your device… As @devvv4ever said above, current DAVx⁵ versions work fine on another Galaxy S10 device and we didn’t get as many reports about that as we would have if this were a problem on all devices.



  • @rfc2822 So if I’m reading this correctly, this issue will not get a resolution?


  • developer

    @davxuser I don’t know how and I don’t think it’s directly caused by DAVx5… so if you have an idea what I can do in this case, please let me know.



  • Hello. I find this response very disappointing. I have the exact same problem on a Note 8. The exact same phenomenon. I also migrated from OpenSync because I did not want to use abandon-ware, and because I was impressed with the fact that DAVx is actually maintained.
    It took me a while to realize that the screen-freezes were caused by this application, and I was so relieved to see that the problem is not just mine but probably happens across quite many devices.
    I truly hope that you guys find the time to troubleshoot and fix this.


  • developer

    @hbarel said in DAVX5 Crashes during Calendar Sync:

    I truly hope that you guys find the time to troubleshoot and fix this.

    Do you have an idea how to do so? There are some reports about a thing that I have never seen myself, nor can I reproduce it, nor are there useful logs. If you have any idea how I can assist you in this, please let me know.


Log in to reply
 

Similar topics

  • 27
  • 10
  • 3