Bug 486674 - Links on the desktop disappear after changing their path until plasmashell is restarted
Summary: Links on the desktop disappear after changing their path until plasmashell is...
Status: RESOLVED DUPLICATE of bug 485771
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (show other bugs)
Version: 6.0.4
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-06 17:15 UTC by Luka Rasputin
Modified: 2024-05-28 09:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luka Rasputin 2024-05-06 17:15:22 UTC
SUMMARY
When the path of a link is changed, this link disappears.

STEPS TO REPRODUCE
1. Create a symbolic link on the desktop, pointing to any file
2. Make the link point to a different file by changing the path in the link's properties

OBSERVED RESULT
The link disappears

EXPECTED RESULT
The link stays on the desktop and points to another file

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Comment 1 Nate Graham 2024-05-06 21:57:08 UTC
Can reproduce.

It's still in the ~/Desktop folder, but it does disappear from Folder View.

Restarting Plasma makes it reappear
Comment 2 Akseli Lahtinen 2024-05-20 11:04:44 UTC
Seems that when creating a link on desktop, the file path in `~/.config/plasma-org.kde.plasma.desktop-appletsrc` for the link files is *both* `file:///home/akseli/Desktop/aaaaaaaaa` and `desktop:/aaaaaaaaa`. There should be only one item created, which is `desktop:/aaaaaaaaa`
Comment 3 Akseli Lahtinen 2024-05-20 11:58:19 UTC
Meanwhile that is a bug, it's not the culprit for this one.

in `kcoredirlister.cpp` we ask from the item if it exists. However, it fails to 

```cpp
    if (!d->m_bInitCalled) {
        qCWarning(KIO_CORE) << "KFileItem: exists called when not initialised" << d->m_url;
        return false;
    }
```

Thus we don't show the file. Changing properties of the file from desktop does not initialize the file again for some reason.
Comment 4 Akseli Lahtinen 2024-05-20 12:39:35 UTC
Backtrace from where the warning happens about not being initialised item:

