NullPointerException in LocalCollection.updateByRemoteName

  • Hi,

    I get said NullPointerException (logcat at the bottom) and davDroid consequently crashes.

    I think it might be a missing null check on localResource in LocalCollection.updateByRemoteName as:

     public T findByRemoteName(...){
      line 139:   return null;
    public updateByRemoteName(...) {
        line 166: T localResource = findByRemoteName(remoteResource.getName(), false); 
        line 169: localResource.getLocalID()

    seems to be a possible path.

    The relevant logcat extract below (seems to be all there is):

    I/ActivityManager( 1644): Start proc at.bitfire.davdroid:sync for service at.bitfire.davdroid/.syncadapter.CalendarsSyncAdapterService: pid=9781 uid=10089 gids={3003, 1028}
    E/AndroidRuntime( 9781): FATAL EXCEPTION: SyncAdapterThread-1
    E/AndroidRuntime( 9781): java.lang.NullPointerException
    E/AndroidRuntime( 9781): 	at at.bitfire.davdroid.resource.LocalCollection.updateByRemoteName(
    E/AndroidRuntime( 9781): 	at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(
    E/AndroidRuntime( 9781): 	at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(
    E/AndroidRuntime( 9781): 	at android.content.AbstractThreadedSyncAdapter$
    I/ActivityManager( 1644): Process at.bitfire.davdroid:sync (pid 9781) has died.

    My setup is an Android Device (4.1.2) syncing with an owncloud instance.

  • developer

    I have already added that check today. I just don’t understand how there can be null objects…

Similar topics

  • 1
  • 1
  • 2