Bug 220145 - kdebluetooth crash incoming file
Summary: kdebluetooth crash incoming file
Status: RESOLVED FIXED
Alias: None
Product: kbluetooth
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 0.4
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-26 15:24 UTC by Raffaella
Modified: 2010-02-09 19:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Possible fix for the bug (436 bytes, patch)
2010-02-02 22:13 UTC, Alex Fiestas
Details
Patch that really fix stuff :p. (622 bytes, patch)
2010-02-02 23:11 UTC, Alex Fiestas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raffaella 2009-12-26 15:24:01 UTC
Application that crashed: kbluetooth
Version of the application: 0.4
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-16-generic i686
Distribution: Ubuntu 9.10

What I was doing when the application crashed:
While trying to send a file via bluetooth from my nokia N70 to my pc kdebluetooht immediately crashed.
It doesn't happen every time but lately I've been trying to solve another issue, that I couldn't at all send files from phone to pc; the only way to make it work was to kill kdebluetooth and then restart it; after restart the "obex" options appeared, while before it wasn't there.
In this particular occasion I had already done this procedure (restarting kdebluetooth) as the pc hasn't been shut down since I last did it.

 -- Backtrace:
Application: KBluetooth (kbluetooth), signal: Segmentation fault
[KCrash Handler]
#6  KJob::emitResult (this=0x60) at ../../kdecore/jobs/kjob.cpp:300
#7  0x08070b2a in ObexServerSession::disconnect (this=0x8fbffb8) at /build/buildd/kdebluetooth-0.4~rc1/src/obexserver/obexserversession.cpp:68
#8  0x08054339 in KBlueTray::slotServerSessionRemoved (this=0xbf9398e0) at /build/buildd/kdebluetooth-0.4~rc1/src/trayicon.cpp:691
#9  0x08052a81 in KBlueTray::qt_metacall (this=0xbf9398e0, _c=QMetaObject::InvokeMetaMethod, _id=48, _a=0xbf9380f8) at /build/buildd/kdebluetooth-0.4~rc1/obj-i486-linux-gnu/src/moc_trayicon.cpp:162
#10 0x030f7263 in QMetaObject::activate (sender=0x8defe78, from_signal_index=10, to_signal_index=10, argv=0xbf9380f8) at kernel/qobject.cpp:3113
#11 0x030f7ec2 in QMetaObject::activate (sender=0x8defe78, m=0x807c41c, local_signal_index=6, argv=0xbf9380f8) at kernel/qobject.cpp:3187
#12 0x08052035 in ObexServer::sessionRemoved (this=0x8defe78, _t1=...) at /build/buildd/kdebluetooth-0.4~rc1/obj-i486-linux-gnu/src/moc_obexserver.cpp:157
#13 0x0806b31e in ObexServer::slotSessionRemoved (this=0x8defe78, path=...) at /build/buildd/kdebluetooth-0.4~rc1/src/obexserver/obexserver.cpp:180
#14 0x08053078 in ObexServer::qt_metacall (this=0x8defe78, _c=QMetaObject::InvokeMetaMethod, _id=19, _a=0xbf9382dc) at /build/buildd/kdebluetooth-0.4~rc1/obj-i486-linux-gnu/src/moc_obexserver.cpp:107
#15 0x004157b4 in QDBusConnectionPrivate::deliverCall (this=0x8dd17f8, object=0x8defe78, msg=..., metaTypes=..., slotIdx=19) at qdbusintegrator.cpp:891
#16 0x0041d197 in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /usr/lib/libQtDBus.so.4
#17 0x030f15fe in QObject::event (this=0x8defe78, e=0x8f4f418) at kernel/qobject.cpp:1111
#18 0x0705ef54 in QApplicationPrivate::notify_helper (this=0x8c75d88, receiver=0x8defe78, e=0x8f4f418) at kernel/qapplication.cpp:4056
#19 0x0706667c in QApplication::notify (this=0xbf9399a8, receiver=0x8defe78, e=0x8f4f418) at kernel/qapplication.cpp:3603
#20 0x00d9fbfa in KApplication::notify (this=0xbf9399a8, receiver=0x8defe78, event=0x8f4f418) at ../../kdeui/kernel/kapplication.cpp:302
#21 0x030e16cb in QCoreApplication::notifyInternal (this=0xbf9399a8, receiver=0x8defe78, event=0x8f4f418) at kernel/qcoreapplication.cpp:610
#22 0x030e22b2 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x8c50e48) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#23 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8c50e48) at kernel/qcoreapplication.cpp:1247
#24 0x030e247d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1140
#25 0x0310c3ff in QCoreApplication::sendPostedEvents (s=0x8c778d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#26 postEventSourceDispatch (s=0x8c778d0) at kernel/qeventdispatcher_glib.cpp:210
#27 0x01323e88 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#28 0x01327730 in ?? () from /lib/libglib-2.0.so.0
#29 0x01327863 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#30 0x0310c02c in QEventDispatcherGlib::processEvents (this=0x8c50a30, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#31 0x070ffbe5 in QGuiEventDispatcherGlib::processEvents (this=0x8c50a30, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#32 0x030dfc79 in QEventLoop::processEvents (this=0xbf938a40, flags=) at kernel/qeventloop.cpp:149
#33 0x030e00ca in QEventLoop::exec (this=0xbf938a40, flags=...) at kernel/qeventloop.cpp:201
#34 0x0754bd53 in QDialog::exec (this=0x8fbcaf8) at dialogs/qdialog.cpp:498
#35 0x00d1a4e4 in KMessageBox::createKMessageBox (dialog=0x8fbcaf8, icon=..., text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=..., notifyType=QMessageBox::Critical)
    at ../../kdeui/dialogs/kmessagebox.cpp:331
