Bug 160221 - Solid Crash (assertion dev->backendObject()==0 failed)
Summary: Solid Crash (assertion dev->backendObject()==0 failed)
Status: RESOLVED WORKSFORME
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: libsolid-frontend (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
: 168576 169873 170873 171499 171666 172290 173864 174037 174077 174380 175709 176528 177252 177265 178063 178072 178161 178363 178408 178597 178610 178734 178845 178981 179652 179927 180013 180125 180202 180493 180820 181071 181346 181543 182166 182680 187113 189438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-01 17:39 UTC by Oliver Putz
Modified: 2013-01-11 22:43 UTC (History)
44 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
minimal testcase to fail the assertion (831 bytes, application/x-gzip)
2008-10-16 22:06 UTC, Matthias Kretz
Details
Testcase for fake HW (2.79 KB, patch)
2008-11-03 12:19 UTC, Matthias Kretz
Details
patch to skip the assertion (584 bytes, patch)
2008-12-31 15:28 UTC, Matthias Kretz
Details
real patch to skip the assertion (645 bytes, patch)
2008-12-31 15:32 UTC, Matthias Kretz
Details
device removed assertion patch (514 bytes, patch)
2011-08-05 08:43 UTC, Bartłomiej Zimoń
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Putz 2008-04-01 17:39:49 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc version 4.1.2 20070214 
OS:                Linux

I am not 100% sure what exactly I did, but today after working with a USB stick (mounting and unmounting it) plasma crashed with the following backtrace that seems to indicate some problem with Solid (kdelibs r792052):

Application: Plasma Workspace (plasma), signal SIGABRT
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb6014af0 (LWP 6165)]
[New Thread 0xb49b4b90 (LWP 6166)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb62e71f1 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb62e89b8 in *__GI_abort () at abort.c:88
#9  0xb6f76a45 in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbf992b0c "ASSERT: \"dev->backendObject()==0\" in file /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/solid/solid/devicemanager.cpp, line 164") at global/qglobal.cpp:2047
#10 0xb6f76b0a in qFatal (msg=0xb70cefec "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2249
#11 0xb6f76fd5 in qt_assert (assertion=0xb71b7b31 "dev->backendObject()==0", 
    file=0xb71b7c18 "/var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/solid/solid/devicemanager.cpp", line=164) at global/qglobal.cpp:1821
#12 0xb717d812 in Solid::DeviceManagerPrivate::_k_deviceAdded (
    this=0x81d9bd0, udi=@0x83c3790)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/solid/solid/devicemanager.cpp:164
#13 0xb717d96b in Solid::DeviceManagerPrivate::qt_metacall (this=0x81d9bd0, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbf994c3c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/solid/solid/devicemanager_p.moc:72
#14 0xb708c2c8 in QMetaObject::activate (sender=0x81d9d90, 
    from_signal_index=<value optimized out>, to_signal_index=4, 
    argv=<value optimized out>) at kernel/qobject.cpp:2995
#15 0xb708ca44 in QMetaObject::activate (sender=0x81d9d90, m=0xb71c28f8, 
    local_signal_index=0, argv=0xbf994c3c) at kernel/qobject.cpp:3065
#16 0xb71910b1 in Solid::Ifaces::DeviceManager::deviceAdded (this=0x81d9d90, 
    _t1=@0x83c3790)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/solid/solid/ifaces/devicemanager.moc:79
#17 0xb719f7be in Solid::Backends::Hal::HalManager::slotDeviceAdded (
    this=0x81d9d90, udi=@0x83c3790)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/solid/solid/backends/hal/halmanager.cpp:214
#18 0xb719f836 in Solid::Backends::Hal::HalManager::qt_metacall (
    this=0x81d9d90, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf994d38)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/solid/solid/backends/hal/halmanager.moc:70
#19 0xb6ecd838 in QDBusConnectionPrivate::deliverCall (this=0x81d9e70, 
    object=0x81d9d90, msg=@0x8739a44, metaTypes=@0x8739a48, slotIdx=6)
    at qdbusintegrator.cpp:865
#20 0xb6ed74c7 in QDBusCallDeliveryEvent::placeMetaCall (this=0x8739a18, 
    object=0x81d9d90) at qdbusintegrator_p.h:136
#21 0xb7087ede in QObject::event (this=0x81d9d90, e=0x8739a18)
    at kernel/qobject.cpp:1131
