Bug 429442

Summary: Calling app crashes in KNSCore::Engine::signalEntryChanged() when trying to download KNS content
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: gregoryarapis
Component: generalAssignee: Dan Leinir Turthra Jensen <admin>
Status: RESOLVED FIXED    
Severity: crash CC: albertzubkowicz, ascaris, b.buschinski, brandon, bugseforuns, jodr666, josh.phelps2011, jtjamrog, kdelibs-bugs, kossebau, magestic.gamer989, mjwood329, muaddiibh+bugs, nate, nigeljordannn, nufcjd, nurembergsuse, sime.brkovic, wikt.sztw+kdebugs
Priority: HI    
Version: 5.76.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.78
Sentry Crash Report:

Description gregoryarapis 2020-11-21 11:46:30 UTC
Application: plasmashell (5.20.3)

Qt Version: 5.15.1
Frameworks Version: 5.76.0
Operating System: Linux 5.9.9-arch1-1 x86_64
Windowing system: X11
Distribution: "Arch Linux"

-- Information about the crash:
<In detail, tell us what you were doing  when the application crashed.>

I was downloading the widget "Thermal Monitor Fix" from New Plasma Widgets. Then the screen blackened and everything reloaded and I didn't download the widget. Nothing bad happened when I attempted once again to download the widget again. 


The crash does not seem to be reproducible.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault

[KCrash Handler]
#4  0x00007ff49eed7094 in QObject::thread() const () at /usr/lib/libQt5Core.so.5
#5  0x00007ff49eedd5fc in QObject::killTimer(int) () at /usr/lib/libQt5Core.so.5
#6  0x00007ff49eee834a in QTimer::stop() () at /usr/lib/libQt5Core.so.5
#7  0x00007ff49eee83c0 in QTimer::start() () at /usr/lib/libQt5Core.so.5
#8  0x00007ff49eee4036 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007ff412fc7716 in KNSCore::Engine::signalEntryChanged(KNSCore::EntryInternal const&) () at /usr/lib/libKF5NewStuffCore.so.5
#10 0x00007ff412fdecf7 in KNSCore::Engine::install(KNSCore::EntryInternal, int) () at /usr/lib/libKF5NewStuffCore.so.5
#11 0x00007ff413089e3e in  () at /usr/lib/libKF5NewStuff.so.5
#12 0x00007ff49eee4036 in  () at /usr/lib/libQt5Core.so.5
#13 0x00007ff49fc36b23 in QAbstractButton::clicked(bool) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007ff49fc374ac in  () at /usr/lib/libQt5Widgets.so.5
#15 0x00007ff49fc38e53 in  () at /usr/lib/libQt5Widgets.so.5
#16 0x00007ff49fc39033 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
#17 0x00007ff49fd2dd7b in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
#18 0x00007ff49fb86b0e in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#19 0x00007ff49fb45752 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#20 0x00007ff49fb4c87b in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#21 0x00007ff49eeaccda in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#22 0x00007ff49fb4b87e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /usr/lib/libQt5Widgets.so.5
#23 0x00007ff49fb9f249 in  () at /usr/lib/libQt5Widgets.so.5
#24 0x00007ff49fba263f in  () at /usr/lib/libQt5Widgets.so.5
#25 0x00007ff49fb45752 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#26 0x00007ff49eeaccda in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#27 0x00007ff49f2854ac in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#28 0x00007ff49f25abac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#29 0x00007ff49a1a7f9c in  () at /usr/lib/libQt5XcbQpa.so.5
#30 0x00007ff49d2e1914 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#31 0x00007ff49d3357d1 in  () at /usr/lib/libglib-2.0.so.0
#32 0x00007ff49d2e0121 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#33 0x00007ff49ef05941 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#34 0x00007ff49eeab65c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#35 0x00007ff49eeb3af4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#36 0x000055c1e8462f99 in  ()
#37 0x00007ff49e879152 in __libc_start_main () at /usr/lib/libc.so.6
#38 0x000055c1e84631de in  ()
[Inferior 1 (process 853) detached]

