Bug 425245 - System settings crash in KJob::errorText()
Summary: System settings crash in KJob::errorText()
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.72.0
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Jeremy Whiting
URL:
Keywords: drkonqi
: 423766 429183 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-12 02:13 UTC by Alejandro
Modified: 2023-01-03 18:26 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro 2020-08-12 02:13:40 UTC
Application: systemsettings5 (5.19.4)

Qt Version: 5.14.2
Frameworks Version: 5.72.0
Operating System: Linux 5.4.0-42-generic x86_64
Windowing system: X11
Distribution: KDE neon User Edition 5.19

-- Information about the crash:
- What I was doing when the application crashed:

installing themes and plasma styles.

If I am tried install some theme or plasma style, the error occurs

The crash can be reproduced every time.

-- Backtrace:
Application: Preferencias del sistema (systemsettings5), signal: Segmentation fault

[KCrash Handler]
#4  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x5591000002eb) at /usr/include/c++/9/bits/atomic_base.h:413
#5  QAtomicOps<int>::loadRelaxed<int> (_q_value=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:239
#6  QBasicAtomicInteger<int>::loadRelaxed (this=0x5591000002eb) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:107
#7  QtPrivate::RefCount::ref (this=0x5591000002eb) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qrefcount.h:55
#8  QString::QString (other=..., this=0x7fff4fd230e0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1051
#9  KJob::errorText (this=this@entry=0x5591ab22d6a0) at ./src/lib/jobs/kjob.cpp:202
#10 0x00007f0a66c459ee in KNSCore::KPackageJob::<lambda(KJob*)>::operator() (__closure=0x5591ab6077b0, job=0x5591ab22d6a0) at ./src/core/jobs/kpackagejob.cpp:143
#11 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KJob*>, void, KNSCore::KPackageJob::start()::<lambda(KJob*)> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146
#12 QtPrivate::Functor<KNSCore::KPackageJob::start()::<lambda(KJob*)>, 1>::call<QtPrivate::List<KJob*>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256
#13 QtPrivate::QFunctorSlotObject<KNSCore::KPackageJob::start()::<lambda(KJob*)>, 1, QtPrivate::List<KJob*>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x5591ab6077a0, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:443
#14 0x00007f0a918962a9 in QObject::event (this=0x5591aa761350, e=0x5591ac201e20) at kernel/qobject.cpp:1339
#15 0x00007f0a9241dcc3 in QApplicationPrivate::notify_helper (this=this@entry=0x5591a6e396b0, receiver=receiver@entry=0x5591aa761350, e=e@entry=0x5591ac201e20) at kernel/qapplication.cpp:3685
#16 0x00007f0a92426f40 in QApplication::notify (this=0x7fff4fd237b0, receiver=0x5591aa761350, e=0x5591ac201e20) at kernel/qapplication.cpp:3431
#17 0x00007f0a9186878a in QCoreApplication::notifyInternal2 (receiver=0x5591aa761350, event=0x5591ac201e20) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:153
#18 0x00007f0a9186af74 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5591a6e30020) at kernel/qcoreapplication.cpp:1815
#19 0x00007f0a918c1b87 in postEventSourceDispatch (s=0x5591a6ea6530) at kernel/qeventdispatcher_glib.cpp:277
#20 0x00007f0a8f42afbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007f0a8f42b240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f0a8f42b2e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f0a918c11e2 in QEventDispatcherGlib::processEvents (this=0x5591a6eb4d00, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#24 0x00007f0a9186724b in QEventLoop::exec (this=this@entry=0x7fff4fd23680, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#25 0x00007f0a9186f296 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#26 0x00005591a69470c3 in main (argc=<optimized out>, argv=<optimized out>) at ./app/main.cpp:168
[Inferior 1 (process 25435) detached]

Possible duplicates by query: bug 425205, bug 424644, bug 423719, bug 422451, bug 422092.

Reported using DrKonqi
Comment 1 Nate Graham 2020-08-12 16:15:09 UTC
#9  KJob::errorText (this=this@entry=0x5591ab22d6a0) at ./src/lib/jobs/kjob.cpp:202
#10 0x00007f0a66c459ee in KNSCore::KPackageJob::<lambda(KJob*)>::operator() (__closure=0x5591ab6077b0, job=0x5591ab22d6a0) at ./src/core/jobs/kpackagejob.cpp:143
#11 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KJob*>, void, KNSCore::KPackageJob::start()::<lambda(KJob*)> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146
#12 QtPrivate::Functor<KNSCore::KPackageJob::start()::<lambda(KJob*)>, 1>::call<QtPrivate::List<KJob*>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256
#13 QtPrivate::QFunctorSlotObject<KNSCore::KPackageJob::start()::<lambda(KJob*)>, 1, QtPrivate::List<KJob*>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x5591ab6077a0, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:443
Comment 2 Alexander Lohnau 2020-08-13 12:20:08 UTC
Does this happen on all plasma styles/themes? And if not please name the one which causes the crash. Thanks!
Comment 3 Dan Leinir Turthra Jensen 2020-08-13 12:27:46 UTC
Hmm... i think that code is a little dangerous anyway, i'll whip up a quick patch, it's sort of roundabout anyway the way it's working now :)
Comment 4 Bug Janitor Service 2020-08-13 12:34:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/31
Comment 5 Dan Leinir Turthra Jensen 2020-08-18 12:25:05 UTC
If people are able to test out the patch in the comment above, i'd appreciate it :)
Comment 6 Dan Leinir Turthra Jensen 2020-08-19 08:26:35 UTC
Git commit c75457e0054cabd1a0b9ed10faeca6d7649bcb8c by Dan Leinir Turthra Jensen.
Committed on 17/08/2020 at 08:50.
Pushed by leinir into branch 'master'.

Fix a sometimes-crash with the KPackageJob task

This ensures that we're not trying to reference a job that is no longer
around (and also owned by a separate thread and handled by a separate
event loop, meaning it may very well have been deleted by the time it
reaches that old codepath).

M  +4    -7    src/core/jobs/kpackagejob.cpp

https://invent.kde.org/frameworks/knewstuff/commit/c75457e0054cabd1a0b9ed10faeca6d7649bcb8c
Comment 7 Nicolas Fella 2020-08-22 10:10:17 UTC
*** Bug 423766 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2020-11-16 21:10:13 UTC
*** Bug 429183 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2023-01-03 18:26:19 UTC
*** Bug 429183 has been marked as a duplicate of this bug. ***