[GH-ISSUE #107] Null reference exception at DDay.iCal.iCalTimeZoneInfo #104

Closed
opened 2026-02-25 20:30:54 +03:00 by kerem · 4 comments
Owner

Originally created by @schtritoff on GitHub (Jan 26, 2016).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/107

I'm getting exception in Synchronization Reports for every sync (version 1.14.2, caldav server sabre/dav 3.0.7), below are details. This problem showed up recently (version 1.13 was ok I think).

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ProfileName>some profile</ProfileName>
  <ProfileId>2f7cecaf-e114-46b6-a678-481fa2115211</ProfileId>
  <StartTime>2016-01-26T12:49:49.6454561Z</StartTime>
  <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed>
  <LoadErrors />
  <EntitySynchronizationReports />
  <ExceptionThatLeadToAbortion>System.NullReferenceException: Object reference not set to an instance of an object.
   at DDay.iCal.iCalTimeZoneInfo.&lt;&gt;c__DisplayClass2.&lt;GetObservance&gt;b__0(IPeriod p)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at DDay.iCal.iCalTimeZoneInfo.GetObservance(IDateTime dt)
   at DDay.iCal.iCalTimeZone.GetTimeZoneObservance(IDateTime dt)
   at DDay.iCal.iCalDateTime.GetTimeZoneObservance()
   at DDay.iCal.iCalDateTime.get_UTC()
   at CalDavSynchronizer.Implementation.Events.InitialEventEntityMatcher.AreEqual(AppointmentItemWrapper atypeEntity, IICalendar btypeEntity)
   at GenSync.InitialEntityMatching.InitialEntityMatcherByPropertyGrouping`8.FindMatchingEntities(IEntityRelationDataFactory`4 relationFactory, IReadOnlyDictionary`2 allAtypeEntities, IReadOnlyDictionary`2 allBtypeEntities, IReadOnlyDictionary`2 atypeEntityVersions, IReadOnlyDictionary`2 btypeEntityVersions)
   at GenSync.Synchronization.Synchronizer`6.&lt;Synchronize&gt;d__3a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GenSync.Synchronization.Synchronizer`6.&lt;SynchronizeNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion>
  <Duration>00:00:02.3060000</Duration>
</SynchronizationReport>
Originally created by @schtritoff on GitHub (Jan 26, 2016). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/107 I'm getting exception in Synchronization Reports for every sync (version 1.14.2, caldav server sabre/dav 3.0.7), below are details. This problem showed up recently (version 1.13 was ok I think). ``` <?xml version="1.0" encoding="utf-16"?> <SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ProfileName>some profile</ProfileName> <ProfileId>2f7cecaf-e114-46b6-a678-481fa2115211</ProfileId> <StartTime>2016-01-26T12:49:49.6454561Z</StartTime> <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed> <LoadErrors /> <EntitySynchronizationReports /> <ExceptionThatLeadToAbortion>System.NullReferenceException: Object reference not set to an instance of an object. at DDay.iCal.iCalTimeZoneInfo.&lt;&gt;c__DisplayClass2.&lt;GetObservance&gt;b__0(IPeriod p) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate) at DDay.iCal.iCalTimeZoneInfo.GetObservance(IDateTime dt) at DDay.iCal.iCalTimeZone.GetTimeZoneObservance(IDateTime dt) at DDay.iCal.iCalDateTime.GetTimeZoneObservance() at DDay.iCal.iCalDateTime.get_UTC() at CalDavSynchronizer.Implementation.Events.InitialEventEntityMatcher.AreEqual(AppointmentItemWrapper atypeEntity, IICalendar btypeEntity) at GenSync.InitialEntityMatching.InitialEntityMatcherByPropertyGrouping`8.FindMatchingEntities(IEntityRelationDataFactory`4 relationFactory, IReadOnlyDictionary`2 allAtypeEntities, IReadOnlyDictionary`2 allBtypeEntities, IReadOnlyDictionary`2 atypeEntityVersions, IReadOnlyDictionary`2 btypeEntityVersions) at GenSync.Synchronization.Synchronizer`6.&lt;Synchronize&gt;d__3a.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GenSync.Synchronization.Synchronizer`6.&lt;SynchronizeNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion> <Duration>00:00:02.3060000</Duration> </SynchronizationReport> ```
kerem closed this issue 2026-02-25 20:30:54 +03:00
Author
Owner

@aluxnimm commented on GitHub (Jan 26, 2016):

Can you provide the ics file of a calendar event from your server which causes this issue? What timezone are you using? Does this also happen when you sync your server calendar oneway into an empty outlook folder?

<!-- gh-comment-id:174999951 --> @aluxnimm commented on GitHub (Jan 26, 2016): Can you provide the ics file of a calendar event from your server which causes this issue? What timezone are you using? Does this also happen when you sync your server calendar oneway into an empty outlook folder?
Author
Owner

@schtritoff commented on GitHub (Jan 26, 2016):

I've just created new outlook calendar in the same outlook profile then copied caldav sync profile to test with new calendan and there are no errors.
Can't tell which ics file is causing problems. My timezone (Windows PC) is UTC+01:00.

<!-- gh-comment-id:175019358 --> @schtritoff commented on GitHub (Jan 26, 2016): I've just created new outlook calendar in the same outlook profile then copied caldav sync profile to test with new calendan and there are no errors. Can't tell which ics file is causing problems. My timezone (Windows PC) is UTC+01:00.
Author
Owner

@aluxnimm commented on GitHub (Jan 28, 2016):

can't reproduce without the server data, but atleast a workaround is possible.

<!-- gh-comment-id:176429580 --> @aluxnimm commented on GitHub (Jan 28, 2016): can't reproduce without the server data, but atleast a workaround is possible.
Author
Owner

@schtritoff commented on GitHub (Feb 8, 2016):

Since version 1.15, it looks like it's fixed now.

<!-- gh-comment-id:181553031 --> @schtritoff commented on GitHub (Feb 8, 2016): Since version 1.15, it looks like it's fixed now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/outlookcaldavsynchronizer#104
No description provided.