#22 0xb663771f in QApplicationPrivate::notify_helper (this=0x8074f38, 
    receiver=0x81d9d90, e=0x8739a18) at kernel/qapplication.cpp:3735
#23 0xb66392fa in QApplication::notify (this=0x8073c58, receiver=0x81d9d90, 
    e=0x8739a18) at kernel/qapplication.cpp:3329
#24 0xb76bbac3 in KApplication::notify (this=0x8073c58, receiver=0x81d9d90, 
    event=0x8739a18)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdeui/kernel/kapplication.cpp:311
#25 0xb7075cf7 in QCoreApplication::notifyInternal (this=0x8073c58, 
    receiver=0x81d9d90, event=0x8739a18) at kernel/qcoreapplication.cpp:586
#26 0xb7077059 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, 
    event_type=0, data=0x804cb68)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#27 0xb70773bd in QCoreApplication::sendPostedEvents (receiver=0x0, 
    event_type=0) at kernel/qcoreapplication.cpp:1084
#28 0xb66cfb1e in QEventDispatcherX11::processEvents (this=0x806fc90, 
    flags=@0xbf995434)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#29 0xb7074e61 in QEventLoop::processEvents (this=0xbf9954a0, 
    flags=@0xbf995468) at kernel/qeventloop.cpp:146
#30 0xb7074f8f in QEventLoop::exec (this=0xbf9954a0, flags=@0xbf9954a8)
    at kernel/qeventloop.cpp:197
#31 0xb7077476 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:838
#32 0xb6636e37 in QApplication::exec () at kernel/qapplication.cpp:3267
#33 0xb7f4bdd4 in kdemain (argc=1, argv=0xbf9956a4)
    at /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/workspace/plasma/plasma/main.cpp:54
#34 0x080487e2 in main (argc=)
    at /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase_build/workspace/plasma/plasma/plasma-qgv_dummy.cpp:3
#35 0xb62d3fdc in __libc_start_main (main=0x80487c0 <main>, argc=1, 
    ubp_av=0xbf9956a4, init=0x8048810 <__libc_csu_init>, 
    fini=0x8048800 <__libc_csu_fini>, rtld_fini=0xb7f67100 <_dl_fini>, 
    stack_end=0xbf99569c) at libc-start.c:229
#36 0x08048731 in _start ()
#0  0xffffe410 in __kernel_vsyscall ()
Comment 1 Oliver Putz 2008-04-03 17:36:44 UTC
I just experienced this crash again. Plasma crashed as soon as I plugged in a USB memory stick into the second USB slot. The first slot held a USB pointing presenter at that time. 
As soon as I started krunner in order to bring up a consle in order to mount the device, plasma crashed. Note: I do not have the plasma new device notifier running (if that makes any difference)
Comment 2 Kevin Ottens 2008-04-10 06:48:43 UTC
Sorry I cannot reproduce this crash, could you make sure you KDE install is up to date and provide a step by step way to reproduce this issue?

I definitely don't experience that here.
Comment 3 Christophe Marin 2008-08-07 08:36:00 UTC
*** Bug 168576 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Kretz 2008-09-02 18:05:50 UTC
I can reliably reproduce the failed assertion with my new device listing code now (not committed yet). My guess is that in order to reproduce it you need to plug in a device that will add more than one Solid::Device object to the tree, i.e. you get multiple calls to deviceAdded, and then in the slot iterate over all devices, i.e. access the devices that will be announced with another deviceAdded later on.

Application: KDE Daemon (kded4), signal SIGABRT
0x00007fd91836cb50 in __nanosleep_nocancel () from /lib/libc.so.6

Thread 1 (Thread 0x7fd91d10d780 (LWP 14939)):
[KCrash Handler]
#5  0x00007fd918301095 in raise () from /lib/libc.so.6
#6  0x00007fd918302af0 in abort () from /lib/libc.so.6
#7  0x00007fd91b6cce1d in qt_message_output (msgType=QtFatalMsg, buf=0x7fff2513fa50 "ASSERT: \"dev->backendObject()==0\" in file /home/mkretz/KDE/src/kdelibs/solid/solid/devicemanager.cpp, line 164")
    at /home/mkretz/KDE/src/qt-copy/src/corelib/global/qglobal.cpp:2061
