Raises NullPtrException when <calendar-timezone> attribute does not have any CDATA



  • I realize this is a bug in my server, though it would also be nice if this didn't throw an exception from DavDroid. I get regular messags about NullPtrExceptions in my davdroid logs because my server repoports one of the attributes for calendar collections as ns3:calendar-timezone/.

    W/davdroid.Event( 8494): Can't understand time zone definition
    W/davdroid.Event( 8494): java.lang.NullPointerException
    W/davdroid.Event( 8494): at java.io.StringReader.<init>(StringReader.java:47)
    W/davdroid.Event( 8494): at at.bitfire.davdroid.resource.Event.TimezoneDefToTzId(Event.java:356)
    W/davdroid.Event( 8494): at at.bitfire.davdroid.webdav.WebDavResource.processMultiStatus(WebDavResource.java:540)
    W/davdroid.Event( 8494): at at.bitfire.davdroid.webdav.WebDavResource.propfind(WebDavResource.java:273)
    W/davdroid.Event( 8494): at at.bitfire.davdroid.syncadapter.QueryServerDialogFragment$ServerInfoLoader.loadInBackground(QueryServerDialogFragment.java:167)
    W/davdroid.Event( 8494): at at.bitfire.davdroid.syncadapter.QueryServerDialogFragment$ServerInfoLoader.loadInBackground(QueryServerDialogFragment.java:94)
    W/davdroid.Event( 8494): at android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
    W/davdroid.Event( 8494): at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
    W/davdroid.Event( 8494): at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:57)
    W/davdroid.Event( 8494): at android.os.AsyncTask$2.call(AsyncTask.java:288)
    W/davdroid.Event( 8494): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    W/davdroid.Event( 8494): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    W/davdroid.Event( 8494): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    W/davdroid.Event( 8494): at java.lang.Thread.run(Thread.java:841)


  • developer

    I get regular messags about NullPtrExceptions in my davdroid logs because my server repoports one of the attributes for calendar collections as ns3:calendar-timezone/.

    This exception should only be visible in the logs and indicates that there was something wrong with the time zone. What would you expect DAVdroid to do when it doesn't understand the time zone?



  • I just didn't expect the exception to be shown, since it already gave an error message saying the timezone was invalid.

    If this is expected behavior, then please ignore this. I'll close the bug.


Log in to reply
 

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