Bug 469407 - Segmentation fault when using random sorting
Summary: Segmentation fault when using random sorting
Status: REPORTED
Alias: None
Product: krename
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: Heiko Becker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-06 08:56 UTC by Andreas Blochberger
Modified: 2023-05-06 09:33 UTC (History)
0 users

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 Andreas Blochberger 2023-05-06 08:56:45 UTC
SUMMARY
Thread 1 "krename" received signal SIGSEGV, Segmentation fault.
0x00007ffff5d58d83 in std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/include/c++/12.2.1/bits/atomic_base.h:488
488		return __atomic_load_n(&_M_i, int(__m));
#0  0x00007ffff5d58d83 in std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/include/c++/12.2.1/bits/atomic_base.h:488
#1  QAtomicOps<int>::loadRelaxed<int> (_q_value=...) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:239
#2  QBasicAtomicInteger<int>::loadRelaxed (this=<optimized out>) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:107
#3  QtPrivate::RefCount::ref (this=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qrefcount.h:55
#4  QString::operator= (this=0x55555613b2e8, other=...) at text/qstring.cpp:2403
#5  0x00005555555fa473 in ?? ()
#6  0x00005555555af0b0 in ?? ()
#7  0x00005555555af361 in ?? ()
#8  0x00005555555b30d8 in ?? ()
#9  0x00005555555b33ef in ?? ()
#10 0x000055555559f6cb in ?? ()
#11 0x00005555555a0139 in ?? ()
#12 0x00007ffff5ebeb41 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate<false> (sender=0x555555882860, signal_index=22, argv=0x7fffffffc7f0) at kernel/qobject.cpp:3923
#14 0x00007ffff5ebeb41 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false> (sender=0x555555ac4120, signal_index=9, argv=0x7fffffffc920) at kernel/qobject.cpp:3923
#16 0x00007ffff6c5c7b7 in QAbstractButton::clicked (this=this@entry=0x555555ac4120, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#17 0x00007ffff6c5f06a in QAbstractButtonPrivate::emitClicked (this=0x555555ac4160) at widgets/qabstractbutton.cpp:416
#18 0x00007ffff6c605ad in QAbstractButtonPrivate::click (this=0x555555ac4160) at widgets/qabstractbutton.cpp:409
#19 0x00007ffff6c60750 in QAbstractButton::mouseReleaseEvent (this=0x555555ac4120, e=0x7fffffffcea0) at widgets/qabstractbutton.cpp:1045
#20 0x00007ffff6baf837 in QWidget::event (this=0x555555ac4120, event=0x7fffffffcea0) at kernel/qwidget.cpp:8671
#21 0x00007ffff6b78b5c in QApplicationPrivate::notify_helper (this=this@entry=0x55555566b970, receiver=receiver@entry=0x555555ac4120, e=e@entry=0x7fffffffcea0) at kernel/qapplication.cpp:3640
#22 0x00007ffff6b7e379 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffcea0) at kernel/qapplication.cpp:3084
#23 0x00007ffff5e8e028 in QCoreApplication::notifyInternal2 (receiver=0x555555ac4120, event=0x7fffffffcea0) at kernel/qcoreapplication.cpp:1064
#24 0x00007ffff5e8e0b3 in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#25 0x00007ffff6b7c377 in QApplicationPrivate::sendMouseEvent (receiver=0x555555ac4120, event=0x7fffffffcea0, alienWidget=<optimized out>, nativeWidget=0x555555882860, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#26 0x00007ffff6bcd4f3 in QWidgetWindow::handleMouseEvent (this=this@entry=0x555555e75710, event=event@entry=0x7fffffffd200) at kernel/qwidgetwindow.cpp:684
#27 0x00007ffff6bcf31e in QWidgetWindow::event (this=0x555555e75710, event=0x7fffffffd200) at kernel/qwidgetwindow.cpp:300
#28 0x00007ffff6b78b5c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555555e75710, e=0x7fffffffd200) at kernel/qapplication.cpp:3640
#29 0x00007ffff5e8e028 in QCoreApplication::notifyInternal2 (receiver=0x555555e75710, event=0x7fffffffd200) at kernel/qcoreapplication.cpp:1064
#30 0x00007ffff5e8e0b3 in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#31 0x00007ffff634002c in QGuiApplicationPrivate::processMouseEvent (e=0x7fffdc0046e0) at kernel/qguiapplication.cpp:2285
#32 0x00007ffff63298c5 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#33 0x00007ffff3abe8d5 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib/libQt5WaylandClient.so.5
#34 0x00007ffff3f0f53b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#35 0x00007ffff3f6c219 in ?? () from /usr/lib/libglib-2.0.so.0
#36 0x00007ffff3f0e1a2 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#37 0x00007ffff5ed8d3c in QEventDispatcherGlib::processEvents (this=0x5555556bb720, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#38 0x00007ffff5e8668c in QEventLoop::exec (this=0x7fffffffd5a0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#39 0x00007ffff5e912f9 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#40 0x0000555555586404 in ?? ()
#41 0x00007ffff563c790 in ?? () from /usr/lib/libc.so.6
#42 0x00007ffff563c84a in __libc_start_main () from /usr/lib/libc.so.6
#43 0x0000555555589125 in _start ()

STEPS TO REPRODUCE
1.  start krename
2.  set sorting option to random
3. add multiple files (more than 10)

OBSERVED RESULT
Krename crashes



EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.3.0-1-MANJARO (64-bit)/5.27.4
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
A workaround is to set sorting to unsorted when loading the files. When they are loaded, switching the sorting to random, randomizes the loaded files without issue