Bug 448460 - discover 5.23.90 crashes with segfault on startup
Summary: discover 5.23.90 crashes with segfault on startup
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.23.90
Platform: Ubuntu Linux
: VHI crash
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: regression
: 448939 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-14 13:56 UTC by Rik Mills
Modified: 2024-01-31 15:32 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments
journactl -f from the moment discover started until it crashed (81.04 KB, text/plain)
2022-01-18 12:26 UTC, Geraldo Simião
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rik Mills 2022-01-14 13:56:01 UTC
Linux: Ubuntu
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90
Qt Version: 5.15.2

Thread 1 "plasma-discover" received signal SIGSEGV, Segmentation fault.
0x00007ffff6b1388d in QV4::Heap::InternalClass::changeVTableImpl (this=0x7fffe47c0880, vt=vt@entry=0x7ffff6e59400 <QV4::QQmlValueTypeReference::static_vtbl>) at jsruntime/qv4internalclass.cpp:435
435     jsruntime/qv4internalclass.cpp: No such file or directory.
(gdb) bt
#0  0x00007ffff6b1388d in QV4::Heap::InternalClass::changeVTableImpl (this=0x7fffe47c0880, 
    vt=vt@entry=0x7ffff6e59400 <QV4::QQmlValueTypeReference::static_vtbl>) at jsruntime/qv4internalclass.cpp:435
#1  0x00007ffff6ccfe71 in QV4::Heap::InternalClass::changeVTable (vt=0x7ffff6e59400 <QV4::QQmlValueTypeReference::static_vtbl>, 
    this=<optimised out>) at ../../include/QtQml/5.15.2/QtQml/private/../../../../../src/qml/jsruntime/qv4internalclass_p.h:444
#2  QV4::InternalClass::changeVTable (vt=0x7ffff6e59400 <QV4::QQmlValueTypeReference::static_vtbl>, this=0x7fffe4bbb578)
    at ../../include/QtQml/5.15.2/QtQml/private/../../../../../src/qml/jsruntime/qv4managed_p.h:226
#3  QV4::MemoryManager::allocateObject<QV4::QQmlValueTypeReference> (this=0x55555570f120)
    at ../../include/QtQml/5.15.2/QtQml/private/../../../../../src/qml/memory/qv4mm_p.h:209
#4  QV4::MemoryManager::allocate<QV4::QQmlValueTypeReference> (this=0x55555570f120)
    at ../../include/QtQml/5.15.2/QtQml/private/../../../../../src/qml/memory/qv4mm_p.h:244
#5  QV4::QQmlValueTypeWrapper::create (engine=engine@entry=0x55555575a710, object=object@entry=0x55555592fb30, property=95, 
    metaObject=0x7ffff7ebe7c0 <QQuickColorValueType::staticMetaObject>, typeId=67) at qml/qqmlvaluetypewrapper.cpp:191
#6  0x00007ffff6b806de in loadProperty (v4=0x55555575a710, object=0x55555592fb30, property=...)
    at jsruntime/qv4qobjectwrapper.cpp:186
#7  0x00007fffe4250322 in ?? ()
#8  0x0000000000000000 in ?? ()

On investigation doing a git bisect, the crash is introduced in the following commit:

https://invent.kde.org/plasma/discover/-/commit/0f4e5e2367d78105fe0241e76d316853e0b278e2

Further investigation narrowed this down to the addition of 'featuredAction' line. Commenting this out (leaving the others) prevents the crash.
Comment 1 Nate Graham 2022-01-14 14:37:35 UTC
Cannot reproduce FWIW.
Comment 2 Linus Dierheimer 2022-01-14 16:40:39 UTC
I can reproduce (Archlinux, 5.23.90, 5.90.0, 5.15.2). Opening in konsole gives the following output:

adding empty sources model QStandardItemModel(0x55ce2f0ce840)
file:///usr/lib/qt/qml/org/kde/kirigami.2/private/PrivateActionToolButton.qml:74:5: QML Binding: Binding loop detected for property "value"
file:///usr/lib/qt/qml/org/kde/kirigami.2/AbstractApplicationWindow.qml:283:5: QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated.
You have to import QtQml 2.15 after any QtQuick imports and set
the restoreMode of the binding to fix this warning.
In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.