#36 0x00d1b8cd in KMessageBox::createKMessageBox (dialog=0x8fbcaf8, icon=QMessageBox::Critical, text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=...)
    at ../../kdeui/dialogs/kmessagebox.cpp:151
#37 0x00d1c6d1 in KMessageBox::errorListWId (parent_id=0, text=..., strlist=..., caption=..., options=) at ../../kdeui/dialogs/kmessagebox.cpp:849
#38 0x00d1c8ef in KMessageBox::error (parent=0x0, text=..., caption=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:813
#39 0x080570f3 in KBlueTray::slotServerErrorOccured (this=0xbf9398e0, error_name=..., error_message=...) at /build/buildd/kdebluetooth-0.4~rc1/src/trayicon.cpp:641
#40 0x08052a14 in KBlueTray::qt_metacall (this=0xbf9398e0, _c=QMetaObject::InvokeMetaMethod, _id=43, _a=0xbf938f44) at /build/buildd/kdebluetooth-0.4~rc1/obj-i486-linux-gnu/src/moc_trayicon.cpp:157
#41 0x030f7263 in QMetaObject::activate (sender=0x8fbffb8, from_signal_index=7, to_signal_index=7, argv=0xbf938f44) at kernel/qobject.cpp:3113
#42 0x030f7ec2 in QMetaObject::activate (sender=0x8fbffb8, m=0x807c3ec, local_signal_index=3, argv=0xbf938f44) at kernel/qobject.cpp:3187
#43 0x080521bb in ObexServerSession::errorOccurred (this=0x8fbffb8, _t1=..., _t2=...) at /build/buildd/kdebluetooth-0.4~rc1/obj-i486-linux-gnu/src/moc_obexserversession.cpp:120
#44 0x08053601 in ObexServerSession::qt_metacall (this=0x8fbffb8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0xbf9390dc)
    at /build/buildd/kdebluetooth-0.4~rc1/obj-i486-linux-gnu/src/moc_obexserversession.cpp:89
