Bug 287871

Summary: Accessing remote iCal in akonadi crashes plasma-desktop
Product: [Frameworks and Libraries] Akonadi Reporter: Jari Laamanen <yartsa>
Component: ICal file resourceAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: diego.ercolani, fasiko
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: First backtrace
2nd output and backtrace

Description Jari Laamanen 2011-11-29 22:43:11 UTC
Created attachment 66203 [details]
First backtrace

Version:           unspecified (using KDE 4.7.3) 
OS:                Linux

Trying to access a remote iCal-calendar crashes plasma-desktop. Desktop keeps crashing until akonadi gives up. After that it is possible to restart plasma-desktop from the command line. It is also then possible to actually look at the calendar entries in kontact. The added ical is disabled in korganizer, but it can be switched on, and the entries will show up normally. However, right-clicking the akonadi_ical_resource_N and selecting "update calendar folder" reliably crashes the desktop.

This is kubuntu 11.10 using KDE 4.7.3

ii  akonadi-backend-mysql                  1.6.2-0ubuntu1                           MySQL storage backend for Akonadi
ii  akonadi-backend-sqlite                 1.6.2-0ubuntu1                           SQLite storage backend for Akonadi
ii  akonadi-dbg                            1.6.2-0ubuntu1                           debugging symbols for the Akonadi PIM storage service
ii  akonadi-kde-resource-googledata        1.2.0-1                                  Google calendar and contacts resource for Akonadi
ii  akonadi-server                         1.6.2-0ubuntu1                           Akonadi PIM storage service
ii  akonadiconsole                         4:4.7.3-0ubuntu0.1~ppa1                  management and debugging console for akonadi
ii  libical0                               0.44-3                                   iCalendar library implementation in C (runtime)
ii  kde-plasma-desktop                     5:68ubuntu9.1~ppa2                       KDE Plasma Desktop and minimal set of applications
ii  plasma-desktop                         4:4.7.3a-0ubuntu0.1~ppa1                 KDE Plasma workspace for desktop and laptop computers

The remote ical-calendar worked fine earlier. It is read only. The crash happens also at least in kde 4.7.2. I have only access to one remote ical-resource, which is in google. Therefore I cannot test other calendars, but I'll be happy to test some others if there are any available for testing. 

Reproducible: Always

Steps to Reproduce:
0. Start akonadi. Resources come up fine, if there is no remote iCal configured.
1. Add a remote ical-resource to akonadi (ICal calendar file).
2. Press OK
3. Observe the desktop crashing a few times, until akonadi gives up on trying to handle the ical resource


Actual Results:  
Actually, plasma-desktop sefaults:
Application: Plasma Desktop Shell (plasma-desktop), signal: Segmentation fault

Expected Results:  
I expected the desktop not to crash. Actually it was somewhat akward as the first thing after upgrading to kubuntu 11.10 was the desktop crashing repeatedly.

Calendar resources keep flickering in korganizer as akonadi tries to handle the ical resource. If I try to kill manually the agent launcher (/usr/bin/akonadi_agent_launcher akonadi_ical_resource akonadi_ical_resource_N) it will emerge immediately with another PID.

Starting korganizer from a command line gives this a few (20 or so) times:
korganizer(21354)/libakonadi Akonadi::MonitorPrivate::slotStatisticsChangedFinished: Error on fetching collection statistics:  "No status for this folder" 
                                
I attach two plasma-desktop outputs and backtraces, that I managed to get. I am not sure if this is a bug in akonadi or in plasma-desktop. Apparently desktop tries to  access the calendar also. I have "Digital clock" applet in the panel. It shows the calendar entries in its pop-up calendar.
Comment 1 Jari Laamanen 2011-11-29 22:44:50 UTC
Created attachment 66204 [details]
2nd output and backtrace
Comment 2 Jari Laamanen 2011-11-29 22:57:29 UTC
I tried
http://www.kde.org/releaseschedule.ics
and it works fine (no crash or anything). Now, is it just the one calendar I try to access or is it all google ical calendars? I'd be happy to hear if someone with kde 4.7.2+ could report that google ical works for them.
Comment 3 Jari Laamanen 2011-11-29 23:53:28 UTC
However, the ical from bugs.kde.org crashes the plasma-desktop. 

For example: From the left, choose "Bugs reported today", scroll down and copy the link address for the iCalendar file:

https://bugs.kde.org/buglist.cgi?bug_file_loc=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=UNCONFIRMED&bugidtype=include&chfield=%5BBug%20creation%5D&chfieldfrom=1d&chfieldto=Now&field-1-0-0=bug_status&query_format=advanced&remaction=&type-1-0-0=anyexact&value-1-0-0=NEW%2CASSIGNED%2CREOPENED%2CUNCONFIRMED&ctype=ics

Setting this up as an ical resource in akonadi crashes plasma-desktop.
Comment 4 Jari Laamanen 2011-12-06 22:21:28 UTC
Plasma-desktop does not crash if the "Digital Clock" plasma widget is removed from the desktop panel.

However, the ical resource does not work correctly even then. Mysqld, akonadiserver, virtuoso-t, akonadi_nepomuk, nepomukservices and  kontact use all the cpu power until "/usr/bin/akonadi_agent_launcher akonadi_ical_resource" process has been killed a few times, after which the kontact gives up on updating the ical file. In kontact the new ical resource flickers until the akonadi_ical_resource processes have been killed. After that the new ical resource sits in korganizer unticked, but can be ticked (selected) and the entries can be read from the calendar. The next akonadi restart begins the power-hungry endless loop.
Comment 5 Diego Ercolani 2012-01-17 09:29:07 UTC
Same behave here with OpenSuSE 12.1 and
kdebase4-workspace-4.7.2-6.4.1.x86_64
akonadi-runtime-1.6.2-3.1.2.x86_64

If I try to access google calendar resource via remote ics file, plasma desktop crashes removing the clockbar and all the widget also in the desktop.
Windows decoration, shortcut and windows behaviour seem to continue working.
Comment 6 Diego Ercolani 2012-01-17 09:43:17 UTC
Another information regarded my installation

my Graphic card is ATI with fglrx enabled, I don't know if this is a related issue.

I found an article telling how to restart plasma-desktop after a crash under kde4
(http://www.humbug.in/2010/killquit-and-restart-plasma-on-kde/)

if I start from kbuildsycoca4, I have an error that I can't understand:

diego@pc-diego:~> kbuildsycoca4 
kbuildsycoca4 running...
kbuildsycoca4(9310) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file. 
diego@pc-diego:~> 

what does it mean? (I had also removed the /tmp/kde-diego/ksycoca4, while I figured out that the kbuildsycoca4 file is /var/tmp/kde-diego/ksycoca4 that I don't have, in var directory I have /var/tmp/kdecache-diego/ksycoca4) these directories put in different places?
Comment 7 fasiko 2012-01-23 11:16:25 UTC
*** Bug 291944 has been marked as a duplicate of this bug. ***
Comment 8 Jari Laamanen 2012-03-15 00:25:08 UTC
Seems to be fixed in kde 4.8.1. Ical agents should be recreated, though.