#8  0x00007fd91b6ccf3f in qFatal (msg=0x7fd91b849340 "ASSERT: \"%s\" in file %s, line %d") at /home/mkretz/KDE/src/qt-copy/src/corelib/global/qglobal.cpp:2263
#9  0x00007fd91b6cd3ad in qt_assert (assertion=0x7fd9179df25f "dev->backendObject()==0", file=0x7fd9179df2b0 "/home/mkretz/KDE/src/kdelibs/solid/solid/devicemanager.cpp", line=164)
    at /home/mkretz/KDE/src/qt-copy/src/corelib/global/qglobal.cpp:1831
#10 0x00007fd9179a60f3 in Solid::DeviceManagerPrivate::_k_deviceAdded (this=0x8f0e20, udi=@0x962d50) at /home/mkretz/KDE/src/kdelibs/solid/solid/devicemanager.cpp:164
#11 0x00007fd9179a61e3 in Solid::DeviceManagerPrivate::qt_metacall (this=0x8f0e20, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff25141d60)
    at /home/mkretz/KDE/obj/kdelibs/solid/solid/devicemanager_p.moc:72
#12 0x00007fd91b7fe04b in QMetaObject::activate (sender=0x8f0e70, from_signal_index=4, to_signal_index=4, argv=0x7fff25141d60) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qobject.cpp:3016
#13 0x00007fd91b7fe5d1 in QMetaObject::activate (sender=0x8f0e70, m=0x7fd917bfa040, local_signal_index=0, argv=0x7fff25141d60) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qobject.cpp:3086
#14 0x00007fd9179b3d44 in Solid::Ifaces::DeviceManager::deviceAdded (this=0x3a5b, _t1=<value optimized out>) at /home/mkretz/KDE/obj/kdelibs/solid/solid/ifaces/devicemanager.moc:79
#15 0x00007fd9179d3647 in Solid::Backends::Hal::HalManager::qt_metacall (this=0x8f0e70, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff25141f90)
    at /home/mkretz/KDE/obj/kdelibs/solid/solid/backends/hal/halmanager.moc:70
#16 0x00007fd91bb431bb in QDBusConnectionPrivate::deliverCall (this=0x7ca130, object=0x8f0e70, msg=@0xa14468, metaTypes=@0xa14470, slotIdx=6)
    at /home/mkretz/KDE/src/qt-copy/src/dbus/qdbusintegrator.cpp:865
#17 0x00007fd91bb4f20f in QDBusCallDeliveryEvent::placeMetaCall (this=0xa14420, object=0x8f0e70) at /home/mkretz/KDE/src/qt-copy/src/dbus/qdbusintegrator_p.h:136
#18 0x00007fd91b7fbcce in QObject::event (this=0x8f0e70, e=0xa14420) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qobject.cpp:1140
#19 0x00007fd918f7495b in QApplicationPrivate::notify_helper (this=0x632010, receiver=0x8f0e70, e=0xa14420) at /home/mkretz/KDE/src/qt-copy/src/gui/kernel/qapplication.cpp:3805
#20 0x00007fd918f74c65 in QApplication::notify (this=0x7fff25142cb0, receiver=0x8f0e70, e=0xa14420) at /home/mkretz/KDE/src/qt-copy/src/gui/kernel/qapplication.cpp:3397
#21 0x00007fd91c4527b6 in KApplication::notify (this=0x7fff25142cb0, receiver=0x8f0e70, event=0xa14420) at /home/mkretz/KDE/src/kdelibs/kdeui/kernel/kapplication.cpp:311
#22 0x00007fd91b7e5e51 in QCoreApplication::notifyInternal (this=0x7fff25142cb0, receiver=0x8f0e70, event=0xa14420) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.cpp:591
#23 0x00007fd91b7ea4e9 in QCoreApplication::sendEvent (receiver=0x8f0e70, event=0xa14420) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.h:215
#24 0x00007fd91b7e645d in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x603360) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1202
#25 0x00007fd91b7e6728 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1095
#26 0x00007fd91b81ca41 in QCoreApplication::sendPostedEvents () at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.h:220
#27 0x00007fd91b81bc5b in postEventSourceDispatch (s=0x634220) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:211
#28 0x00007fd9160913d4 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007fd9160946e5 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007fd916094bcb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007fd91b81ade4 in QEventDispatcherGlib::processEvents (this=0x631f80, flags=@0x7fff25142ab0) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:325
#32 0x00007fd91902cdf3 in QGuiEventDispatcherGlib::processEvents (this=0x631f80, flags=@0x7fff25142b10) at /home/mkretz/KDE/src/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007fd91b7e28a4 in QEventLoop::processEvents (this=0x7fff25142bd0, flags=@0x7fff25142b90) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#34 0x00007fd91b7e2aa0 in QEventLoop::exec (this=0x7fff25142bd0, flags=@0x7fff25142bf0) at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qeventloop.cpp:200
#35 0x00007fd91b7e6833 in QCoreApplication::exec () at /home/mkretz/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.cpp:849
#36 0x00007fd918f746c0 in QApplication::exec () at /home/mkretz/KDE/src/qt-copy/src/gui/kernel/qapplication.cpp:3335
#37 0x00007fd91cd1daae in kdemain (argc=1, argv=0x7fff251431c8) at /home/mkretz/KDE/src/kdelibs/kded/kded.cpp:896
#38 0x00007fd9182ed1c4 in __libc_start_main () from /lib/libc.so.6
#39 0x0000000000400779 in _start ()

