Bug 171651 - Crash fetching data from GCALDaemon (google calendar proxy)
Summary: Crash fetching data from GCALDaemon (google calendar proxy)
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-25 15:20 UTC by Frédéric MEUROU
Modified: 2009-03-16 01:14 UTC (History)
3 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 Frédéric MEUROU 2008-09-25 15:20:23 UTC
Version:            (using Devel)
Compiler:          GCC 4.3.2 
OS:                Linux
Installed from:    Compiled sources

Added an account to a GCALDaemon account, crashes on sync

Application : Kontact (kontact), signal SIGSEGV
[Current thread is 0 (LWP 9835)]

Thread 3 (Thread 0xb1003b90 (LWP 9853)):
#0  0xb7fd1424 in __kernel_vsyscall ()
#1  0xb7452ee2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb74d836e in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0xb74cf2e8 in ?? () from /usr/lib/libQtCore.so.4
#4  0x098e1b80 in ?? ()
#5  0x098e1b7c in ?? ()
#6  0x00007530 in ?? ()
#7  0xb759cec9 in QAbstractEventDispatcher::QAbstractEventDispatcher () from /usr/lib/libQtCore.so.4
#8  0xb74d7668 in ?? () from /usr/lib/libQtCore.so.4
#9  0x0998f598 in ?? ()
#10 0x00000000 in ?? ()

Thread 2 (Thread 0xb0802b90 (LWP 9854)):
#0  0xb7fd1424 in __kernel_vsyscall ()
#1  0xb7452ee2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb74d836e in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0xb74cf2e8 in ?? () from /usr/lib/libQtCore.so.4
#4  0x098e1b80 in ?? ()
#5  0x098e1b7c in ?? ()
#6  0x00007530 in ?? ()
#7  0xb759cec9 in QAbstractEventDispatcher::QAbstractEventDispatcher () from /usr/lib/libQtCore.so.4
#8  0xb74d7668 in ?? () from /usr/lib/libQtCore.so.4
#9  0x099848a0 in ?? ()
#10 0x00000000 in ?? ()

Thread 1 (Thread 0xb5043700 (LWP 9835)):
[KCrash Handler]
#6  0xafe2e719 in KOAgendaItem::paintEvent (this=0x9c61fc0, ev=0xbf8e836c) at /home/kdemod/kdemod-core42/work/kdepim/src/kdepim-4.1.67/korganizer/views/agendaview/koagendaitem.cpp:794
#7  0xb6d7b874 in QWidget::event () from /usr/lib/libQtGui.so.4
#8  0xafe311a3 in KOAgendaItem::event (this=0x9c61fc0, event=0xbf8e836c) at /home/kdemod/kdemod-core42/work/kdepim/src/kdepim-4.1.67/korganizer/views/agendaview/koagendaitem.cpp:1279
#9  0xb6d2ef13 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#10 0xb6d35b0a in QApplication::notify () from /usr/lib/libQtGui.so.4
#11 0xb7aa086d in KApplication::notify (this=0xbf8ede1c, receiver=0x9c61fc0, event=0xbf8e836c) at /home/kdemod/kdemod-core42/work/kdelibs/src/kdelibs-4.1.67/kdeui/kernel/kapplication.cpp:307
#12 0xb75a630c in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#13 0xb6d81bda in ?? () from /usr/lib/libQtGui.so.4
#14 0xbf8ede1c in ?? ()
#15 0x09c61fc0 in ?? ()
#16 0xbf8e836c in ?? ()
#17 0xb731bd00 in ?? () from /usr/lib/libQtGui.so.4
#18 0xbf8e845c in ?? ()
#19 0xb731bd00 in ?? () from /usr/lib/libQtGui.so.4
#20 0xbf8e8478 in ?? ()
#21 0xb6d785da in QWidgetPrivate::drawWidget () from /usr/lib/libQtGui.so.4
Backtrace stopped: frame did not save the PC
Comment 1 Kevin Kofler 2008-10-02 10:10:11 UTC
Same faulty line, different triggering conditions:
https://bugs.kde.org/show_bug.cgi?id=171787

Possibly the same bug in kdepim 3.5.10:
https://bugzilla.redhat.com/show_bug.cgi?id=465211

The offending line:
> if ( mIncidence->type() == "Todo"
> && !KOPrefs::instance()->todosUseCategoryColors() ) {

There's a check earlier in that function:
  if ( !mIncidence ) {
    return;
  }
and the KDE 3 version had this comment for it:
  //HACK
  // to reproduce a crash:
  // 1. start Kontact with the Calendar as the initial module
  // 2. immediately select the summary (which must include appt and to-do)
  // causes a crash for me every time in this method unless we make
  // the following check
  if ( !mIncidence )return;
but apparently mIncidence can't just be NULL, it can also be an invalid
pointer. :-(
Comment 2 Sergio Martins 2008-12-17 00:33:28 UTC
yes, very similar to 171787.

Frédéric, does this happen 100% of the time you add a GCALDaemon account?

I think this isn't related to GCalDaemon, just a coincidence. GCalDaemon accounts work fine here.
Comment 3 Sergio Martins 2009-02-09 22:37:27 UTC
SVN commit 924015 by smartins:

requestClose() must be called before save() because save() causes resourceClosed() to be called.

Currently, the first time a resource is closed it doesn't really get closed but it stays marked to be closed (because of 
requestClose()), then, when a normal save comes, like when you add an incidence, closeResource() will close the resource because 
there's a pending close request, all incidences are freed and you get a KOAgendaItem::paintEvent() crash.

CCBUG: 171651
CCBUG: 171787


 M  +3 -1      resourceview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=924015
Comment 4 Sergio Martins 2009-02-09 22:42:52 UTC
I reproduced the crash and fixed it, but there are so many paintEvent bug reports that I'm not sure which ones got fixed.

The backtrace I got was very similar to 171651 and 171787

So can you retest? I see you're using compiled sources, the patch is in the websvn link above.
Comment 5 Sergio Martins 2009-03-16 01:14:27 UTC
Closing, the above commit fixed this problem for me.