Report to https://bugs.kde.org/
Comment 1 Nate Graham 2020-11-23 18:29:42 UTC
KNSCore::Engine::signalEntryChanged(KNSCore::EntryInternal const&) () at /usr/lib/libKF5NewStuffCore.so.5
#10 0x00007ff412fdecf7 in KNSCore::Engine::install(KNSCore::EntryInternal, int) () at /usr/lib/libKF5NewStuffCore.so.5
#11 0x00007ff413089e3e in  () at /usr/lib/libKF5NewStuff.so.5
Comment 2 Alexander Lohnau 2020-11-26 09:33:02 UTC
*** Bug 429677 has been marked as a duplicate of this bug. ***
Comment 3 Alexander Lohnau 2020-11-26 18:56:34 UTC
*** Bug 429445 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Lohnau 2020-11-26 18:57:30 UTC
*** Bug 428065 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Lohnau 2020-11-26 18:58:55 UTC
*** Bug 429526 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2020-12-01 17:52:38 UTC
*** Bug 429716 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2020-12-01 17:53:09 UTC
Leinir or Alexander, any ideas?
Comment 8 Nate Graham 2020-12-01 17:53:41 UTC
*** Bug 429884 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2020-12-01 17:53:49 UTC
*** Bug 429886 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2020-12-09 15:54:13 UTC
*** Bug 428998 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2020-12-09 15:54:19 UTC
*** Bug 428835 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2020-12-09 15:54:36 UTC
*** Bug 430175 has been marked as a duplicate of this bug. ***
Comment 13 Bug Janitor Service 2020-12-10 11:53:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/83
Comment 14 Dan Leinir Turthra Jensen 2020-12-10 15:35:56 UTC
Getting the attached patch tested by those of you who are both able to reproduce the problem and able to build the patch would be... very good, thanks :)
Comment 15 Patrick Silva 2020-12-10 17:01:04 UTC
Hi Dan
I have applied your patch to neon unstable and since then
my bug 428065 marked as duplicate is no longer reproducible. :)
Comment 16 Dan Leinir Turthra Jensen 2020-12-10 17:15:42 UTC
(In reply to Patrick Silva from comment #15)
> Hi Dan
> I have applied your patch to neon unstable and since then
> my bug 428065 marked as duplicate is no longer reproducible. :)

Awesome, thank you so much for testing that out! :) If i get one more of those i'll call it confirmed fixed :)
Comment 17 Dan Leinir Turthra Jensen 2020-12-14 21:11:56 UTC
Git commit 243ea6155b28457c8b1441fee8ab1037828d21ba by Dan Leinir Turthra Jensen.
Committed on 14/12/2020 at 21:11.
Pushed by leinir into branch 'master'.

Add a dptr to Cache, and move the throttle timer there to fix crash

Previously, the throttle timer was a raw static, but it was also a parented qobject, which means that when the cache was deleted, so was the timer, but the variable was not reset. Consequently, things would crash left and right later on. So, to alleviate this, and hopefully avoid future issues, introduce a dptr, stick the timer there, and move the logic to that private class as well.

FIXED-IN:5.78

M  +30   -11   src/core/cache.cpp
M  +5    -2    src/core/cache.h

https://invent.kde.org/frameworks/knewstuff/commit/243ea6155b28457c8b1441fee8ab1037828d21ba
Comment 18 Nate Graham 2020-12-16 21:13:22 UTC
*** Bug 430467 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2020-12-16 21:42:28 UTC
*** Bug 430432 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2020-12-19 15:48:58 UTC
*** Bug 430571 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2020-12-27 00:23:47 UTC
*** Bug 427946 has been marked as a duplicate of this bug. ***
Comment 22 Nate Graham 2021-01-04 23:11:03 UTC
*** Bug 430868 has been marked as a duplicate of this bug. ***
Comment 23 Nate Graham 2021-01-05 16:31:28 UTC
*** Bug 430911 has been marked as a duplicate of this bug. ***
Comment 24 Nate Graham 2021-08-13 14:15:51 UTC
*** Bug 440914 has been marked as a duplicate of this bug. ***
Comment 25 Nate Graham 2021-09-09 16:13:38 UTC
*** Bug 442154 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2021-10-21 14:25:40 UTC
*** Bug 444185 has been marked as a duplicate of this bug. ***