Bug 463648

Summary: Various pieces of QML-based KDE software crash on launch in QQmlPropertyCacheCreator<QQmlTypeCompiler>::propertyCacheForObject()
Product: [I don't know] kde Reporter: Justin Zobel <justin.zobel>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash CC: 4wy78uwh, alessiofolli, carl, Debraym46, dev, eugene.savitsky, guido-kdebugs, james.r.austin, justin, kdedev, klybymtb38, lincoln.backed470, martin.ignatov01, miatsukichan, nate, nathaniel.graham, nicolas.fella, pridefulmizuki, revatema08, rosswzyang, sderfla, sitter, staroy25786, woskimi
Priority: VHI    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-136810
Latest Commit: Version Fixed In: Qt 6.8.4 & 6.9.2
Sentry Crash Report:
Attachments: attachment-3293581-0.html
cache file

Description Justin Zobel 2022-12-31 00:52:53 UTC
#0  QQmlType::QQmlType (this=this@entry=0x7fffd05fbb80) at qml/qqmltype.cpp:121
#1  0x00007ffff6b2e535 in QQmlPropertyCacheCreator<QQmlTypeCompiler>::propertyCacheForObject (this=this@entry=0x7fffd05fbf00, obj=obj@entry=0x7fffc4261928, context=..., error=error@entry=0x7fffd05fbc18) at ../../include/QtQml/5.15.7/QtQml/private/../../../../../src/qml/qml/qqmlpropertycachecreator_p.h:310
#2  0x00007ffff6b31434 in QQmlPropertyCacheCreator<QQmlTypeCompiler>::buildMetaObjectRecursively (this=this@entry=0x7fffd05fbf00, objectIndex=<optimized out>, context=..., isVMERequired=isVMERequired@entry=QQmlPropertyCacheCreator<QQmlTypeCompiler>::VMEMetaObjectIsRequired::Maybe)
    at ../../include/QtQml/5.15.7/QtQml/private/../../../../../src/qml/qml/qqmlpropertycachecreator_p.h:264
#3  0x00007ffff6b31659 in QQmlPropertyCacheCreator<QQmlTypeCompiler>::buildMetaObjectRecursively (this=this@entry=0x7fffd05fbf00, objectIndex=objectIndex@entry=0, context=..., isVMERequired=isVMERequired@entry=QQmlPropertyCacheCreator<QQmlTypeCompiler>::VMEMetaObjectIsRequired::Maybe)
    at /usr/include/qt5/QtCore/qendian.h:290
#4  0x00007ffff6b31f22 in QQmlPropertyCacheCreator<QQmlTypeCompiler>::buildMetaObjects (this=this@entry=0x7fffd05fbf00) at ../../include/QtQml/5.15.7/QtQml/private/../../../../../src/qml/qml/qqmlpropertycachecreator_p.h:215
#5  0x00007ffff6b2cd7d in QQmlTypeCompiler::compile (this=this@entry=0x7fffd05fc070) at qml/qqmltypecompiler.cpp:85
#6  0x00007ffff6a7bb89 in QQmlTypeData::compile(QQmlRefPointer<QQmlTypeNameCache> const&, QV4::ResolvedTypeReferenceMap*, std::function<QByteArray ()> const&) (this=this@entry=0x7fffc40d2b60, typeNameCache=..., resolvedTypeCache=resolvedTypeCache@entry=0x7fffd05fc180, dependencyHasher=...)
    at qml/qqmltypedata.cpp:774
#7  0x00007ffff6a81a0a in QQmlTypeData::done (this=0x7fffc40d2b60) at qml/qqmltypedata.cpp:451
#8  0x00007ffff6a6f5bd in QQmlDataBlob::tryDone (this=0x7fffc40d2b60) at qml/qqmldatablob.cpp:524
#9  QQmlDataBlob::tryDone (this=0x7fffc40d2b60) at qml/qqmldatablob.cpp:515
#10 0x00007ffff6ad061c in QQmlTypeLoader::setData (this=this@entry=0x5555556f2728, blob=blob@entry=0x7fffc40d2b60, d=...) at qml/qqmltypeloader.cpp:457
#11 0x00007ffff6ad0d36 in QQmlTypeLoader::setData (this=this@entry=0x5555556f2728, blob=blob@entry=0x7fffc40d2b60, fileName=...) at qml/qqmltypeloader.cpp:437
#12 0x00007ffff6ad1bc3 in QQmlTypeLoader::loadThread (this=this@entry=0x5555556f2728, blob=blob@entry=0x7fffc40d2b60) at qml/qqmltypeloader.cpp:299
#13 0x00007ffff6ad2034 in PlainLoader::loadThread (blob=0x7fffc40d2b60, loader=0x5555556f2728, this=<optimized out>) at qml/qqmltypeloader.cpp:146
#14 QQmlTypeLoader::doLoad<PlainLoader> (loader=..., mode=QQmlTypeLoader::PreferSynchronous, blob=0x7fffc40d2b60, this=0x5555556f2728) at qml/qqmltypeloader.cpp:205
#15 QQmlTypeLoader::load (this=this@entry=0x5555556f2728, blob=blob@entry=0x7fffc40d2b60, mode=mode@entry=QQmlTypeLoader::PreferSynchronous) at qml/qqmltypeloader.cpp:237
#16 0x00007ffff6ad28d0 in QQmlTypeLoader::getType (this=this@entry=0x5555556f2728, unNormalizedUrl=..., mode=mode@entry=QQmlTypeLoader::PreferSynchronous) at qml/qqmltypeloader.cpp:825
#17 0x00007ffff6a80b2c in QQmlTypeData::resolveTypes (this=this@entry=0x555555bb9c80) at qml/qqmltypedata.cpp:873
#18 0x00007ffff6a83700 in QQmlTypeData::allDependenciesDone (this=<optimized out>) at qml/qqmltypedata.cpp:743
#19 0x00007ffff6ad08b9 in QQmlTypeLoader::setData (this=this@entry=0x5555556f2728, blob=blob@entry=0x555555bb9c80, d=...) at qml/qqmltypeloader.cpp:450
#20 0x00007ffff6ad0d36 in QQmlTypeLoader::setData (this=this@entry=0x5555556f2728, blob=blob@entry=0x555555bb9c80, fileName=...) at qml/qqmltypeloader.cpp:437
#21 0x00007ffff6ad1bc3 in QQmlTypeLoader::loadThread (this=0x5555556f2728, blob=blob@entry=0x555555bb9c80) at qml/qqmltypeloader.cpp:299
#22 0x00007ffff6a8b591 in QQmlTypeLoaderThread::loadThread (this=<optimized out>, b=0x555555bb9c80) at qml/qqmltypeloaderthread.cpp:162
#23 0x00007ffff6b4bc64 in QQmlThreadPrivate::threadEvent (this=this@entry=0x555555bc10d0) at qml/ftw/qqmlthread.cpp:198
#24 0x00007ffff6b4c44a in QQmlThreadPrivate::event (this=0x555555bc10d0, e=0x555555c3f4d0) at qml/ftw/qqmlthread.cpp:142
#25 0x00007ffff61aed12 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555555bc10d0, e=0x555555c3f4d0) at kernel/qapplication.cpp:3637
#26 0x00007ffff54a8278 in QCoreApplication::notifyInternal2 (receiver=0x555555bc10d0, event=0x555555c3f4d0) at kernel/qcoreapplication.cpp:1064
#27 0x00007ffff54ab5e4 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555555674320) at kernel/qcoreapplication.cpp:1821
#28 0x00007ffff54f9897 in postEventSourceDispatch (s=0x7fffc40047c0) at kernel/qeventdispatcher_glib.cpp:277
#29 0x00007ffff31d8cbf in g_main_dispatch (context=0x7fffc4000c30) at ../glib/gmain.c:3444
#30 g_main_context_dispatch (context=0x7fffc4000c30) at ../glib/gmain.c:4162
#31 0x00007ffff322e598 in g_main_context_iterate.constprop.0 (context=0x7fffc4000c30, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4238
#32 0x00007ffff31d5f40 in g_main_context_iteration (context=0x7fffc4000c30, may_block=1) at ../glib/gmain.c:4303
#33 0x00007ffff54f938a in QEventDispatcherGlib::processEvents (this=0x7fffc4000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#34 0x00007ffff54a6cca in QEventLoop::exec (this=this@entry=0x7fffd05fcbf0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#35 0x00007ffff52e71ca in QThread::exec (this=this@entry=0x555555bc10d0) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#36 0x00007ffff6b4b909 in QQmlThreadPrivate::run (this=0x555555bc10d0) at qml/ftw/qqmlthread.cpp:155
#37 0x00007ffff52e84f7 in QThreadPrivate::start (arg=0x555555bc10d0) at thread/qthread_unix.cpp:330
#38 0x00007ffff4cae14d in start_thread (arg=<optimized out>) at pthread_create.c:442
#39 0x00007ffff4d2fa00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Comment 1 Nate Graham 2024-09-30 21:34:27 UTC
What distr
Comment 2 Nate Graham 2024-09-30 21:34:39 UTC
*** Bug 478205 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2024-09-30 21:34:46 UTC
*** Bug 480317 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2024-09-30 21:35:00 UTC
*** Bug 493825 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2024-09-30 21:35:12 UTC
*** Bug 493789 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2024-09-30 21:35:30 UTC
*** Bug 491774 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-09-30 21:35:37 UTC
*** Bug 474112 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2024-09-30 21:35:49 UTC
*** Bug 492627 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2024-09-30 21:36:46 UTC
From duplicate reports, affected software includes Plasma, System Settings, and Merkuro.
Comment 10 TraceyC 2024-10-25 17:43:54 UTC
*** Bug 495044 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2025-03-05 20:35:18 UTC
*** Bug 501024 has been marked as a duplicate of this bug. ***
Comment 12 Matty R 2025-03-05 21:39:53 UTC
(In reply to Nate Graham from comment #11)
> *** Bug 501024 has been marked as a duplicate of this bug. ***

My bug report was resolved as a duplicate on this unresolved bug, that's been reported since DEC 2022. Just curious, has there been any progress listed elsewhere? I see are a number of other bugs marked as a duplicate, just not sure if there is something external that is also tracking this?
Comment 13 Nate Graham 2025-03-05 22:19:18 UTC
There's no progress listed elsewhere to my knowledge.
Comment 14 Justin Zobel 2025-03-05 23:21:17 UTC
(In reply to Nate Graham from comment #1)
> What distr

Sorry I missed this. I can't say exactly but it would have either been Solus or Fedora.
Comment 15 Nate Graham 2025-03-12 18:00:50 UTC
*** Bug 501386 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2025-03-13 04:35:24 UTC
*** Bug 501333 has been marked as a duplicate of this bug. ***
Comment 17 staroy25786 2025-03-14 12:39:57 UTC
(In reply to Justin Zobel from comment #14)
> (In reply to Nate Graham from comment #1)
> > What distr
> 
> Sorry I missed this. I can't say exactly but it would have either been Solus
> or Fedora.

I'm having this issue on Fedora, has anyone else had a similar issue on Solus?
Comment 18 TraceyC 2025-03-14 16:15:25 UTC
(In reply to staroy25786 from comment #17)
> I'm having this issue on Fedora, has anyone else had a similar issue on
> Solus?

Not to my knowledge. There isn't anything on the Solus bug tracker https://issues.getsol.us
I also haven't seen anyone complain about this in support channels, nor have I had this crash on my 2 Solus systems
Comment 19 Anton Valishin 2025-03-15 07:56:29 UTC
plasma-discover (fedora kinoite 41)

Thread 19 "QQmlThread" received signal SIGSEGV, Segmentation fault.
QQmlPropertyCacheCreator<QQmlTypeCompiler>::propertyCacheForObject (this=this@entry=0x7fff99e297c0, obj=obj@entry=0x7fff946757f8, context=..., 
    error=error@entry=0x7fff99e291b0) at /usr/src/debug/qt6-qtdeclarative-6.8.1-6.fc41.x86_64/src/qml/qml/qqmlpropertycachecreator_p.h:392
392             if (typeRef->isFullyDynamicType()) {


(gdb) print *obj
$3 = {inheritedTypeNameIndex = 88, idNameIndex = 0, id = -1, indexOfDefaultPropertyOrAlias = -1, defaultPropertyIsAlias = false, flags = 0, location = {m_data = {
      storage = {val = 37748971}}}, locationOfIdProperty = {m_data = {storage = {val = 0}}}, declarationsOverride = 0x0, functionsAndExpressions = 0x7fff94659cf8, 
  runtimeFunctionIndices = {data = 0x0, count = 0}, namedObjectsInComponent = {data = 0x0, count = 0}, properties = 0x7fff94659c68, aliases = 0x7fff94659c80, 
  qmlEnums = 0x7fff94659c98, qmlSignals = 0x7fff94659cb0, bindings = 0x7fff94659cc8, functions = 0x7fff94659ce0, inlineComponents = 0x7fff94659d10, 
  requiredPropertyExtraDatas = 0x7fff94659d28}

print objectContainer->stringAt(obj->inheritedTypeNameIndex)
$6 = {d = {d = 0x7fff9464dc40, ptr = 0x7fff9464dc50 u"QQC2.MenuSeparator", size = 18}, static _empty = 0 u'\000'}
Comment 20 TraceyC 2025-03-25 19:50:53 UTC
*** Bug 501923 has been marked as a duplicate of this bug. ***
Comment 21 TraceyC 2025-03-25 19:52:50 UTC
*** Bug 501717 has been marked as a duplicate of this bug. ***
Comment 22 staroy25786 2025-04-02 11:38:11 UTC
I wonder if this is some sort of packaging mishap on Fedora somehow (despite this happening on Ubuntu and OpenSUSE too)?
Comment 23 james.r.austin@gmail.com 2025-04-03 01:16:12 UTC
Created attachment 179952 [details]
attachment-3293581-0.html

Problem was in my home directory. Cleared .cache and plasmashell stopped
crashing, but various plasma components had visual issues. Notably dolphin
and systemsettings. Restored .local from a known working date and
everything was back to normal.

On Wed, Apr 2, 2025 at 7:19 AM <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=463648
>
> --- Comment #22 from staroy25786@nbss.nbed.nb.ca ---
> I wonder if this is some sort of packaging mishap on Fedora somehow
> (despite
> this happening on Ubuntu and OpenSUSE too)?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 24 TraceyC 2025-04-09 21:14:32 UTC
*** Bug 502606 has been marked as a duplicate of this bug. ***
Comment 25 Roke Julian Lockhart Beedell 2025-05-06 10:58:32 UTC
> | What      | Removed                 | Added                |
> |-----------|-------------------------|----------------------|
> | Component | general                 | Spam                 |
> | CC        |                         | klybymtb38@gmail.com |
> | Product   | kde                     | Spam                 |

I presume that this being refiled as spam is itself an act by a spammer?
Comment 26 Nate Graham 2025-05-06 13:38:44 UTC
Yes indeed; thanks for correcting it!

In the future please also report spammers' email addresses using a sysadmin ticket (https://phabricator.kde.org/maniphest/task/edit/form/2/) so their account can be deleted. I've done that this time.
Comment 27 Roke Julian Lockhart Beedell 2025-05-06 14:59:51 UTC
(In reply to Nate Graham from comment #26)

> Yes indeed; thanks for correcting it!

...I hadn't yet, but I've at least set it as untriaged now, as it was beforehand.
Comment 28 Ben Cooksley 2025-05-07 11:12:23 UTC
I wasn't able to detect any spam on this bug aside from the vandalism of reassigning this to Spam.
The offending user account has now been blocked.
Comment 29 cwo 2025-05-11 20:07:54 UTC
*** Bug 504034 has been marked as a duplicate of this bug. ***
Comment 30 Eugene Savitsky 2025-05-11 21:19:22 UTC
Renaming .cache folder fixed the crashing for me (bug 504034).

Should I try to localize the affecting folder in the /.cache?
Comment 31 Nate Graham 2025-05-12 13:43:49 UTC
If you could, that would be very very helpful!
Comment 32 Eugene Savitsky 2025-05-13 05:12:34 UTC
Created attachment 181232 [details]
cache file

Narrowed down to this file. Deleting it makes the crash go away.
Comment 33 Eugene Savitsky 2025-05-13 05:14:44 UTC
BTW It is located in /home/xxxxxx/.cache/plasmashell/qmlcache/
Comment 34 Nate Graham 2025-05-13 15:41:02 UTC
Thank you! That's extremely valuable information.
Comment 35 Harald Sitter 2025-05-13 16:55:49 UTC
Please copy the cache back into place and grab the output when starting plasmashell like so:

QT_LOGGING_RULES=qt.qml.diskcache*=true plasmashell --replace

the output of `kinfo` would also be good
Comment 36 Eugene Savitsky 2025-05-14 08:38:44 UTC
(In reply to Harald Sitter from comment #35)
> Please copy the cache back into place and grab the output when starting
> plasmashell like so:
> 
> QT_LOGGING_RULES=qt.qml.diskcache*=true plasmashell --replace
> 
> the output of `kinfo` would also be good

Could you please make step-by-step guide? I'm just a normal user, not a coder. :)

1. Place back the cache file - OK
2. Log out from Plasma - OK
3. Log in to Plasma - OK
4. Then I immediately get a crash, but I have a terminal window open, so I can run commands.
5. run in terminal QT_LOGGING_RULES=qt.qml.diskcache*=true plasmashell --replace
6. Then I have to run plasmashell manually? By typing plasmashell command?
7. Then run kinfo?
Comment 37 Eugene Savitsky 2025-05-14 09:12:07 UTC
1. OK, I got it myself :)

2. For some reason the cache file today was not affecting the system and there was no crash copying it back... :-/

3. But I test Linux with Tumbleweed, that has "Time Machine", so I can go back any time.

4. ~> QT_LOGGING_RULES=qt.qml.diskcache*=true plasmashell --replace
kf.plasma.quick: Applet preload policy set to 1
qt.qml.diskcache: Checksum mismatch for cached version of "file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml"
KCrash: Attempting to start /usr/bin/plasmashell
KCrash: Application 'plasmashell' crashing... crashRecursionCounter = 2
Segmentation fault (core dumped)
kf.plasma.quick: Applet preload policy set to 1
qt.qml.diskcache: Checksum mismatch for cached version of "file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml"
KCrash: Attempting to start /usr/bin/plasmashell
KCrash: Application 'plasmashell' crashing... crashRecursionCounter = 2
kf.plasma.quick: Applet preload policy set to 1
qt.qml.diskcache: Checksum mismatch for cached version of "file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml"

And it attempts to start plasmashell forever...

~> kinfo
Operating System: openSUSE Tumbleweed 20250417
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5825U with Radeon Graphics
Memory: 16 GiB of RAM (14.5 GiB usable)
Graphics Processor: llvmpipe

5. I use the Icons + Text vertical panel, if that may help.
Comment 38 Harald Sitter 2025-05-14 14:34:40 UTC
I can confirm the crash by installing tumbleweed, having bluetooth, and adjusting the timestamp of file:///usr/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/Toolbar.qml to be the one in the cache file.

https://bugreports.qt.io/browse/QTBUG-136810
Comment 39 Nate Graham 2025-05-14 17:41:48 UTC
Thanks a ton for nailing that down, Harald!
Comment 40 Nate Graham 2025-05-28 02:31:00 UTC
Now fixed upstream in Qt 6.8.4 & 6.9.2, thanks to Ulf Hermann!
Comment 41 TraceyC 2025-05-28 18:58:54 UTC
*** Bug 504933 has been marked as a duplicate of this bug. ***
Comment 42 cwo 2025-06-01 09:01:52 UTC
*** Bug 505076 has been marked as a duplicate of this bug. ***