Comment 5 Jeff Mitchell 2008-09-07 21:13:13 UTC
*** Bug 169873 has been marked as a duplicate of this bug. ***
Comment 6 Jeff Mitchell 2008-09-07 21:14:47 UTC
Kevin, see the bug I just marked as a duplicate for two other backtraces from different programs, both using Solid and both with the same assert.

I believe I can get yet another soon, as I can repeatably crash Plasma by either pulling the battery out of my laptop or plugging a new one in (while on mains of course).
Comment 7 Alan Jenkins 2008-10-07 17:08:39 UTC
*** Bug 172290 has been marked as a duplicate of this bug. ***
Comment 8 Matthias Kretz 2008-10-16 22:06:52 UTC
Created attachment 27956 [details]
minimal testcase to fail the assertion

set QTDIR and KDEDIR and run make, then execute ./test and plug in a USB audio device => assertion fails. If you don't have a USB audio device you can probably adjust the testcase to another kind of device.
Comment 9 Oliver Putz 2008-11-02 16:45:11 UTC
*** Bug 173864 has been marked as a duplicate of this bug. ***
Comment 10 Oliver Putz 2008-11-02 16:47:53 UTC
*** Bug 171666 has been marked as a duplicate of this bug. ***
Comment 11 Oliver Putz 2008-11-02 16:51:36 UTC
*** Bug 171499 has been marked as a duplicate of this bug. ***
Comment 12 Matthias Kretz 2008-11-03 12:19:54 UTC
Created attachment 28296 [details]
Testcase for fake HW

This is the same testcase using the fake HW. It doesn't fail the assertion there.
Comment 13 Kevin Ottens 2008-11-13 22:27:01 UTC
Sorry, but I still can't reproduce this one with either test case...
This one is really a mistery to me, we have quite a few dup. reports, etc. but I never encountered it myself and I can't reproduce it.
Comment 14 Christophe Marin 2008-11-21 10:36:34 UTC
*** Bug 175709 has been marked as a duplicate of this bug. ***
Comment 15 Dario Andres 2008-12-05 12:41:51 UTC
*** Bug 170873 has been marked as a duplicate of this bug. ***
Comment 16 George Kiagiadakis 2008-12-18 14:43:40 UTC
*** Bug 178063 has been marked as a duplicate of this bug. ***
Comment 17 George Kiagiadakis 2008-12-18 14:44:59 UTC
*** Bug 174380 has been marked as a duplicate of this bug. ***
Comment 18 George Kiagiadakis 2008-12-18 14:51:47 UTC
*** Bug 174037 has been marked as a duplicate of this bug. ***
Comment 19 George Kiagiadakis 2008-12-18 15:14:05 UTC
This crash seems to be TOO popular.... I just marked 3 reports as duplicates, and the two of them have too many duplicates by themselves....

Most of the crashes are reported against kmix and the steps to reproduce include:
- Pluging/Unpluging usb sticks.
- Installing/removing GPU drivers.
- Fidgeting with udev configuration (bug 178063).
- Updating system with apt-get/aptitude (which probably includes updating hal/udev and restarting one or both of them).

I can confirm this crash myself (I crashed kmix and plasma once or twice while I was updating my system with aptitude) and I think that the kmix crash is probably related to the fact that alsa reports two sound cards for my computer (HDA ATI SB and HDA ATI HDMI), so it probably confirms what Matthias said in comment 4 (but I am only guessing, I have no idea how this code works).
Comment 20 Kevin Ottens 2008-12-18 15:35:16 UTC
I know, but still see my comment #13. I've never been able to reproduce it. I've two different computers, several usb devices to plug/unplug. Tried by hand, tried with the testcases kindly provided by Matthias, and it just never crashes for me (be it trunk or the version packaged by my distro).

