On ejecting a DVD I got Error getting props: "org.freedesktop.DBus.Error.InvalidArgs" "No such interface “org.freedesktop.UDisks2.Filesystem”" for "/org/freedesktop/UDisks2/block_devices/sr0" ASSERT: "dev->backendObject() != nullptr" in file /local/hdd/gebhard/kde/src/frameworks/solid/src/solid/devices/frontend/devicemanager.cpp, line 234 I would propose to relax the code void Solid::DeviceManagerPrivate::_k_deviceRemoved(const QString &udi) { if (m_devicesMap.contains(udi)) { DevicePrivate *dev = m_devicesMap[udi].data(); // Ok, this one was requested somewhere was valid // and now becomes magically invalid! if (dev) { Q_ASSERT(dev->backendObject() != nullptr); dev->setBackendObject(nullptr); Q_ASSERT(dev->backendObject() == nullptr); } } Q_EMIT deviceRemoved(udi); }
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/165
*** Bug 458609 has been marked as a duplicate of this bug. ***
Git commit f099efda7a38e7f3651a802a44cd7e125b065dc1 by Christoph Cullmann. Committed on 03/05/2024 at 10:23. Pushed by cullmann into branch 'master'. remove too aggressive assert can happen during runtime, we set it to nullptr anyways, just remove the assert M +0 -1 src/solid/devices/frontend/devicemanager.cpp https://invent.kde.org/frameworks/solid/-/commit/f099efda7a38e7f3651a802a44cd7e125b065dc1
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/172
Git commit 99510948944ecda04f9cec6b3bd94b140d191a1c by Christoph Cullmann, on behalf of Nicolas Fella. Committed on 19/10/2024 at 10:27. Pushed by cullmann into branch 'master'. [udisks] Don't add/remove devices in slotMediaChanged We get notified when devices are added via InterfacesAdded/InterfacesRemoved. When ejecting from a CD drive we first get slotMediaChanged, where we remove the device from m_deviceCache. Then we get InterfacesRemoved for org.freedesktop.UDisks2.Filesystem. Because the org.freedesktop.UDisks2.Block interface is still there we remove and immediately readd the device. Then in DeviceManagerPrivate::_k_deviceAdded we call createBackendObject, which fails to create a backend because the uid is not in m_deviceCache any more. Then we assert because the backend is empty. SENTRY: KIO-6S SENTRY: KONTACT-FM SENTRY: KDED-P SENTRY: PLASMA-WORKSPACE-SMH SENTRY: ARK-5T SENTRY: DOLPHIN-218 M +0 -13 src/solid/devices/backends/udisks2/udisksmanager.cpp https://invent.kde.org/frameworks/solid/-/commit/99510948944ecda04f9cec6b3bd94b140d191a1c