Application crash



  • Hi,

    for me the application worked great for several days/weeks. Since yesterday, Davdroid crashes on syncing. Here the log with outlined personal informations.

    The bug is reproducable, so if more informations are needed I can provide them.

    The used system is:

    • Nexus 5 Android 4.4.2
    • Owncloud 5.0.11 running on Synology Diskstation

    Log:

    D/davdroid.WebDavResource(10260): Processing multi-status element: https://my.domain.com/owncloud/remote.php/caldav/calendars/User1/defaultcalendar_shared
    _by_User2/42F4FCCD-8FC2-4E06-BD6B-F18C3F381D14.ics
    D/davdroid.WebDavResource(10260): <?xml version="1.0" encoding="utf-8"?>
    D/davdroid.WebDavResource(10260): <d:multistatus xmlns:d="DAV:" xmlns:s="http://
    sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://cale
    ndarserver.org/ns/"><d:response><d:href>/owncloud/remote.php/caldav/calendars/Fr
    eddy/defaultcalendar_shared_by_User2/</d:href><d:propstat><d:prop><cs:getctag>53<
    /cs:getctag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propsta
    t><d:prop><d:getetag/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:pr
    opstat></d:response><d:response><d:href>/owncloud/remote.php/caldav/calendars/Fr
    eddy/defaultcalendar_shared_by_User2/owncloud-20616908d7c0a288fe3e1ed34aa396e7.ic
    s</d:href><d:propstat><d:prop><d:getetag>"4d40b7f5f5629d27ddecd95b667d8bca"</d:g
    etetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:
    prop><cs:getctag/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propst
    at></d:response><d:response><d:href>/owncloud/remote.php/caldav/calendars/User1
    /defaultcalendar_shared_by_User2/own
    D/dalvikvm(10260): GC_CONCURRENT freed 265K, 2% free 17339K/17644K, paused 2ms+1
    ms, total 11ms
    D/dalvikvm(10260): GC_CONCURRENT freed 243K, 3% free 17506K/17868K, paused 2ms+2
    ms, total 13ms
    D/dalvikvm(10260): GC_CONCURRENT freed 241K, 3% free 17652K/18044K, paused 2ms+0
    ms, total 12ms
    D/dalvikvm(10260): GC_CONCURRENT freed 165K, 2% free 17872K/18072K, paused 2ms+1
    ms, total 11ms
    D/dalvikvm(10260): GC_CONCURRENT freed 207K, 2% free 18050K/18292K, paused 2ms+1
    ms, total 12ms
    W/dalvikvm(10260): threadid=10: thread exiting with uncaught exception (group=0x
    41fb3ba8)
    E/AndroidRuntime(10260): FATAL EXCEPTION: SyncAdapterThread-1
    E/AndroidRuntime(10260): Process: at.bitfire.davdroid:sync, PID: 10260
    E/AndroidRuntime(10260): java.lang.NullPointerException
    E/AndroidRuntime(10260):        at at.bitfire.davdroid.syncadapter.SyncManager.s
    ynchronize(SyncManager.java:74)
    E/AndroidRuntime(10260):        at at.bitfire.davdroid.syncadapter.DavSyncAdapte
    r.onPerformSync(DavSyncAdapter.java:71)
    E/AndroidRuntime(10260):        at android.content.AbstractThreadedSyncAdapter$S
    yncThread.run(AbstractThreadedSyncAdapter.java:259)
    I/Process (10260): Sending signal. PID: 10260 SIG: 9
    W/InputMethodManagerService(  749): Window already focused, ignoring focus gain
    of: com.android.internal.view.IInputMethodClient$Stub$Proxy@437f7a18 attribute=n
    ull, token = android.os.BinderProxy@4386c5c0
    I/ActivityManager(  749): Process at.bitfire.davdroid:sync (pid 10260) has died.
    

  • developer

    This log output is not readable. Please put it into ``` tags (see GitHub Flavoured Markdown) or post it on https://gist.github.com.

    Have you tried deleting the DAVdroid account and adding it again?



  • Deleting and adding the account solves the problem!

    For bugfixing the log (hopefully in the correct format) again:

    D/davdroid.WebDavResource(10260): Processing multi-status element: https://my.domain.com/owncloud/remote.php/caldav/calendars/User1/defaultcalendar_shared
    _by_User2/42F4FCCD-8FC2-4E06-BD6B-F18C3F381D14.ics
    D/davdroid.WebDavResource(10260): <?xml version="1.0" encoding="utf-8"?>
    D/davdroid.WebDavResource(10260): <d:multistatus xmlns:d="DAV:" xmlns:s="http://
    sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://cale
    ndarserver.org/ns/"><d:response><d:href>/owncloud/remote.php/caldav/calendars/Fr
    eddy/defaultcalendar_shared_by_User2/</d:href><d:propstat><d:prop><cs:getctag>53<
    /cs:getctag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propsta
    t><d:prop><d:getetag/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:pr
    opstat></d:response><d:response><d:href>/owncloud/remote.php/caldav/calendars/Fr
    eddy/defaultcalendar_shared_by_User2/owncloud-20616908d7c0a288fe3e1ed34aa396e7.ic
    s</d:href><d:propstat><d:prop><d:getetag>"4d40b7f5f5629d27ddecd95b667d8bca"</d:g
    etetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:
    prop><cs:getctag/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propst
    at></d:response><d:response><d:href>/owncloud/remote.php/caldav/calendars/User1
    /defaultcalendar_shared_by_User2/own
    D/dalvikvm(10260): GC_CONCURRENT freed 265K, 2% free 17339K/17644K, paused 2ms+1
    ms, total 11ms
    D/dalvikvm(10260): GC_CONCURRENT freed 243K, 3% free 17506K/17868K, paused 2ms+2
    ms, total 13ms
    D/dalvikvm(10260): GC_CONCURRENT freed 241K, 3% free 17652K/18044K, paused 2ms+0
    ms, total 12ms
    D/dalvikvm(10260): GC_CONCURRENT freed 165K, 2% free 17872K/18072K, paused 2ms+1
    ms, total 11ms
    D/dalvikvm(10260): GC_CONCURRENT freed 207K, 2% free 18050K/18292K, paused 2ms+1
    ms, total 12ms
    W/dalvikvm(10260): threadid=10: thread exiting with uncaught exception (group=0x
    41fb3ba8)
    E/AndroidRuntime(10260): FATAL EXCEPTION: SyncAdapterThread-1
    E/AndroidRuntime(10260): Process: at.bitfire.davdroid:sync, PID: 10260
    E/AndroidRuntime(10260): java.lang.NullPointerException
    E/AndroidRuntime(10260):        at at.bitfire.davdroid.syncadapter.SyncManager.s
    ynchronize(SyncManager.java:74)
    E/AndroidRuntime(10260):        at at.bitfire.davdroid.syncadapter.DavSyncAdapte
    r.onPerformSync(DavSyncAdapter.java:71)
    E/AndroidRuntime(10260):        at android.content.AbstractThreadedSyncAdapter$S
    yncThread.run(AbstractThreadedSyncAdapter.java:259)
    I/Process (10260): Sending signal. PID: 10260 SIG: 9
    W/InputMethodManagerService(  749): Window already focused, ignoring focus gain
    of: com.android.internal.view.IInputMethodClient$Stub$Proxy@437f7a18 attribute=n
    ull, token = android.os.BinderProxy@4386c5c0
    I/ActivityManager(  749): Process at.bitfire.davdroid:sync (pid 10260) has died.
    

  • developer

    So can I close this issue? I have seen the exception already but I don't know where it comes from.



  • I had a look at the source, but I'm a C# and not a Java developer, so I'm not really sure about some things:

    Line 73: LocalResource can't be null, because the findByRemoteName() method would throw the RecordNotFoundException ...
    Line 74: If remoteResource.getETag() is null, it will throw the NullPointerException - it found this and stackoverflow:
    http://stackoverflow.com/questions/14863055/java-string-null-check-by-null-or-str-equalsnull

    I think you must double check it ;) Or override it like in the doublicate link.

    Freddy


  • developer

    @Freddyvdh: Of course. But the question is why the getETag is null - it should never be, and there's no useful way how to deal with this.

    I think that deleting and re-adding the account should solve the problem, but I have swapped localResource and remoteResource now, as you suggested. This should ensure that no exception occurs here.


  • developer

    Possible workaround available since b3f145f6a8335a57a3be7634ba71717f868bc7ec – but the question is still WHY the ETag is null. Deleting and re-adding the account should solve the problem. Please check and if the problem still persists, post here (I'll open the issue again).



  • Thanks for the workaround. It is possible to clear the local data to reinitialize without deleting and re-adding the account?


  • developer

    I don't have this button (it's disabled). "Clear cache" is available, but I guess it won't do anything. Please delete and add the account again, otherwise the application logic won't be run.



  • Clear cache doesn't work.

    The sad thing about the re-adding workaround is, that now I can't reproduce the error again: after adding the account I synchronize it, and then the error occurs :/


  • developer

    The sad thing about the re-adding workaround is, that now I can't reproduce the error again: after adding the account I synchronize it, and then the error occurs :/

    I don't understand: Please clarify whether you can reproduce the error now.



  • Yes, I can reproduce it:
    Steps:

    • Delete existing account
    • Add new account
    • Data is synchronized
    • I synchronize manually again
    • Davdroid crashes

  • admin

    Excellent. Could you provide a test account where this problem occurs so that we can test it ourselves and figure out the problem?



  • I will create a test account. Can I send you an e-mail with the data? I don't want to publish it for everybody ;)


  • admin

    @Freddyvdh Of course: play@bitfire.at



  • @devvv4ever Have you any news for the problem?

    When will you provide the next release including the fixes from last week? Now I always have to re-add the account to sync... :/


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.