I'm of course concerned by all the dups etc. But, I'm really in "waiting for a testcase which crashes for me or a patch" mode on this one. I can't do much more unfortunately.
Comment 21 George Kiagiadakis 2008-12-18 16:10:36 UTC
*** Bug 177252 has been marked as a duplicate of this bug. ***
Comment 22 George Kiagiadakis 2008-12-18 17:46:48 UTC
*** Bug 178072 has been marked as a duplicate of this bug. ***
Comment 23 George Kiagiadakis 2008-12-19 12:15:13 UTC
*** Bug 178161 has been marked as a duplicate of this bug. ***
Comment 24 George Kiagiadakis 2008-12-19 12:19:24 UTC
*** Bug 177265 has been marked as a duplicate of this bug. ***
Comment 25 George Kiagiadakis 2008-12-19 12:23:25 UTC
*** Bug 174077 has been marked as a duplicate of this bug. ***
Comment 26 Christophe Marin 2008-12-22 06:12:17 UTC
*** Bug 178408 has been marked as a duplicate of this bug. ***
Comment 27 Alexey Chernov 2008-12-23 21:32:14 UTC
I experience the bug in Amarok (http://bugs.kde.org/show_bug.cgi?id=178597) and there's a crash report which obviously seems to be familiar with this case. I was suggested to print here my case. The full report is in the link above.
Comment 28 Dario Andres 2008-12-24 01:00:40 UTC
*** Bug 178610 has been marked as a duplicate of this bug. ***
Comment 29 Christophe Marin 2008-12-24 03:36:00 UTC
*** Bug 178363 has been marked as a duplicate of this bug. ***
Comment 30 Christophe Marin 2008-12-24 03:37:33 UTC
*** Bug 178597 has been marked as a duplicate of this bug. ***
Comment 31 Malte S. Stretz 2008-12-24 13:54:43 UTC
I can reproduce this bug quite well, it tends to kill kmix or even kded.  Seems that plugging in the USB audio device in my monitor and/or switching between systems with the builtin KVM-device is a reliable way to cause this crash.

@Kevin:  I have no idea how to debug this but I can help if you tell me how.
Comment 32 Dario Andres 2008-12-25 15:17:51 UTC
*** Bug 178734 has been marked as a duplicate of this bug. ***
Comment 33 Dario Andres 2008-12-28 20:53:43 UTC
*** Bug 178981 has been marked as a duplicate of this bug. ***
Comment 34 Matthias Kretz 2008-12-31 15:28:15 UTC
Created attachment 29784 [details]
patch to skip the assertion

As far as I know the inner workings of Solid this patch should "fix" the issue while not introducing any leaks or inconsistencies.
Comment 35 Matthias Kretz 2008-12-31 15:32:44 UTC
Created attachment 29785 [details]
real patch to skip the assertion

Ups, sorry. The patch before was my latest code to reproduce the failed assertion. This time the real one.
Comment 36 Dario Andres 2009-01-04 22:47:40 UTC
*** Bug 179652 has been marked as a duplicate of this bug. ***
Comment 37 Dario Andres 2009-01-07 18:07:19 UTC
*** Bug 179927 has been marked as a duplicate of this bug. ***
Comment 38 Alex Merry 2009-01-07 19:44:38 UTC
The patch fixes it for me, and the device appears in the Multimedia KCM as expected, and disappears when I take it out again.
Comment 39 Dario Andres 2009-01-08 12:26:24 UTC
*** Bug 180013 has been marked as a duplicate of this bug. ***
Comment 40 Dario Andres 2009-01-09 13:53:31 UTC
*** Bug 180125 has been marked as a duplicate of this bug. ***
Comment 41 Dario Andres 2009-01-09 13:55:34 UTC
As stated in bug 180125 , this still happens on KDE4.1.96, is the patch gonna be aplied ? Thanks :)
Comment 42 Christian Esken 2009-01-09 21:00:50 UTC
Hi, KMix developer speaking now. :-)

