Bug 462086 - Segmentation fault when using CTRL+Left/Right on a panel with invalid path
Summary: Segmentation fault when using CTRL+Left/Right on a panel with invalid path
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: shortcuts (show other bugs)
Version: 2.8.0
Platform: Other Other
: NOR crash
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords: reproducible, triaged
Depends on:
Blocks:
 
Reported: 2022-11-21 06:35 UTC by FiNeX
Modified: 2023-12-30 06:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FiNeX 2022-11-21 06:35:53 UTC
I've just installed version 2.8 from Archlinux repo (the version is not yet available on the list, please update) and I've seen on the changelog the new shortcut Ctrl+Left/Shift so I've tried it.

Pressing alternately multiple times the two shortcuts, until the panels are on the "/", and pressing a couple more of times, the software crashes.

STEPS TO REPRODUCE:
1. Open krusader on a random directory with at least one sub-directory
2. Press alternately CTRL+Left and CTRL+Right
3. At some point you reach the "/"
4. Press again the shortcuts a couple of more time and it will crash.

I've observed that in order to trigger the crash, one of the panels has to be initially opened on a remote location and you've to press the two shortcuts quickly.

Probably if the panel is not yet fully loaded and the key are pressed it crashes. Using a remote location allows for a short time to trigger the crash. Instead using only local panels is not enough to easily trigger it.
Comment 1 Davide Gianforte 2022-11-21 06:50:50 UTC
Hi, following you steps, the panels switches from / and /bin, but no crash occurs.

But, if a panel starts from a non-existent folder, Krusader crashes suddenly.