#45 0x004157b4 in QDBusConnectionPrivate::deliverCall (this=0x8dd17f8, object=0x8fbffb8, msg=..., metaTypes=..., slotIdx=11) at qdbusintegrator.cpp:891
#46 0x0041d197 in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /usr/lib/libQtDBus.so.4
#47 0x030f15fe in QObject::event (this=0x8fbffb8, e=0x8fa40b8) at kernel/qobject.cpp:1111
#48 0x0705ef54 in QApplicationPrivate::notify_helper (this=0x8c75d88, receiver=0x8fbffb8, e=0x8fa40b8) at kernel/qapplication.cpp:4056
#49 0x0706667c in QApplication::notify (this=0xbf9399a8, receiver=0x8fbffb8, e=0x8fa40b8) at kernel/qapplication.cpp:3603
#50 0x00d9fbfa in KApplication::notify (this=0xbf9399a8, receiver=0x8fbffb8, event=0x8fa40b8) at ../../kdeui/kernel/kapplication.cpp:302
#51 0x030e16cb in QCoreApplication::notifyInternal (this=0xbf9399a8, receiver=0x8fbffb8, event=0x8fa40b8) at kernel/qcoreapplication.cpp:610
#52 0x030e22b2 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x8c50e48) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#53 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8c50e48) at kernel/qcoreapplication.cpp:1247
#54 0x030e247d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1140
#55 0x0310c3ff in QCoreApplication::sendPostedEvents (s=0x8c778d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#56 postEventSourceDispatch (s=0x8c778d0) at kernel/qeventdispatcher_glib.cpp:210
#57 0x01323e88 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#58 0x01327730 in ?? () from /lib/libglib-2.0.so.0
#59 0x01327863 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#60 0x0310c02c in QEventDispatcherGlib::processEvents (this=0x8c50a30, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#61 0x070ffbe5 in QGuiEventDispatcherGlib::processEvents (this=0x8c50a30, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#62 0x030dfc79 in QEventLoop::processEvents (this=0xbf939844, flags=) at kernel/qeventloop.cpp:149
#63 0x030e00ca in QEventLoop::exec (this=0xbf939844, flags=...) at kernel/qeventloop.cpp:201
#64 0x030e253f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#65 0x0705edd7 in QApplication::exec () at kernel/qapplication.cpp:3525
#66 0x08054198 in main (argc=1, argv=0xbf939ae4) at /build/buildd/kdebluetooth-0.4~rc1/src/main.cpp:71

This bug may be a duplicate of or related to bug 220103

Reported using DrKonqi
Comment 1 Alex Fiestas 2009-12-26 18:40:24 UTC
Hi
Can you test this bug with rc2 or svn version? I'm quite sure that I fixed it some time ago.

Thanks!
Comment 2 Raffaella 2009-12-26 21:02:03 UTC
Hi, can you explain me in a plain way what can I do to help you? I'm not so good ;) I mean wit rc2 or svn... Thanks
Comment 3 Alex Fiestas 2010-01-31 22:30:53 UTC
Sorry for the delay in the answer

This bug has been fixed, the next version will include the fix.

Thanks!
Comment 4 Will Stephenson 2010-02-02 11:10:49 UTC
I still experience this bug with 0.4 final.  Backtrace is identical, using openSUSE.  I can test fixes if needed.
Comment 5 Alex Fiestas 2010-02-02 12:56:05 UTC
Yep, I've fixed this bug I think, but I can't send a patch right now because I'm in a conference, I'll do it asap.

sorry for the regression, and thanks for reporting!
Comment 6 Alex Fiestas 2010-02-02 22:13:43 UTC
Created attachment 40477 [details]
Possible fix for the bug
Comment 7 Alex Fiestas 2010-02-02 22:16:47 UTC
Test 2 things:
-Send a long file
-Send a small file
-Send and cancel the process in PC
-Send an cancel the process in Cell phone

Thanks!

Tomorrow I'll receive 2 more devices so I can do better tests.
Comment 8 Alex Fiestas 2010-02-02 22:21:55 UTC
Ok, do not test the patch, fix this bug but adds a new one. I'll attach a new patch asap.
Comment 9 Alex Fiestas 2010-02-02 23:11:16 UTC
Created attachment 40480 [details]
Patch that really fix stuff :p.