While I wasn't able to reproduce the issue, I have found now awonderful way, which works 100% on my box.
1) Stop Kmix
2) Unload sound drivers (e.g. on OpenSUSE via "service alsasound stop").
3) Start KMix. => Crash in libsolid at solid/devicemanager.cpp,
line 164

I will try the patch now.
Comment 43 Christian Esken 2009-01-09 21:02:59 UTC
Forgot the last point, so I'll correct it:

1) Stop Kmix
2) Unload sound drivers (e.g. on OpenSUSE via "service alsasound stop").
3) Start KMix
4) Load sound drivers (e.g. on OpenSUSE via "service alsasound start")

Crash happens of course after loading the sound drivers, not after starting KMix.
Comment 44 Christian Esken 2009-01-09 21:18:50 UTC
Looks like user "divide" has commited the patch yesterday (slightly modified): http://websvn.kde.org/trunk/KDE/kdelibs/solid/solid/devicemanager.cpp?r1=907515&r2=907514&pathrev=907515

I can confirm that this fixes the issue for me. :-)

Please be aware that this has only be commited to trunk, as far as I see. It should be backported to 4.2 branch, but as far as I am concerned I don't consider this to be release critical, and thus should wait for after 4.2 release (target: 4.2.1). But the Solid maintainer (Kevin) should have the last word here.
Comment 45 Jeff Mitchell 2009-01-09 21:30:03 UTC
My $0.02:

This isn't release critical for people that don't continually suffer from this problem.

For those that do, the patch can't come soon enough, and they may be rather disappointed if they upgrade to 4.2 and still see it as a problem.  Disappointment leads to unhappiness.  Unhappiness leads to ranting and raving.

I'd recommend sticking it in 4.2 unless Kevin thinks that this might have adverse effects.
Comment 46 Dario Andres 2009-01-10 03:40:21 UTC
*** Bug 180202 has been marked as a duplicate of this bug. ***
Comment 47 Dario Andres 2009-01-12 21:13:41 UTC
*** Bug 180493 has been marked as a duplicate of this bug. ***
Comment 48 Kevin Ottens 2009-01-16 11:43:44 UTC
*** Bug 180820 has been marked as a duplicate of this bug. ***
Comment 49 George Kiagiadakis 2009-01-17 16:23:08 UTC
*** Bug 181071 has been marked as a duplicate of this bug. ***
Comment 50 Dario Andres 2009-01-19 22:47:28 UTC
*** Bug 181346 has been marked as a duplicate of this bug. ***
Comment 51 Mathieu Jobin 2009-01-21 18:59:27 UTC
if the patch fixes the problem, it should be in 4.2.0

Comment 52 Dario Andres 2009-01-21 23:56:06 UTC
*** Bug 181543 has been marked as a duplicate of this bug. ***
Comment 53 George Kiagiadakis 2009-01-28 18:19:01 UTC
*** Bug 182166 has been marked as a duplicate of this bug. ***
Comment 54 Dario Andres 2009-02-01 20:21:44 UTC
*** Bug 182680 has been marked as a duplicate of this bug. ***
Comment 55 Jonathan Thomas 2009-02-03 19:12:19 UTC
This crash is quite bad. I had plasma, konqueror, ktorrent, krunner and dolphin all die on every upgrade that hal was restarted. (They had the same backtrace as the original post)

The good news is that the patch worked wonderfully.
Comment 56 Kevin Ottens 2009-02-22 11:55:37 UTC
SVN commit 929830 by ervin:

Commit Matthias' patch which apparently creates no regression.

CCBUG: 160221


 M  +4 -3      devicemanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=929830
Comment 57 Kevin Ottens 2009-02-22 11:57:22 UTC
SVN commit 929831 by ervin:

Backport 929830.

BUG: 160221


 M  +4 -3      devicemanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=929831
Comment 58 Dario Andres 2009-03-14 22:39:14 UTC
*** Bug 187113 has been marked as a duplicate of this bug. ***
Comment 59 Dario Andres 2009-04-12 15:52:43 UTC
*** Bug 189438 has been marked as a duplicate of this bug. ***
Comment 60 Christian Esken 2009-07-05 17:07:00 UTC
*** Bug 176528 has been marked as a duplicate of this bug. ***
Comment 61 Christian Esken 2009-07-05 17:07:28 UTC
*** Bug 178845 has been marked as a duplicate of this bug. ***
Comment 62 Bill Klobas 2009-10-26 23:54:31 UTC
Created attachment 37872