- create a folder (e.g. ~/work/test)
- navigate to the folder and close Krusader
- delete the folder externally
- reopen Krusader and the panel will say that the folder does not exists
- navigate to parent folder (Left key - I'm in detailed mode), the parent folder exists

Application: Krusader (krusader), signal: Aborted

[KCrash Handler]
#5  0x00007f8523694b7b in pthread_kill@@GLIBC_2.34 () from /lib64/libc.so.6
#6  0x00007f852363af02 in raise () from /lib64/libc.so.6
#7  0x00007f8523622464 in abort () from /lib64/libc.so.6
#8  0x00007f8523eaee06 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1914
#9  0x00007f8523e9cb64 in QMessageLogger::fatal (this=<optimized out>, msg=<optimized out>) at global/qlogging.cpp:893
#10 0x00007f8523e9c3a6 in qt_assert (assertion=0x6 <error: Cannot access memory at address 0x6>, file=0x7f8523694b7b <pthread_kill@@GLIBC_2.34+251> "A\211\304A\367\334=", line=7, line@entry=61) at global/qglobal.cpp:3366
#11 0x00007f8525abda80 in KProtocolInfoFactory::findProtocol (this=<optimized out>, protocol=...) at /home/build/frameworks/kio-5.100.0/src/core/kprotocolinfofactory.cpp:61
#12 0x00007f8525abc1da in KProtocolInfo::proxiedBy (_protocol=...) at /home/build/frameworks/kio-5.100.0/src/core/kprotocolinfo.cpp:399
#13 0x00007f8525aaab65 in findProtocol (url=...) at /home/build/frameworks/kio-5.100.0/src/core/kprotocolmanager.cpp:969
#14 0x00007f8525aaacb6 in KProtocolManager::supportsListing (url=...) at /home/build/frameworks/kio-5.100.0/src/core/kprotocolmanager.cpp:1009
#15 0x00000000005d8eb2 in DefaultFileSystem::refreshInternal (this=0x1d51160, directory=..., onlyScan=<optimized out>) at /home/davide/src/krusader/app/FileSystem/defaultfilesystem.cpp:173
#16 0x00000000005dd8de in FileSystem::scanOrRefresh (this=0x1d51160, directory=..., onlyScan=onlyScan@entry=false) at /home/davide/src/krusader/app/FileSystem/filesystem.cpp:119
#17 0x00000000004ea88b in FileSystem::refresh (directory=..., this=<optimized out>) at /home/davide/src/krusader/app/Panel/../FileSystem/filesystem.h:110
#18 ListPanelFunc::doRefresh (this=0x1d0d740) at /home/davide/src/krusader/app/Panel/panelfunc.cpp:320
#19 0x00007f8524093fd0 in QtPrivate::QSlotObjectBase::call (this=0x1cb3cd0, r=0x1d0d740, a=0x7f8523694b7b <pthread_kill@@GLIBC_2.34+251>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate<false> (sender=0x1d0d768, signal_index=3, argv=0x7f8523694b7b <pthread_kill@@GLIBC_2.34+251>) at kernel/qobject.cpp:3919
#21 0x00007f8524098bf3 in QTimer::timeout (this=0x1d0d768, _t1=...) at .moc/moc_qtimer.cpp:205
#22 QTimer::timerEvent (this=0x1d0d768, e=<optimized out>) at kernel/qtimer.cpp:257
#23 0x00007f85240897f7 in QObject::event (this=0x1d0d768, e=0x7ffe334f2540) at kernel/qobject.cpp:1324
#24 0x00007f8524d79330 in QApplicationPrivate::notify_helper (this=this@entry=0x1288350, receiver=receiver@entry=0x1d0d768, e=e@entry=0x7ffe334f2540) at kernel/qapplication.cpp:3637
#25 0x00007f8524d7a550 in QApplication::notify (this=<optimized out>, receiver=0x1d0d768, e=0x7ffe334f2540) at kernel/qapplication.cpp:2976
#26 0x00007f85240631ff in QCoreApplication::notifyInternal2 (receiver=0x1d0d768, event=0x7ffe334f2540) at kernel/qcoreapplication.cpp:1064
#27 0x00007f85240b0bcf in QTimerInfoList::activateTimers (this=0x13e2060) at kernel/qtimerinfo_unix.cpp:643
#28 0x00007f85240b226a in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#29 0x00007f8520d1c878 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f8520d1caf8 in ?? () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f8520d1cb7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f85240b1a68 in QEventDispatcherGlib::processEvents (this=0x13e1ac0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007f852405fd56 in QEventLoop::processEvents (this=0x7ffe334f2760, flags=...) at kernel/qeventloop.cpp:139
#34 QEventLoop::exec (this=0x7ffe334f2760, flags=...) at kernel/qeventloop.cpp:232
#35 0x00007f85240637a1 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1375
#36 0x000000000048d224 in main (argc=<optimized out>, argv=<optimized out>) at /home/davide/src/krusader/app/main.cpp:307
[Inferior 1 (process 24107) detached]
Comment 2 Nikita Melnichenko 2022-11-21 07:27:21 UTC
Thanks for details, FiNeX and Davide! Marking as confirmed and reproducible. Added the feature author as well.

For the version list update, we have an open ticket about it with sysadmins.
Comment 3 Nikita Melnichenko 2023-04-02 07:03:57 UTC
PR with a fix: https://invent.kde.org/utilities/krusader/-/merge_requests/117
Comment 4 Nikita Melnichenko 2023-11-10 07:37:28 UTC
Git commit 2938db287f95a772792420f887dec2d88413409b by Nikita Melnichenko, on behalf of Pavel Karelin.
Committed on 10/11/2023 at 08:35.
Pushed by melnichenko into branch 'master'.

Fixed segmentation fault when using CTRL+Left/Right on a panel with invalid path

FIXED: [ 462086 ]  Segmentation fault when using CTRL+Left/Right on a panel with invalid path

Discussion: https://invent.kde.org/utilities/krusader/-/merge_requests/117

M  +15   -15   app/Panel/listpanel.cpp

https://invent.kde.org/utilities/krusader/-/commit/2938db287f95a772792420f887dec2d88413409b
Comment 5 Nikita Melnichenko 2023-12-30 06:31:04 UTC
Git commit 811e694aef31a15ace6056742d0f1305081c73e0 by Nikita Melnichenko, on behalf of Pavel Karelin.
Committed on 30/12/2023 at 07:26.
Pushed by melnichenko into branch 'stable'.

Fixed segmentation fault when using CTRL+Left/Right on a panel with invalid path

FIXED: [ 462086 ]  Segmentation fault when using CTRL+Left/Right on a panel with invalid path

Discussion: https://invent.kde.org/utilities/krusader/-/merge_requests/117
(cherry picked from commit 2938db287f95a772792420f887dec2d88413409b)

M  +15   -15   app/Panel/listpanel.cpp

https://invent.kde.org/utilities/krusader/-/commit/811e694aef31a15ace6056742d0f1305081c73e0