file:///usr/lib/qt/qml/org/kde/kirigami.2/BasicListItem.qml:261:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
file:///usr/lib/qt/qml/org/kde/kirigami.2/AbstractApplicationWindow.qml:283:5: QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated.
You have to import QtQml 2.15 after any QtQuick imports and set
the restoreMode of the binding to fix this warning.
In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.

[1]    37070 segmentation fault (core dumped)  plasma-discover
Comment 3 Ismael Asensio 2022-01-14 20:54:52 UTC
(In reply to Rik Mills from comment #0)
> On investigation doing a git bisect, the crash is introduced in the
> following commit:
> 
> https://invent.kde.org/plasma/discover/-/commit/
> 0f4e5e2367d78105fe0241e76d316853e0b278e2
> 
> Further investigation narrowed this down to the addition of 'featuredAction'
> line. Commenting this out (leaving the others) prevents the crash.

I can reproduce and confirm this on a git-master version
Comment 4 Samuel Reddy 2022-01-15 09:31:56 UTC
Can reproduce on Plasma 5.24 Beta(5.23.90):

#0  0x00007fbb326bfb5f in QV4::Heap::InternalClass::changeVTableImpl(QV4::VTable const*) (this=0x7fbb14200880, vt=0x7fbb32995bc0 <QV4::QQmlValueTypeReference::static_vtbl>)
    at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4internalclass.cpp:435
#1  0x00007fbb32833065 in QV4::Heap::InternalClass::changeVTable(QV4::VTable const*) (vt=0x7fbb32995bc0 <QV4::QQmlValueTypeReference::static_vtbl>, this=<optimized out>)
    at ../../include/QtQml/5.15.2/QtQml/private/../../../../../../qtdeclarative/src/qml/jsruntime/qv4internalclass_p.h:444
#2  QV4::InternalClass::changeVTable(QV4::VTable const*) (vt=0x7fbb32995bc0 <QV4::QQmlValueTypeReference::static_vtbl>, this=0x7fbb1c0d3578) at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4managed_p.h:226
#3  QV4::MemoryManager::allocateObject<QV4::QQmlValueTypeReference>() (this=0x7fbb100638a0) at ../../include/QtQml/5.15.2/QtQml/private/../../../../../../qtdeclarative/src/qml/memory/qv4mm_p.h:209
#4  QV4::MemoryManager::allocate<QV4::QQmlValueTypeReference>() (this=0x7fbb100638a0) at ../../include/QtQml/5.15.2/QtQml/private/../../../../../../qtdeclarative/src/qml/memory/qv4mm_p.h:244
#5  QV4::QQmlValueTypeWrapper::create(QV4::ExecutionEngine*, QObject*, int, QMetaObject const*, int)
    (engine=0x5584518fe0a0, object=0x558451b444b0, property=95, metaObject=0x7fbb33954e80 <QQuickColorValueType::staticMetaObject>, typeId=67) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlvaluetypewrapper.cpp:191
#6  0x00007fbb3270d7c0 in loadProperty(QV4::ExecutionEngine*, QObject*, QQmlPropertyData const&) (v4=0x5584518fe0a0, object=0x558451b444b0, property=...) at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:186
#7  0x00007fbb0de6e322 in  ()
#8  0x00007ffc91dc03e0 in  ()
#9  0x0000000000000007 in  ()
#10 0x00007fbb0de6e000 in  ()
#11 0x0000000000000000 in  ()
Comment 5 Samuel Reddy 2022-01-15 09:35:35 UTC
I have this issue on Wayland. Strangely enough, it launches fine on Weston(reference Wayland compositor), but not on KWin(Plasma Wayland Compositor).
Comment 6 Linus Dierheimer 2022-01-15 09:53:33 UTC
Can confirm this crash only happens with KWin Wayland, even KWin X11 works.
Comment 7 d3coder 2022-01-15 10:18:09 UTC
Crashes on X11 too, not sure if I have another issue.
Comment 8 Rik Mills 2022-01-15 10:54:26 UTC
My initial backtrace was from X11. Also see the crash with wayland.
Comment 9 Linus Dierheimer 2022-01-15 11:13:03 UTC
You are right, it crashes in X11 too, i just didn't wait long enough. In Wayland it crashes before you can see anything of it, so i thought it works in X11, as soon as i saw a window popping up. Crashed around 2 seconds later.
Comment 10 Samuel Reddy 2022-01-16 01:36:13 UTC
For me on X11, it shows a window and then crashes a few seconds later.
Comment 11 NoWorries 2022-01-17 06:45:21 UTC
I have two Laptops with Kubuntu 22.04 and KDE Plasma 5.23.90, both briefly show a Discover window and then  exit.  The error message that I get is listed below when I use the command line to start Discover.

$ plasma-discover %F
org.kde.plasma.discover: Trying to open unexisting file QUrl("file:///home/username/%25F")
adding empty sources model QStandardItemModel(0x55e8cd75b470)
org.kde.plasma.libdiscover: Couldn't find a category for  "fwupd-backend"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/private/PrivateActionToolButton.qml:74:5: QML Binding: Binding loop detected for property "value"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/AbstractApplicationWindow.qml:283:5: QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated.
You have to import QtQml 2.15 after any QtQuick imports and set
the restoreMode of the binding to fix this warning.
In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.

file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/AbstractApplicationWindow.qml:283:5: QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated.
You have to import QtQml 2.15 after any QtQuick imports and set
the restoreMode of the binding to fix this warning.
In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.
Comment 12 marco martinez 2022-01-17 12:25:14 UTC
same error here, running kubuntu 22.04 and trying to open plasma-discover throws the same result on wayland or x11:
marco@pc-kubuntu:~$ plasma-discover %F
org.kde.plasma.discover: Trying to open unexisting file QUrl("file:///home/marco/%25F")
adding empty sources model QStandardItemModel(0x5627d6ee0a40)
org.kde.plasma.libdiscover: Couldn't find a category for  "fwupd-backend"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/private/PrivateActionToolButton.qml:74:5: QML Binding: Binding loop detected for property "value"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/AbstractApplicationWindow.qml:283:5: QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated.
You have to import QtQml 2.15 after any QtQuick imports and set
the restoreMode of the binding to fix this warning.
In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.

file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/BasicListItem.qml:261:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/AbstractApplicationWindow.qml:283:5: QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated.
You have to import QtQml 2.15 after any QtQuick imports and set
the restoreMode of the binding to fix this warning.
In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.

Violación de segmento (`core' generado)
Comment 13 Aleix Pol 2022-01-17 17:44:21 UTC
I cannot reproduce on my source builds or on KDE Neon.

Can you make sure you are running with the Qt Patch Collection?
Comment 14 Linus Dierheimer 2022-01-17 17:53:31 UTC
Used QT5 versions:

yay -Q | rg qt5-
phonon-qt5-gstreamer 4.10.0-2
qt5-base 5.15.2+kde+r291-1
qt5-declarative 5.15.2+kde+r43-1
qt5-graphicaleffects 5.15.2-1
qt5-location 5.15.2-4
qt5-multimedia 5.15.2-1
qt5-networkauth 5.15.2-1
qt5-quickcontrols 5.15.2-1
qt5-quickcontrols2 5.15.2+kde+r9-1
qt5-script 5.15.8-2
qt5-sensors 5.15.2-1
qt5-speech 5.15.2-1
qt5-svg 5.15.2+kde+r16-1
qt5-tools 5.15.2+kde+r17-4
qt5-translations 5.15.2+kde+r20-2
qt5-wayland 5.15.2+kde+r41-1
qt5-webchannel 5.15.2+kde+r5-1
qt5-webengine 5.15.8-1
qt5-webkit 5.212.0alpha4-11
qt5-x11extras 5.15.2-1
qt5-xmlpatterns 5.15.2-1
Comment 15 Rik Mills 2022-01-18 11:12:36 UTC
(In reply to Linus Dierheimer from comment #2)
> I can reproduce (Archlinux, 5.23.90, 5.90.0, 5.15.2). Opening in konsole

Thanks for confirming it occurs on Arch also
Comment 16 Geraldo Simião 2022-01-18 12:26:40 UTC
Created attachment 145609 [details]
journactl -f from the moment discover started until it crashed
Comment 17 Geraldo Simião 2022-01-18 12:27:55 UTC
Confirmed that here too, on fedora 35.

Operating System: Fedora Linux 35
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.1-200.fc35.x86_64 (64-bit)
Comment 18 Devin Lin 2022-01-18 19:59:38 UTC
Strange, I cannot reproduce this, both on my desktop and on my Pinephone.

Perhaps everyone can try this MR to see if it fixes things? The stacktrace makes no sense to me...

https://invent.kde.org/plasma/discover/-/merge_requests/228
Comment 19 Antonio Rojas 2022-01-18 21:18:23 UTC
(In reply to espidev from comment #18)
> Strange, I cannot reproduce this, both on my desktop and on my Pinephone.
> 
> Perhaps everyone can try this MR to see if it fixes things? The stacktrace
> makes no sense to me...
> 
> https://invent.kde.org/plasma/discover/-/merge_requests/228

It does fix it for me.
Comment 20 Leszek Lesner 2022-01-19 09:55:53 UTC
(In reply to espidev from comment #18)
> Strange, I cannot reproduce this, both on my desktop and on my Pinephone.
> 
> Perhaps everyone can try this MR to see if it fixes things? The stacktrace
> makes no sense to me...
> 
> https://invent.kde.org/plasma/discover/-/merge_requests/228

This fixes it for me too
Comment 21 Nate Graham 2022-01-19 16:13:24 UTC
Is anyone still able to reproduce the issue with the commits from https://invent.kde.org/plasma/discover/-/merge_requests/228 applied?
Comment 22 Linus Dierheimer 2022-01-19 17:11:42 UTC
Fixes it for me. Resizing the window (so it changes the layout) is working too.
Comment 23 Bug Janitor Service 2022-01-21 17:33:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/232
Comment 24 Ismael Asensio 2022-01-21 18:33:40 UTC
Git commit 8b45c2042ef2518e28c6e98f0472af578d955ce7 by Ismael Asensio.
Committed on 21/01/2022 at 17:30.
Pushed by iasensio into branch 'master'.

NavigationTabBar: Avoid loop on actions in tab group

The actions in Kirigami.NavigationTabBar are bounded by an
exclusive button group, which on start-up competes with the
binding on the `checked` property within those actions.

This results in an endless loop of alternating states,
and eventually a crash when the QV4 heap saturates.

Setting this group as non-exclusive fixes the issue.
FIXED-IN: 5.24

M  +4    -0    discover/qml/DiscoverWindow.qml

https://invent.kde.org/plasma/discover/commit/8b45c2042ef2518e28c6e98f0472af578d955ce7
Comment 25 Ismael Asensio 2022-01-21 18:37:46 UTC
Git commit 53b328842032c4d159f34fa330ad4f6914fd95a6 by Ismael Asensio.
Committed on 21/01/2022 at 18:36.
Pushed by iasensio into branch 'Plasma/5.24'.

NavigationTabBar: Avoid loop on actions in tab group

The actions in Kirigami.NavigationTabBar are bounded by an
exclusive button group, which on start-up competes with the
binding on the `checked` property within those actions.

This results in an endless loop of alternating states,
and eventually a crash when the QV4 heap saturates.

Setting this group as non-exclusive fixes the issue.
FIXED-IN: 5.24
(cherry picked from commit 8b45c2042ef2518e28c6e98f0472af578d955ce7)

M  +4    -0    discover/qml/DiscoverWindow.qml

https://invent.kde.org/plasma/discover/commit/53b328842032c4d159f34fa330ad4f6914fd95a6
Comment 26 Antonio Rojas 2022-01-23 12:03:52 UTC
*** Bug 448939 has been marked as a duplicate of this bug. ***
Comment 27 Geraldo Simião 2022-02-07 00:56:07 UTC
I can confirm here, fixed in 5.24.0
Comment 28 reneas 2024-01-31 15:32:19 UTC
I ran into the same issue although I am running the version 5.24.7 where this shouldn't be a problem anymore right?
fixed it manually by changing the contents of /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/NavigationTabBar.qml as seen in :https://askubuntu.com/questions/1501964/kde-discover-doesnt-start-up-with-weird-error-message/1501970#1501970