Bug 460592 - parse error from icalcomponent_new_from_string
Summary: parse error from icalcomponent_new_from_string
Status: RESOLVED UPSTREAM
Alias: None
Product: frameworks-kcalendarcore
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.99.0
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-17 13:44 UTC by Ricardo J. Barberis
Modified: 2022-10-19 00:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo J. Barberis 2022-10-17 13:44:58 UTC
SUMMARY

When I restart akonadi from konsole I get this output:

```
parse error from icalcomponent_new_from_string. string= "BEGIN:VCALENDAR...  ##  Loooong line with the full content of my .ics file
kf.calendarcore: "/home/richis/.local/share/apps/korganizer/std.ics"  is not a valid iCalendar file
kf.calendarcore: Error parsing vCalendar file: syntax error at line 108
kf.calendarcore: Error parsing vCalendar file: pop on empty Object Stack at line 108
kf.calendarcore: "/home/richis/.local/share/apps/korganizer/std.ics"  is not a valid vCalendar file.  exception code  7
akonadi_ical_resource: Error loading file  "/home/richis/.local/share/apps/korganizer/std.ics"
"Could not read file '/home/richis/.local/share/apps/korganizer/std.ics'"
```

STEPS TO REPRODUCE
1. akonadictl stop
2. akonadictl start
3. read the output

OBSERVED RESULT
parse error from icalcomponent_new_from_string

EXPECTED RESULT
.ics file parsed correctly

SOFTWARE/OS VERSIONS
Operating System: Slackware 15.0 (-current)
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.19.16 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
There are similar cases with ktimetracker, see:
https://forum.kde.org/viewtopic.php?f=215&t=176235&p=458379#p458379
Comment 1 gjditchfield 2022-10-17 17:34:20 UTC
Can you add the (redacted) contents of std.ics around line 108 to this report?

Do you see any obvious syntax errors in std.ics?  The file format is here:
https://www.rfc-editor.org/rfc/rfc5545
Comment 2 Ricardo J. Barberis 2022-10-18 01:50:42 UTC
Hi, thanks for replying.

Unfortuantely I'm not well versed in iCal format so I don't yhink I'll be able to spot the error.

Here's the relevant line and some edited conext, generated with `cat -nv /home/richis/.local/share/apps/korganizer/std.ics`:

```
   105  BEGIN:VEVENT^M
   106  ORGANIZER:MAILTO:some.one@domain.tld^M
   107  DTSTAMP:20221010T001928Z^M
   108  ATTENDEE;CN='My Boss';RSVP=FALSE;PARTSTAT=NEEDS-ACTION;^M
   109   ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL;X-UID=69899904:mailto:^M
   110   my.boss@domain.tld^M
   111  ATTENDEE;CN=Me;RSVP=FALSE;PARTSTAT=ACCEPTED;^M
   112   ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL;X-UID=82753200:mailto:^M
   113   me@domain.tld^M
```

If you or someone else knows an ical validator (preferably a local CLI or GUI app, not a web service or website for privacy reasons) I'm more than willing to install and try it.

Thanks again!
Comment 3 Helmar Gerloni 2022-10-18 19:48:58 UTC
Same problem here, Debian Testing, korganizer, akonadi 22.08.0. Events are missing in my calendar and i get the same errors on the console.

It seems to be related to a bug in libical3.

https://github.com/libical/libical/issues/610

After downgrading libical3 from 3.0.15 to 3.0.14 all events are here again and the errors are gone.
Comment 4 Antonio Rojas 2022-10-18 20:07:10 UTC
libical bug fixed in 3.0.16
Comment 5 Ricardo J. Barberis 2022-10-19 00:25:29 UTC
Thanks for the info Helmar and Antonio!

I see libical 3.0.16 has landed on my distro among other updates, I'll be checking it out tomorrow.