Bug 297824 - Uncought exception in signal handler in Calendar resource
Summary: Uncought exception in signal handler in Calendar resource
Status: RESOLVED FIXED
Alias: None
Product: libkgapi
Classification: Frameworks and Libraries
Component: calendar (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
: 298182 298473 298887 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-10 07:51 UTC by Vojtěch Zeisek
Modified: 2012-04-28 10:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.3.1
Sentry Crash Report:


Attachments
Logs (24.33 KB, application/x-gzip)
2012-04-10 11:14 UTC, Vojtěch Zeisek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vojtěch Zeisek 2012-04-10 07:51:43 UTC
Application: akonadi_googlecalendar_resource (4.7)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.7.4
Operating System: Linux 3.1.9-1.4-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
Akonadi Google asked for login to Google Accountm after then it crashed several times.

-- Backtrace:
Application: Google Calendars and Tasks (akonadi_googlecalendar_resource), signal: Aborted
[KCrash Handler]
#6  0x00007f0d8b307d95 in raise () from /lib64/libc.so.6
#7  0x00007f0d8b3092ab in abort () from /lib64/libc.so.6
#8  0x00007f0d8b937f2d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#9  0x00007f0d8b9360d6 in ?? () from /usr/lib64/libstdc++.so.6
#10 0x00007f0d8b936103 in std::terminate() () from /usr/lib64/libstdc++.so.6
#11 0x00007f0d8b936246 in __cxa_rethrow () from /usr/lib64/libstdc++.so.6
#12 0x00007f0d8dbead66 in QEventLoop::exec (this=<optimized out>, flags=<optimized out>) at kernel/qeventloop.cpp:214
#13 0x00007f0d8dbeedf7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#14 0x00007f0d8e25ee27 in Akonadi::ResourceBase::init (r=0x798d60) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/resourcebase.cpp:393
#15 0x0000000000416d36 in Akonadi::ResourceBase::init<CalendarResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#16 0x00007f0d8b2f423d in __libc_start_main () from /lib64/libc.so.6
#17 0x000000000040e9c1 in _start () at ../sysdeps/x86_64/elf/start.S:113

This bug may be a duplicate of or related to bug 296319.

Possible duplicates by query: bug 297548, bug 297356, bug 297169, bug 297149, bug 296993.

Reported using DrKonqi
Comment 1 Daniel Vrátil 2012-04-10 09:24:07 UTC
Please run Akonadi from console (open konsole, run "akonadictl restart") and then try to reproduce the crash.

When this crash occurs, you should see in the console something like 

"Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt...blahblahblah"

Followed by some more detailed description of the exception (in second paragraph). If you manage to get this description, it would be really awesome :)
Comment 2 Vojtěch Zeisek 2012-04-10 11:14:14 UTC
Created attachment 70284 [details]
Logs

I started akonadiconsole and tried to restart Akonadi. During restart, I get a lot of bus (see attachment), but no crash. As a result, calendars were totally messed up. I had duplicated calendars within calendar folders, calendars from one Google account showing under another account and so on. See also bug #297837.
Comment 3 Daniel Vrátil 2012-04-10 11:25:41 UTC
Sorry, I didn't state it clear before. The point is in waiting for the resource to crash (or trying to make it crash :)) and then just posting the last few paragraphs with information about the crash, not the entire Akonadi log :)

Btw the ouput from console is usually  sufficient, no need to post Akonadi Console or Akonadi error logs.
Comment 4 Daniel Vrátil 2012-04-15 13:44:27 UTC
*** Bug 298182 has been marked as a duplicate of this bug. ***
Comment 5 Frédéric COIFFIER 2012-04-16 14:49:24 UTC
I get this backtrace :


