Error at line 29:Attempt to invoke virtual method 'void java.util.Calendar.setTimeZone(java.util.TimeZone)' on a null object reference



  • Hi,
    if i want to synchronize my calendar at my galaxy s7 smarthpone, this error message occurs:

    --- BEGIN DEBUG INFO ---
    Account name: Synology Kalender
    Authority: org.dmfs.tasks
    
    REMOTE RESOURCE:
    https://192.168.0.100:5004/Kalender/Synology/a2f6e0de-3c6b-4ec9-be47-24846b5494e7-caldavsyncadapter.ics
    
    EXCEPTION:
    at.bitfire.ical4android.InvalidCalendarException: Couldn't parse iCalendar object
    	at at.bitfire.ical4android.Task$Companion.fromReader(Task.kt:69)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.processVTodo(TasksSyncManager.kt:140)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.access$processVTodo(TasksSyncManager.kt:44)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$2$1$1.invoke(TasksSyncManager.kt:126)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$2$1$1.invoke(TasksSyncManager.kt:44)
    	at at.bitfire.davdroid.syncadapter.SyncManager.useRemote(SyncManager.kt:820)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$2$1.invoke(TasksSyncManager.kt:113)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$2$1.invoke(TasksSyncManager.kt:44)
    	at at.bitfire.dav4jvm.Response$Companion.parse(Response.kt:211)
    	at at.bitfire.dav4jvm.DavResource$processMultiStatus$2.invoke(DavResource.kt:465)
    	at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:484)
    	at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:435)
    	at at.bitfire.dav4jvm.DavCalendar.multiget(DavCalendar.kt:151)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$2.invoke(TasksSyncManager.kt:112)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$2.invoke(TasksSyncManager.kt:44)
    	at at.bitfire.davdroid.syncadapter.SyncManager.useRemote(SyncManager.kt:809)
    	at at.bitfire.davdroid.syncadapter.SyncManager.useRemoteCollection(SyncManager.kt:830)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.downloadRemote(TasksSyncManager.kt:111)
    	at at.bitfire.davdroid.syncadapter.SyncManager$syncRemote$1$1.run(SyncManager.kt:451)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    	at java.lang.Thread.run(Thread.java:764)
    Caused by: net.fortuna.ical4j.data.ParserException: Error at line 29:Attempt to invoke virtual method 'void java.util.Calendar.setTimeZone(java.util.TimeZone)' on a null object reference
    	at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:158)
    	at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:198)
    	at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:178)
    	at at.bitfire.ical4android.Task$Companion.fromReader(Task.kt:67)
    	... 23 more
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.Calendar.setTimeZone(java.util.TimeZone)' on a null object reference
    	at java.text.DateFormat.setTimeZone(DateFormat.java:690)
    	at net.fortuna.ical4j.model.Iso8601.<init>(Iso8601.java:77)
    	at net.fortuna.ical4j.model.Date.<init>(Date.java:150)
    	at net.fortuna.ical4j.model.DateTime.<init>(DateTime.java:253)
    	at net.fortuna.ical4j.model.TimeZone.getOffset(TimeZone.java:108)
    	at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2356)
    	at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2813)
    	at java.util.Calendar.updateTime(Calendar.java:3397)
    	at java.util.Calendar.getTimeInMillis(Calendar.java:1761)
    	at java.util.Calendar.getTime(Calendar.java:1734)
    	at java.text.SimpleDateFormat.parseInternal(SimpleDateFormat.java:1633)
    	at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1528)
    	at java.text.DateFormat.parse(DateFormat.java:360)
    	at net.fortuna.ical4j.model.DateTime.setTime(DateTime.java:415)
    	at net.fortuna.ical4j.model.DateTime.<init>(DateTime.java:321)
    	at net.fortuna.ical4j.model.property.DateProperty.setValue(DateProperty.java:137)
    	at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.propertyValue(CalendarBuilder.java:299)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.parse(CalendarParserImpl.java:282)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.access$1100(CalendarParserImpl.java:229)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:210)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.parse(CalendarParserImpl.java:422)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.access$900(CalendarParserImpl.java:406)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:208)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendar(CalendarParserImpl.java:115)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendarList(CalendarParserImpl.java:180)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:149)
    	... 26 more
    
    SOFTWARE INFORMATION
    * at.bitfire.davdroid 2.3-gplay (272) from com.android.vending
    * org.dmfs.tasks 1.1.17 (7430) from com.android.vending
    * com.android.providers.contacts 2.0.49 (204900000)
    * com.android.providers.calendar 1.0.00.35 (100000035)
    * com.samsung.android.contacts 3.8.25.28 (382500028)
    * com.samsung.android.calendar 4.4.04.7 (440400007) from com.sec.android.app.samsungapps
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    Power saving disabled: yes
    android.permission.READ_CONTACTS: granted
    android.permission.WRITE_CONTACTS: granted
    android.permission.READ_CALENDAR: granted
    android.permission.WRITE_CALENDAR: granted
    org.dmfs.permission.READ_TASKS: granted
    org.dmfs.permission.WRITE_TASKS: granted
    android.permission.ACCESS_COARSE_LOCATION: denied
    System-wide synchronization: automatically
    Account: Carddav adressbuch
      Address book sync. interval: 60 min
      Calendar     sync. interval: —
      OpenTasks    sync. interval: —
      WiFi only: true
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
               Use event colors: false
    Account: Müllkalender Rossdorf
      Address book sync. interval: —
      Calendar     sync. interval: 60 min
      OpenTasks    sync. interval: 240 min
      WiFi only: true
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
               Use event colors: false
    Account: Synology Kalender
      Address book sync. interval: —
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: 240 min
      WiFi only: true
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
               Use event colors: false
    Address book account: addressbook (Carddav adressbuch Zg)
      Main account: Account {name=Carddav adressbuch, type=bitfire.at.davdroid}
      URL: https://192.168.0.100:8443/addressbooks/__uids__/B6A18C91-AE21-5E00-B073-35742EB188FD/addressbook/
      Sync automatically: true
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  de_DE |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  3 | Carddav adressbuch | carddav | https://192.168.0.100:8443/principals/__uids__/B6A18C91-AE21-5E00-B073-35742EB188FD/ |
    	|  5 | Müllkalender Rossdorf | caldav | <null> |
    	|  6 | Synology Kalender | caldav | <null> |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 6 |
    	|  homesets | 11 |
    	|  collections | 12 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  5 | 3 | https://192.168.0.100:8443/addressbooks/__uids__/B6A18C91-AE21-5E00-B073-35742EB188FD/ |
    	|  9 | 5 | https://192.168.0.100:5004/Kalender/Muellkalender_Rossdorf/ |
    	|  11 | 6 | https://192.168.0.100:5004/Kalender/Synology/ |
    ----------
    collections
    	|  _id | serviceID | type | url | privWriteContent | privUnbind | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  6 | 3 | ADDRESS_BOOK | https://192.168.0.100:8443/addressbooks/__uids__/B6A18C91-AE21-5E00-B073-35742EB188FD/addressbook/ | 1 | 1 | 0 | <null> | <null> | <null> | <null> | 0 | 0 | <null> | 1 |
    	|  10 | 5 | CALENDAR | https://192.168.0.100:5004/Kalender/Muellkalender_Rossdorf/ | 1 | 1 | 0 | <null> | <null> | <null> | <null> | 1 | 1 | <null> | 1 |
    	|  12 | 6 | CALENDAR | https://192.168.0.100:5004/Kalender/Synology/ | 1 | 1 | 0 | <null> | <null> | <null> | <null> | 1 | 1 | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 8.0.0 (R16NW.G930FXXU3ESA3)
    Device: samsung SM-G930F (herolte)
    
    --- END DEBUG INFO ---
    


  • If I interpret the messages correctly the app has problems to interpret a time stamp in a calendar record. You should open the relevant entry by opening the “REMOTE RESOURCE” link on top of the debug output. This should help ypu identifying which record is causing the problem and how the time stamps look like.



  • Thanks. I deleted this event. but this error messages come again for other events too after it. 😞



  • i installed the previous version 2.2.3.1 and now it works again. so i deactivated now the updates. its a bug in the newest version of davx5.


  • developer

    Hello,

    @hell said in Error Message:

    its a bug in the newest version of davx5.

    If it would be that easy… seems to be a variation of https://www.davx5.com/faq/java-lang-nullpointerexception-java-util-gettimezone. So: does it work if you now install DAVx⁵ 2.3 again?



  • Wouldn’t it be helpful to see how the original date/time string looks like which causes the problem or is the root cause defintely confirmed?



  • @rfc2822 said in Error at line 29:Attempt to invoke virtual method 'void java.util.Calendar.setTimeZone(java.util.TimeZone)' on a null object reference:

    If it would be that easy… seems to be a variation of https://www.davx5.com/faq/java-lang-nullpointerexception-java-util-gettimezone. So: does it work if you now install DAVx⁵ 2.3 again

    i will try later to install again the newest version and will post here the result. yesterday i tried to remove my caldav/carddav accounts and installed them again. this didnt help. same error messages. if it doesnt work with the newest version of davx5, i can’t check every event. i have thousands of events in my calendar. Editing/correcting every event is not an option.


  • developer

    @hell said in Error at line 29:Attempt to invoke virtual method 'void java.util.Calendar.setTimeZone(java.util.TimeZone)' on a null object reference:

    i will try later to install again the newest version and will post here the result. yesterday i tried to remove my caldav/carddav accounts and installed them again.

    That won’t help in this case. You will have to re-install DAVx⁵ (for unknown reasons).


Log in to reply