test1
Comment 63 Bill Klobas 2009-10-26 23:55:27 UTC
Created attachment 37873


test2
Comment 64 Bill Klobas 2009-10-26 23:56:59 UTC
Created attachment 37874


test3
Comment 65 Bartłomiej Zimoń 2011-08-05 08:43:47 UTC
Created attachment 62564 [details]
device removed assertion patch

Please consider this patch for this crash, i have kde 4.7.0 and after
switch on from suspend-to-ram i have 5 crashes on 5 components on 3 hosts.

Waiting for feedback
Best regards.
Comment 66 Bartłomiej Zimoń 2011-08-05 08:45:19 UTC
Please also reopen this bug.
Comment 67 Bartłomiej Zimoń 2011-08-05 11:48:30 UTC
Ok this patch resolved my problems with solid.
Comment 68 Christian Esken 2011-08-15 21:55:42 UTC
Did you apply this patch to the KDE repository? Or is this still open.
Comment 69 Bartłomiej Zimoń 2011-08-16 12:53:58 UTC
It is still open because i have no account in kde git.
Comment 70 Allen Winter 2012-03-17 13:03:37 UTC
Alex or Kevin,

Please can we commit this patch.  I'm hitting this assert now on two different Fedora 15 computers and causing plasma-desktop, knotify and krunner to die every few hours.

I've been running with this patch few a couple days now ok.

-Allen
Comment 71 Alex Fiestas 2012-03-18 00:57:20 UTC
(In reply to comment #70)
> Alex or Kevin,
> 
> Please can we commit this patch.  I'm hitting this assert now on two
> different Fedora 15 computers and causing plasma-desktop, knotify and
> krunner to die every few hours.
> 
> I've been running with this patch few a couple days now ok.
> 
> -Allen

That patches remove an ASSERT that makes sense and show us a bug in the library, removing it won't solve the real issue.

If you want to avoid the crash, compile libsolid without debug as you should do in production, assert won't quit the application then.

I will try to reproduce this bug and fix the real issue asap.
Comment 72 Alex Fiestas 2012-03-18 01:36:40 UTC
Can you give me some information of which kind of hardware are you plugging/unplugging? 
Does this happen without unplugging/plugging anything? do you suspend/hibernate?

Can you run in a terminal "solid-hardware listen" and save all the debug until it crashes as knotify/plasma-desktop does?

Thank s!
Comment 73 Bartłomiej Zimoń 2012-03-18 12:20:40 UTC
My patch is written according to assert done above this one, and that change was 
added to sources, so why You block this one also?

void Solid::DeviceManagerPrivate::_k_deviceAdded(const QString &udi)
{
    if (m_devicesMap.contains(udi)) {
        DevicePrivate *dev = m_devicesMap[udi].data();
 
        // Ok, this one was requested somewhere was invalid
        // and now becomes magically valid!
 
        if (dev && dev->backendObject() == 0) {
            dev->setBackendObject(createBackendObject(udi));
            Q_ASSERT(dev->backendObject()!=0);
        }
    }
 
    emit deviceAdded(udi);
}
 
     emit deviceAdded(udi);
Comment 74 Allen Winter 2012-03-18 13:29:37 UTC
Alex,

For me, I really think it's an automount that is going away.  I can't think of anything I purposefully am plugging/unplugging nor is this a suspend/hibernation issue.

In the meantime, I'll look for debug messages that might give you more hints.
Comment 75 Alex Fiestas 2012-03-18 16:34:37 UTC
(In reply to comment #73)
>         if (dev && dev->backendObject() == 0) {
>             dev->setBackendObject(createBackendObject(udi));
>             Q_ASSERT(dev->backendObject()!=0);
>         }
Well I'm in a hurry so maybe I'm reading this wrong but if you set the backendObject just before asserting for sure the assert won't fail but that turns the assert in invalid since it is not checking what it should check.
Comment 76 Alex Merry 2013-01-11 21:59:38 UTC
I slightly confused by this report.  git claims that the change people were requesting in March 2012 was already made in the repo in 2009.

Does this bug still exist?
Comment 77 Allen Winter 2013-01-11 22:06:18 UTC
I have no recollection of what might have fixed this bug; however, no such crash here in quite a long time.

Alex might remember.

AFIAK this one should be resolvable
Comment 78 Alex Merry 2013-01-11 22:43:01 UTC
Let's resolve it WORKSFORME, and if someone can reproduce it, they can re-open it.