https://bugs.kde.org/show_bug.cgi?id=528978

            Bug ID: 528978
           Summary: Discover freezes with 100% CPU (QML polish loop in
                    QQuickGridLayoutBase / QQuickText) after installing a
                    package depending on localized description text length
    Classification: Applications
           Product: Discover
      Version First 6.7.4
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: discover
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

### Summary
After installing certain APT packages via PackageKit (specifically reproducible
with Debian's `mtpaint` package under a German locale), Discover completely
freezes on the application page with 100% single-core CPU load right when the
button transitions from "Loading..." ("Wird geladen") to the post-install state
("Launch" / "Remove").

PackageKit finishes the transaction cleanly (`emitting finished 'success'`,
daemon goes idle), and removing the package via Discover works without issues.
Running Discover with `LC_ALL=C` completely avoids the freeze, confirming this
is a QML layout polish/reflow loop triggered by the localized package summary
string length in the header `GridLayout` under Qt 6.11.2.

### Steps to Reproduce
1. Run Discover under a German locale (`de_DE.UTF-8`) on Debian Sid / siduction
with Plasma 6.7.4 and Qt 6.11.2.
2. Ensure `mtpaint` (`3.50.14-1`, which has no AppStream metadata and falls
back to APT `Description-de`: *"Malprogramm zum Erstellen von Pixelgrafiken und
zum Bearbeiten von Digitalfotos"*) is not installed.
3. Open Discover, navigate to the `mtpaint` application page, and click
**Install**.
4. Wait for PackageKit to finish installing the package.

### Observed Result
- `packagekitd` completes the installation and becomes idle.
- Discover's button stays stuck on "Wird geladen" ("Loading...") and the UI
freezes completely with 100% CPU usage on the main thread.
- Resizing the main Discover window does not break the loop.
- Interestingly, if `mtpaint` is uninstalled within an already running Discover
session and reinstalled without restarting Discover, the freeze does not occur
— it only triggers on a fresh Discover instance.

### Expected Result
Discover updates the application header state to show the "Launch" and "Remove"
buttons without entering an infinite QML layout polish loop.

### Workaround / Localization Proof
Running Discover with `LC_ALL=C plasma-discover` uses the shorter English
`Description-en` (*"painting program to create pixel art and manipulate digital
photos"*) instead of `Description-de`, and the installation completes cleanly
without any UI freeze.

### Stacktrace (Main Thread during 100% CPU freeze via `eu-stack`)
```text
PID 46372 - process
TID 46372:
#0  0x00007f4a5f0bdd64 operator new(unsigned long)
#1  0x00007f4a610b1a5d QQuickTextPrivate::setupTextLayout(double*)
#2  0x00007f4a610b1e97 QQuickTextPrivate::updateSize()
#3  0x00007f4a610be885 QQuickText::geometryChange(QRectF const&, QRectF const&)
#4  0x00007f4a5d14adfe QQuickLabel::geometryChange(QRectF const&, QRectF
const&)
#5  0x00007f4a6104b85f QQuickItem::setSize(QSizeF const&)
#6  0x00007f4a2bfc1717
#7  0x00007f4a601610c7 QGridLayoutEngine::setGeometries(QRectF const&,
QAbstractLayoutStyleInfo const*)
#8  0x00007f4a2bfc617a QQuickGridLayoutBase::rearrange(QSizeF const&)
#9  0x00007f4a2bfc187c
#10 0x00007f4a601610c7 QGridLayoutEngine::setGeometries(QRectF const&,
QAbstractLayoutStyleInfo const*)
#11 0x00007f4a2bfc617a QQuickGridLayoutBase::rearrange(QSizeF const&)
#12 0x00007f4a2bfc187c
#13 0x00007f4a601610c7 QGridLayoutEngine::setGeometries(QRectF const&,
QAbstractLayoutStyleInfo const*)
#14 0x00007f4a2bfc617a QQuickGridLayoutBase::rearrange(QSizeF const&)
#15 0x00007f4a2bfc10d5 QQuickLayout::geometryChange(QRectF const&, QRectF
const&)
#16 0x00007f4a6104a71e QQuickItem::setPosition(QPointF const&)
#17 0x00007f4a2bfc1690
#18 0x00007f4a601610c7 QGridLayoutEngine::setGeometries(QRectF const&,
QAbstractLayoutStyleInfo const*)
#19 0x00007f4a2bfc617a QQuickGridLayoutBase::rearrange(QSizeF const&)
#20 0x00007f4a2bfc034c QQuickLayout::updatePolish()
#21 0x00007f4a61110ea5 QQuickWindowPrivate::polishItems()
#22 0x00007f4a613713b1
#23 0x00007f4a61117fb1 QQuickWindow::event(QEvent*)
#24 0x00007f4a619be16a QApplicationPrivate::notify_helper(QObject*, QEvent*)
#25 0x00007f4a5f5cb868 QCoreApplication::notifyInternal2(QObject*, QEvent*)
#26 0x00007f4a5fe52772 QPlatformWindow::deliverUpdateRequest()
#27 0x00007f4a5f61e4a6 QObject::event(QEvent*)
#28 0x00007f4a619be16a QApplicationPrivate::notify_helper(QObject*, QEvent*)
#29 0x00007f4a5f5cb868 QCoreApplication::notifyInternal2(QObject*, QEvent*)
#30 0x00007f4a5f5cbaf9 QCoreApplicationPrivate::sendPostedEvents(QObject*, int,
QThreadData*)
#31 0x00007f4a5f87ee67
#32 0x00007f4a5e1abe97
#33 0x00007f4a5e1af60f
#34 0x00007f4a5e1aff00 g_main_context_iteration
#35 0x00007f4a5f87c158
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#36 0x00007f4a5f5d7b6a QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#37 0x00007f4a5f5ce84e QCoreApplication::exec()
#38 0x000056293a9505a1
#39 0x00007f4a5ee33fba __libc_start_call_main
#40 0x00007f4a5ee340d7 __libc_start_main@@GLIBC_2.34
#41 0x000056293a950af1

System Information

    - OS: siduction 22.1.0 (Debian Sid)
    - KDE Plasma Version: 6.7.4
    - KDE Frameworks Version: 6.32.0
    - Qt Version: 6.11.2
    - Kernel Version: 7.4-rc3-siduction-amd64 (64-bit)
    - Graphics Platform: Wayland
    - GPU: AMD Radeon RX 9060 XT

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to