Thread 1 "plasmashell" hit Breakpoint 1.1, KFileItem::exists (this=this@entry=0x7fffffffc7b8) at /home/akseli/Repositories/kde/src/kio/src/core/kfileitem.cpp:1744
warning: Source file is more recent than executable.
1744            qCWarning(KIO_CORE) << "KFileItem: exists called when not initialised" << d->m_url;
Missing separate debuginfos, use: dnf debuginfo-install ffmpeg-libs-6.1.1-8.fc40.x86_64 libde265-1.0.15-2.fc40.x86_64 libheif-freeworld-1.17.5-3.fc40.x86_64 x264-libs-0.164-13.20231001git31e19f92.fc40.x86_64 x265-libs-3.6-1.fc40.x86_64
(gdb) bt
#0  KFileItem::exists (this=this@entry=0x7fffffffc7b8) at /home/akseli/Repositories/kde/src/kio/src/core/kfileitem.cpp:1744
#1  0x00007ffff7a8d276 in KCoreDirListerPrivate::addRefreshItem (this=0x1650270, directoryUrl=..., oldItem=..., item=...) at /home/akseli/Repositories/kde/src/kio/src/core/kcoredirlister.cpp:2475
#2  0x00007ffff7a966da in KCoreDirListerCache::slotUpdateResult (this=<optimized out>, j=<optimized out>) at /home/akseli/Repositories/kde/src/kio/src/core/kcoredirlister.cpp:1811
#3  0x00007ffff43fa3f4 in QtPrivate::QSlotObjectBase::call (this=0x58b0720, r=<optimized out>, a=0x7fffffffc9e0)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobjectdefs_impl.h:469
#4  doActivate<false> (sender=0x5983b20, signal_index=6, argv=0x7fffffffc9e0) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobject.cpp:4078
#5  0x00007ffff43f09a7 in QMetaObject::activate
(sender=sender@entry=0x5983b20, m=m@entry=0x7ffff6bfb100 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fffffffc9e0)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobject.cpp:4138
#6  0x00007ffff6baf1d5 in KJob::result (this=this@entry=0x5983b20, _t1=<optimized out>, _t1@entry=0x5983b20, _t2=...)
at /home/akseli/Repositories/kde/build/kcoreaddons/src/lib/KF6CoreAddons_autogen/include/moc_kjob.cpp:622
#7  0x00007ffff6bafbdb in KJob::finishJob (this=0x5983b20, emitResult=<optimized out>) at /home/akseli/Repositories/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:98
#8  0x00007ffff43fa3f4 in QtPrivate::QSlotObjectBase::call (this=0x58b22f0, r=<optimized out>, a=0x7fffffffcab8)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobjectdefs_impl.h:469
#9  doActivate<false> (sender=0x1594520, signal_index=7, argv=0x7fffffffcab8) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobject.cpp:4078
#10 0x00007ffff43f09a7 in QMetaObject::activate
(sender=sender@entry=0x1594520, m=m@entry=0x7ffff7b1b720 <KIO::WorkerInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobject.cpp:4138
#11 0x00007ffff7ab26a8 in KIO::WorkerInterface::finished (this=0x1594520) at /home/akseli/Repositories/kde/build/kio/src/core/KF6KIOCore_autogen/include/moc_workerinterface_p.cpp:525
#12 KIO::WorkerInterface::dispatch (this=0x1594520, _cmd=104, rawdata=...) at /home/akseli/Repositories/kde/src/kio/src/core/workerinterface.cpp:129
#13 0x00007ffff7aafb5a in KIO::WorkerInterface::dispatch (this=0x1594520) at /home/akseli/Repositories/kde/src/kio/src/core/workerinterface.cpp:60
--Type <RET> for more, q to quit, c to continue without paging--c
#14 0x00007ffff7aacb68 in KIO::Worker::gotInput (this=0x1594520) at /home/akseli/Repositories/kde/src/kio/src/core/worker.cpp:263
#15 0x00007ffff43fa3f4 in QtPrivate::QSlotObjectBase::call (this=0x1591ca0, r=<optimized out>, a=0x7fffffffcde8)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobjectdefs_impl.h:469
#16 doActivate<false> (sender=0x157d250, signal_index=3, argv=0x7fffffffcde8) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobject.cpp:4078
#17 0x00007ffff43ebdd5 in QObject::event (this=0x157d250, e=0x595b890) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qobject.cpp:1446
#18 0x00007ffff6d8b368 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x157d250, e=0x595b890)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3287
#19 0x00007ffff4395ab8 in QCoreApplication::notifyInternal2 (receiver=0x157d250, event=0x595b890) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1134
#20 0x00007ffff4395d1d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1575
#21 0x00007ffff4399861 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x4e8230)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1932
#22 0x00007ffff4399b0d in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>)
at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1789
#23 0x00007ffff467c7cf in postEventSourceDispatch (s=0x5e5670) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#24 0x00007ffff38146ac in g_main_dispatch (context=0x7fffd8000f00) at ../glib/gmain.c:3344
#25 g_main_context_dispatch_unlocked (context=0x7fffd8000f00) at ../glib/gmain.c:4152
#26 0x00007ffff3875708 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffd8000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../glib/gmain.c:4217
#27 0x00007ffff3815b23 in g_main_context_iteration (context=0x7fffd8000f00, may_block=1) at ../glib/gmain.c:4282
#28 0x00007ffff467bf83 in QEventDispatcherGlib::processEvents (this=0x517050, flags=...) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#29 0x00007ffff43a26b3 in QEventLoop::exec (this=this@entry=0x7fffffffd2b0, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/global/qflags.h:34
#30 0x00007ffff439e63c in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/corelib/global/qflags.h:74
#31 0x00007ffff4dd518d in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:1926
#32 0x00007ffff6d8b2d9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.0-5.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2555
#33 0x0000000000426886 in main (argc=<optimized out>, argv=<optimized out>) at /home/akseli/Repositories/kde/src/plasma-workspace/shell/main.cpp:188
Comment 5 Akseli Lahtinen 2024-05-28 09:25:34 UTC

*** This bug has been marked as a duplicate of bug 485771 ***