#0  __cxxabiv1::__cxa_rethrow () at /hdf/tmp/portage/sys-devel/gcc-4.5.3-r2/work/gcc-4.5.3/libstdc++-v3/libsupc++/eh_throw.cc:88
#1  0x0000003f40b810b0 in QCoreApplication::notifyInternal (this=0x7fff2fc4d870, receiver=0x16ff100, event=0x178fa40) at kernel/qcoreapplication.cpp:879
#2  0x0000003f40b84657 in sendEvent (event=0x178fa40, receiver=0x16ff100) at kernel/qcoreapplication.h:231
#3  QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x145c1f0) at kernel/qcoreapplication.cpp:1500
#4  0x0000003f40bafff3 in sendPostedEvents () at kernel/qcoreapplication.h:236
#5  postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#6  0x0000003f3ee4a0d9 in g_main_dispatch (context=0x14855e0) at gmain.c:2515
#7  g_main_context_dispatch (context=0x14855e0) at gmain.c:3052
#8  0x0000003f3ee4a498 in g_main_context_iterate (context=0x14855e0, block=1, dispatch=1, self=<optimized out>) at gmain.c:3123
#9  0x0000003f3ee4a554 in g_main_context_iteration (context=0x14855e0, may_block=1) at gmain.c:3184
#10 0x0000003f40bb018f in QEventDispatcherGlib::processEvents (this=0x145dad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#11 0x0000003f4267c80e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#12 0x0000003f40b800c2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#13 0x0000003f40b80375 in QEventLoop::exec (this=0x7fff2fc4d7e0, flags=...) at kernel/qeventloop.cpp:204
#14 0x0000003f40b84afb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#15 0x0000003f539607c6 in Akonadi::ResourceBase::init (r=0x15c6f20) at /hdf/tmp/portage/kde-base/kdepimlibs-4.8.2/work/kdepimlibs-4.8.2/akonadi/resourcebase.cpp:412
#16 0x0000000000414f08 in init<CalendarResource> (argv=<optimized out>, argc=<optimized out>) at /usr/include/KDE/Akonadi/../../akonadi/resourcebase.h:188
#17 main (argc=<optimized out>, argv=<optimized out>) at /hdf/tmp/portage/kde-misc/akonadi-google-9999/work/akonadi-google-9999/calendar/calendarresource.cpp:659
Comment 6 Daniel Vrátil 2012-04-19 20:52:16 UTC
Frederic, could you please try to reproduce the crash with the latest git? I've did some error handling improvements and hopefully it's gone now :)
Comment 7 Frédéric COIFFIER 2012-04-20 08:46:38 UTC
I get the same crash with the last git commit (branch master) :

commit b1c0571e39898d03772d2b801098636a99ef5ddf
Author: Script Kiddy <scripty@kde.org>
Date:   Tue Apr 17 16:17:08 2012 +0200

    SVN_SILENT made messages (.desktop file)

I forgot to provide you the output message corresponding to the crash :

JSonScanner::yylex - unknown char, returning -1 
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'KGoogle::Exception::InvalidAccount'
  what():  The account is invalid.
KCrash: Application 'akonadi_googlecalendar_resource' crashing...
Comment 8 Daniel Vrátil 2012-04-21 13:06:41 UTC
Thank you Frederic, this is an extremely useful information!
Comment 9 Daniel Vrátil 2012-04-21 13:08:11 UTC
*** Bug 298473 has been marked as a duplicate of this bug. ***
Comment 10 Daniel Vrátil 2012-04-23 21:13:00 UTC
Could you please try recent git? I think I got it, but since I am not able to reproduce the crashes, it's a kind of a shooting on blind.

I'm beginning to think that using exceptions was not a good idea after all...
Comment 11 Frédéric COIFFIER 2012-04-24 07:47:05 UTC
Yes, you get it : the crash is gone.

I found the problem behind the crash : it seems there was a problem with my task list. Akonadiconsole said it cannot fetch the task list.
I had to remove my Account in the native configuration (in akonadiconsole) and to add it again. And now, my calendar is correctly synchronized.
Comment 12 Daniel Vrátil 2012-04-28 10:19:09 UTC
*** Bug 298887 has been marked as a duplicate of this bug. ***