Summary: | Device notifer fails an assertion and makes plasma crash | ||
---|---|---|---|
Product: | [Plasma] plasma4 | Reporter: | John Varouhakis <johnvarouhakis> |
Component: | general | Assignee: | Marco Martin <notmart> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
backtrace of the crash
Crash log A small patch for devicenotifer another micro-patch Crash output Disconnects a source before removing the row |
Description
John Varouhakis
2008-03-15 11:45:24 UTC
Created attachment 23901 [details]
backtrace of the crash
This (or something very similar) is happening to me too, unfortunately. Fedora 8 gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33) version: devel, svn revision approx 786000 All sources downloaded on 2008-03-15 from svn. KDE4 compiled from svn-trunk using qt-copy. (I just followed the tutorial) Created attachment 23912 [details]
Crash log
Crash log of my case
Created attachment 23916 [details]
A small patch for devicenotifer
Please try applying this patch to see if the problem is fixed. I believe the
problem occurs when the device is removed but is somehow updated in the
soliddevice engine.
I've applied the patch but I'm afraid that nothing has changed. Still the same crash. BTW, the problem doesn't happen when interacting with devices. Simply loading device-notifier is enough to trigger it (it never gets to the loading really, the moment I release the mouse cursor plasma freezes and eventually crashes). I've updated kdebase to rev 786180 and applied the patch. No change. For me, the plasma crashes almost immediately KDE4 starts. I get to see the taskbar without icons, then it disappears and KDE Crash handler pops up with "plasma crashed with signal 6(SIGABRT)". >> For me, the plasma crashes almost immediately KDE4 starts
That's what I got at first, too, but then I just removed it
manually from plasma-appletsrc, to get a working desktop.
can you try this second patch? Created attachment 23917 [details]
another micro-patch
in this way shouldn't arrive data from dataengine before having inserted the
item in the model
Applied the second patch, still nothing :(
>> removed it manually from plasma-appletsrc
I cannot find the plasma-appletsrc file ("find / plasma-appletsrc -depth" returns no such file or directory). Where/how can i get this file?
I'm afraid the second patch doesn't change anything either. But it certainly has to do something with the soliddevice engine, since if I remove the call to connect, the applet no longer crashes, when I load it: Index: devicenotifier.cpp =================================================================== --- devicenotifier.cpp (revision 785878) +++ devicenotifier.cpp (working copy) @@ -330,7 +330,6 @@ m_hotplugModel->insertRow(0, item); m_solidEngine->connectSource(name, this); - m_solidDeviceEngine->connectSource(name, this); //sets the "action" column QStandardItem *actionItem = new QStandardItem(); Bedrich, it's in $KDEHOME/share/config/plasma-appletsrc. does commenting out the else block around line 296 of devicenotifier.cpp resolves the problem? unfortunately i'm going a little bit blindly on this because i can't reproduce the problem i think the reference to a not existent item could happen either here or in osSourceRemoved, a variant of the first patch by Christopher could be disconnecting the source before removing the row, so something like this: Index: devicenotifier.cpp =================================================================== --- devicenotifier.cpp (revision 785878) +++ devicenotifier.cpp (working copy) @@ -343,13 +343,15 @@ void DeviceNotifier::onSourceRemoved(const QString &name) { + m_solidEngine->disconnectSource(name, this); + m_solidDeviceEngine->disconnectSource(name, this); + QModelIndex index = indexForUdi(name); Q_ASSERT(index.isValid()); m_hotplugModel->removeRow(index.row()); if (m_icon && m_hotplugModel->rowCount() == 0) { m_widget->hide(); } - } QModelIndex DeviceNotifier::indexForUdi(const QString &udi) const Created attachment 23919 [details]
Crash output
Before triggering the assert devicenotifier shows some
"ERROR: sysntax error" lines
Can that be related?
SVN commit 786261 by mart: after a device removal disconnect sources before removing items and some debug output when soliddevice engine is updated CCBUG: 159343 M +4 -1 devicenotifier.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=786261 vincenzo: the syntax error is because of the way the siliddevice engine works, i think the check if the query is a device identifier and the check if it is a predicate should be swapped, i'll try that Ok, I think I found the cause :). I have 6 partitions mounted, where the default limit is 4. So, something simple, like changing the default to a high value, in devicenotifier.cpp:83, will allow the applet to load (it does in me). I think the problem is in devicenotifier.cpp:325, where the rows are removed without disconnecting the relevant sources, so when the update happens, the name for the source isn't found, resulting in the assertion. Created attachment 23920 [details]
Disconnects a source before removing the row
John: great job! do you have an account? can you commit or otherwise i will commit it (with proper credits eh :)) John: great job! do you have an account? can you commit or otherwise i will commit it (with proper credits eh :)) No , I don't have an account, so go on and commit it . Thanks for the help and have a great what's-left-from-your-weekend :) . SVN commit 786308 by mart: disconnect sources before removing a row (when the row limit is exceeded) now it no longer causes a failed assertion. patch by John Varouhakis BUG: 159343 M +6 -0 devicenotifier.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=786308 |