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

--- Comment #23 from Bernd Steinhauser <[email protected]> ---
Ok, I did some investigating with Claude Opus 5 and was able to find the root
cause of the crash. Here's a brief summary of what happens:

Dialog::event() tests the drag position against the main item in QPointF space,
but sends the corrected position back to itself as an integer QPoint. When the
item rect has fractional edges, the rounding undoes the clamp, so the corrected
point equals the original, the containment test fails again, and the event is
re-sent forever. plasmashell dies of stack exhaustion after ~17,400 iterations.
>From the core: main item y=9.9999895, height=1146.0000005 → bottom=1155.99999;
tested point y=1156. qBound() returned 1155.99999, toPoint() rounded it back to
1156.
The fractional edges are floating point error in the background margins and
item size, not display scaling — reproduced with all outputs at 100%.
Clamping to integer bounds inside the rect fixes it; tested locally on 6.7.4,
no longer crashes.

I'll attach the backtrace and two patches as suggested by Claude. I tested with
those applied and it no longer crashes, I can add a widget (e.g. a launcher) to
the taskbar. The first patch implements the ceil/floor to round to the next
integer, which fixes the actual problem. The second patch isn't strictly
necessary to fix this bug, but it should prevent the endless loop if a similar
problem came up.

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

Reply via email to