Ticket #195 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

kdepim crashes during exit with QWidget error

Reported by: Graham Cobb Assigned to: ehabkost
Priority: high Milestone:
Component: Plugin: kdepim Version:
Severity: major Keywords:
Cc:

Description

When I try any operation with the kdepim pluging, it crashes during exit (forcing a slow sync next time). The error is during the call to KABC::AddressBook::save from KContactDataSource::disconnect (see backtrace below). An error is reported from QWidget:

QWidget: Cannot create a QWidget when no GUI is being used

Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault. 0xb6c9ae49 in QWidget::create () from /usr/lib/libqt-mt.so.3 (gdb) bt #0 0xb6c9ae49 in QWidget::create () from /usr/lib/libqt-mt.so.3 #1 0xb6d72eb9 in QWidget::QWidget () from /usr/lib/libqt-mt.so.3 #2 0xb76774ea in KIO::NetAccess::enter_loop () from /usr/lib/libkio.so.4 #3 0xb76b3c09 in KIO::NetAccess::synchronousRunInternal () from /usr/lib/libkio.so.4 #4 0xb76f21f1 in KIO::NetAccess::synchronousRun () from /usr/lib/libkio.so.4 #5 0xb644b288 in KABC::ResourceFile::save () from /usr/lib/libkabc_file.so.1 #6 0xb7a23256 in KABC::AddressBook::save () from /usr/lib/libkabc.so.1 #7 0xb7b95770 in KContactDataSource::disconnect (this=0x8086498, ctx=0xb374b6d0) at src/kaddrbook.cpp:87 #8 0xb7b90869 in KdePluginImplementation::disconnect (this=0x806da30, ctx=0xb374b6d0) at src/kdepim_impl.cpp:163 #9 0xb7f9aa16 in kde_disconnect (ctx=0xb374b6d0) at src/kdepim_sync.cpp:94 #10 0xb7efc047 in osync_member_disconnect (member=0x8071550, function=0xb7eddf30 <message_callback>, user_data=0xb375b940)

at opensync_member.c:1168

#11 0xb7ede2b9 in client_message_handler (sender=0x0, message=0xb375b940, client=0x8071f00) at osengine_client.c:176 #12 0xb7edd917 in _queue_dispatch (source=0x806d5b0, callback=0, user_data=0x8070270) at osengine_queue.c:163 #13 0xb7f2f691 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #14 0xb7f329d7 in g_main_context_check () from /usr/lib/libglib-2.0.so.0 #15 0xb7f32f28 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #16 0xb7f4c7e5 in g_static_private_free () from /usr/lib/libglib-2.0.so.0 #17 0xb7ba1e60 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #18 0xb7e718ee in clone () from /lib/tls/i686/cmov/libc.so.6

This crash is completely reproducible in my configuration -- every use of kdepim crashes this way during exit.

Change History

05/30/06 19:20:21 changed by Graham Cobb

Backtrace in readable format:

Program received signal SIGSEGV, Segmentation fault.
0xb6c9ae49 in QWidget::create () from /usr/lib/libqt-mt.so.3
(gdb) bt
#0  0xb6c9ae49 in QWidget::create () from /usr/lib/libqt-mt.so.3
#1  0xb6d72eb9 in QWidget::QWidget () from /usr/lib/libqt-mt.so.3
#2  0xb76774ea in KIO::NetAccess::enter_loop () from /usr/lib/libkio.so.4
#3  0xb76b3c09 in KIO::NetAccess::synchronousRunInternal () from /usr/lib/libkio.so.4
#4  0xb76f21f1 in KIO::NetAccess::synchronousRun () from /usr/lib/libkio.so.4
#5  0xb644b288 in KABC::ResourceFile::save () from /usr/lib/libkabc_file.so.1
#6  0xb7a23256 in KABC::AddressBook::save () from /usr/lib/libkabc.so.1
#7  0xb7b95770 in KContactDataSource::disconnect (this=0x8086498, ctx=0xb374b6d0) at src/kaddrbook.cpp:87
#8  0xb7b90869 in KdePluginImplementation::disconnect (this=0x806da30, ctx=0xb374b6d0) at src/kdepim_impl.cpp:163
#9  0xb7f9aa16 in kde_disconnect (ctx=0xb374b6d0) at src/kdepim_sync.cpp:94
#10 0xb7efc047 in osync_member_disconnect (member=0x8071550, function=0xb7eddf30 <message_callback>, user_data=0xb375b940)
    at opensync_member.c:1168
#11 0xb7ede2b9 in client_message_handler (sender=0x0, message=0xb375b940, client=0x8071f00) at osengine_client.c:176
#12 0xb7edd917 in _queue_dispatch (source=0x806d5b0, callback=0, user_data=0x8070270) at osengine_queue.c:163
#13 0xb7f2f691 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0xb7f329d7 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#15 0xb7f32f28 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#16 0xb7f4c7e5 in g_static_private_free () from /usr/lib/libglib-2.0.so.0
#17 0xb7ba1e60 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb7e718ee in clone () from /lib/tls/i686/cmov/libc.so.6

05/30/06 19:55:46 changed by pmarat

see http://www.opensync.org/ticket/145

my solution was:

--- tmp/kdepim_impl.cpp 2006-05-29 12:53:38.000000000 +0200
+++ libopensync-plugin-kdepim-0.18/src/kdepim_impl.cpp  2006-05-29 12:49:02.000000000 +0200
@@ -77,7 +77,8 @@
       if ( kapp )
         mApplication = kapp;
       else {
-        mApplication = new KApplication( false, false );
+        //mApplication = new KApplication( false, false );
+       mApplication = new KApplication( true, true );
         mNewApplication = true;
       }

06/03/06 12:02:40 changed by Graham Cobb

I can confirm that pmarat's fix fixes the problem for me as well. Can we get this included in the SVN version of kdepim?

06/03/06 12:03:25 changed by Graham Cobb

  • owner changed from abauer to ehabkost.
  • priority changed from normal to high.
  • component changed from OpenSync to Kdepim-Plugin.

06/03/06 12:11:43 changed by pmarat

I have allready included the patch in my svn debian packages.

This patch should not interfere with kitchensync-opensync.

06/03/06 14:28:23 changed by ehabkost

  • status changed from new to closed.
  • resolution set to fixed.

Fix included on svn, commit [1035]. Thanks!