This patch should fix both bugs, I re-test it using 2 different environments and everything seems to be OK.

Sorry for the inconveniences again :/
Comment 10 Alex Fiestas 2010-02-02 23:12:34 UTC
Forgot to say please, do the test I said in comment #7
Comment 11 Will Stephenson 2010-02-03 09:34:50 UTC
No crashes but I found some more problems.  The patched version is packaged for openSUSE in KDE:KDE4:Factory:Desktop.
 
Large file send: OK, but see below
Small file send: OK, see below
Large file, cancel on computer: OK, but see below
Large file, cancel on device, OK, but see below

Large, small file send:
After successfully sending on file, subsequent sends fail after selecting a device and clicking send.  It works after restarting KBluetooth:
Remote Device found  "9C:18:74:50:57:EB" Name:  QVariant(QString, "Will Stephenson") 
kbluetooth(3735) KBlueTray::slotSendFile: ("/home/wstephenson/Documents/music/Lo-bat -Chip_munk- (Qwertypak remix)mp.mp3")
kbluetooth(3735) ObexSession::ObexSession: Konstruktor:  "/org/openobex"
kbluetooth(3735) KBlueTray::slotSendFile: ()
kbluetooth(3735) ObexSession::sessionCreated: session interface created for:  "/org/openobex/session3"
kbluetooth(3735) ObexSession::slotConnectError: Session Connect Error  "org.openobex.Error.ConnectionAttemptFailed"   "Connecting to remote device failed"
Agent deleted 
kbluetooth(3735) ObexServer::stop: obex server stopped
kbluetooth(3735) ObexServer::close: obex server closed
kbluetooth(3735) ObexServer::~ObexServer: Destructing obexServer :/
bye bye 

Large file, cancel on computer:
Ok but after cancelling via the KJob progress dialog 1) the KNotify popup contains 'Open Destination' button which is wrong for send.  2) the Send action is not reenabled - restart required


arge file, cancel on device:
On my phone I cannot cancel individual transfers so I disabled Bluetooth globally.  KBluetooth did not notice that the remote device had disappeared and cancel the job, it although it did notice that a device was removed:

 findRegisteredBluetoothInterface  "/org/bluez/3570/hci0"
ObjectReply calling:  "FindDevice"   "9C:18:74:50:57:EB" 
ObjectReply Valid?  "/org/bluez/3570/hci0/dev_9C_18_74_50_57_EB" 
Object::connect: No such signal Solid::Control::BluetoothRemoteDevice::nodeCreated(const QString &) in /space/kde/sources/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothremotedevice.cpp:375
Object::connect: No such signal Solid::Control::BluetoothRemoteDevice::nodeRemoved(const QString &) in /space/kde/sources/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothremotedevice.cpp:377
Object::connect: No such signal Solid::Control::BluetoothRemoteDevice::nodeCreated(const QString &) in /space/kde/sources/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothremotedevice.cpp:375
Object::connect: No such signal Solid::Control::BluetoothRemoteDevice::nodeRemoved(const QString &) in /space/kde/sources/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothremotedevice.cpp:377
kbluetooth(4001) ObexSessionFileTransfer::slotTransferStarted: Transfer started ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) ObexSessionFileTransfer::slotTransferProgress: Transfer progress ...
kbluetooth(4001) BluezBluetoothInterface::slotDeviceRemoved: device removed
Comment 12 Alex Fiestas 2010-02-03 09:57:24 UTC
Thanks for the feedback, I'll try to address everything once I got my test devices (in a few hours).

Thanks for the feedback.
Comment 13 Alex Fiestas 2010-02-09 19:42:51 UTC
SVN commit 1087893 by afiestas:

KBluetooth is a mess, so we can not use KJob autodelete magic.

BUG: 225924
BUG: 223589
BUG: 220145

 M  +1 -0      obexserversession.cpp  
 M  +1 -0      obexserversessionfiletransfer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1087893