Sudden QML system issues not solved by reinstall
-
Hi all,
I am developing a QML application on Arch Linux, using the system-provided qt6 packages.
During development, at some point, after a crash of my application, I was suddenly unable to start it correctly anymore due to what seems like QML system issues (described below). Interestingly, this was not caused by any code change nor any change to the Qt installation itself.
The issues I am seeing since then:
- "QtObject is not a type", referring to the QtObject object type which I thought was pretty fundamental to Qt Quick;
- "Non-existent attached object", referring to a qml line using "Component.onCompleted:" - suggesting the "Component" attached object does not exist.
Yes, I did properly import QtQuick in each QML file.
Interestingly, the exact same codebase runs fine when built:
- in a docker container with its own Qt library installation;
- in another Arch Linux system which has the exact same Qt packages installed.
Even previous versions of my application, which worked fine before, now run into these issues on the affected system.
I tried:
- reinstalling qt packages
- deleting "~/.cache/(my app)" to clear QML cache
- rebooting
- running with QML_DISK_CACHE=""
I tried reducing to a minimal example, but unfortunately, simple minimal QML apps seem to work fine.
Does anyone have any suggestion about any "stateful" aspects of the Qt / QtQuick installation which may be needing to be cleared in order to solve this issue?
Thanks and kind regards,
Sander
-
Hi,
I haven't used Arch yet so it might be a silly question but are you sure your reinstalled all Qt packages ? i.e. libs + development packages ?
-
Hi,
I haven't used Arch yet so it might be a silly question but are you sure your reinstalled all Qt packages ? i.e. libs + development packages ?
@SGaist Thanks for your response! I reinstalled any and every "qt6-*" package on my system:
qt6-5compat 6.9.1-1
qt6-base 6.9.1-5
qt6-charts 6.9.1-1
qt6-declarative 6.9.1-2
qt6-graphs 6.9.1-1
qt6-imageformats 6.9.1-1
qt6-location 6.9.1-1
qt6-multimedia 6.9.1-1
qt6-multimedia-ffmpeg 6.9.1-1
qt6-networkauth 6.9.1-1
qt6-positioning 6.9.1-1
qt6-quick3d 6.9.1-2
qt6-quicktimeline 6.9.1-1
qt6-scxml 6.9.1-1
qt6-sensors 6.9.1-1
qt6-serialport 6.9.1-1
qt6-shadertools 6.9.1-1
qt6-speech 6.9.1-1
qt6-svg 6.9.1-1
qt6-tools 6.9.1-2
qt6-translations 6.9.1-1
qt6-virtualkeyboard 6.9.1-1
qt6-wayland 6.9.1-1
qt6-webchannel 6.9.1-1
qt6-webengine 6.9.1-2
qt6-websockets 6.9.1-1
qt6-webview 6.9.1-1In practice, I would expect the most important one for this issue to be qt6-declarative (QML + Quick).
-
The list looks good... Can you check if there are versions that differs from the other computer you tested ?
-
The versions are equal on the other system. And, as I originally posted, the issue appeared suddenly - not after an upgrade of any of these packages.
I would be thinking about a uninstall -> reinstall instead of reinstalling "in-place" - but that is a bit tricky as the entire KDE desktop depends on these packages.
Next test I will try is to install the Qt packages into a non-standard directory and try to load them from there, using the same project workdir.
-
Hi all,
I am developing a QML application on Arch Linux, using the system-provided qt6 packages.
During development, at some point, after a crash of my application, I was suddenly unable to start it correctly anymore due to what seems like QML system issues (described below). Interestingly, this was not caused by any code change nor any change to the Qt installation itself.
The issues I am seeing since then:
- "QtObject is not a type", referring to the QtObject object type which I thought was pretty fundamental to Qt Quick;
- "Non-existent attached object", referring to a qml line using "Component.onCompleted:" - suggesting the "Component" attached object does not exist.
Yes, I did properly import QtQuick in each QML file.
Interestingly, the exact same codebase runs fine when built:
- in a docker container with its own Qt library installation;
- in another Arch Linux system which has the exact same Qt packages installed.
Even previous versions of my application, which worked fine before, now run into these issues on the affected system.
I tried:
- reinstalling qt packages
- deleting "~/.cache/(my app)" to clear QML cache
- rebooting
- running with QML_DISK_CACHE=""
I tried reducing to a minimal example, but unfortunately, simple minimal QML apps seem to work fine.
Does anyone have any suggestion about any "stateful" aspects of the Qt / QtQuick installation which may be needing to be cleared in order to solve this issue?
Thanks and kind regards,
Sander
@SanderVc said in Sudden QML system issues not solved by reinstall:
The issues I am seeing since then:
"QtObject is not a type", referring to the QtObject object type which I thought was pretty fundamental to Qt Quick; "Non-existent attached object", referring to a qml line using "Component.onCompleted:" - suggesting the "Component" attached object does not exist.
Do you see those when trying to run your application? Or when trying to edit your application in Qt Creator? (Knowing the difference is important, because they have very different root causes)