Bug 511150 - Assert when selecting new virtual output in screen sharing dialog
Summary: Assert when selecting new virtual output in screen sharing dialog
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.5.0
Platform: Other Linux
: HI crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-10-26 11:22 UTC by Błażej Szczygieł
Modified: 2025-10-30 18:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.2
Sentry Crash Report:


Attachments
Backtrace (6.15 KB, text/plain)
2025-10-26 11:22 UTC, Błażej Szczygieł
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Błażej Szczygieł 2025-10-26 11:22:58 UTC
Created attachment 186180 [details]
Backtrace

SUMMARY
Kwin asserts in qSaturateRound when selecting new virtual output in screen sharing dialog.

STEPS TO REPRODUCE
1. Compile Kwin with Qt asserts enabled.
2. Open screen sharing dialog in OBS.
3. Select new virtual output.
4. Repeat it a few times.

OBSERVED RESULT
Kwin asserts, attached backtrace.

EXPECTED RESULT
No assert.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.5.0-git (585c6f80ec47e844e349e348836018b1617cc610)
KDE Frameworks Version: 6.19
Qt Version: 6.10.0
Comment 1 Nicolas Fella 2025-10-27 18:25:51 UTC
#0  0x00007efdaf09894c in ??? () at /usr/lib/libc.so.6
#1  0x00007efdaf03e410 in raise () at /usr/lib/libc.so.6
#2  0x00007efdaf02557a in abort () at /usr/lib/libc.so.6
#3  0x00007efdaf89348c in ??? () at /usr/lib/libQt6Core.so.6
#4  0x00007efdaf894250 in QMessageLogger::fatal(char const*, ...) const () at /usr/lib/libQt6Core.so.6
#5  0x00007efdaf891918 in qt_assert(char const*, char const*, int) () at /usr/lib/libQt6Core.so.6
#6  0x00007efdb2d7c202 in qSaturateRound<double, true> (value=-nan(0x8000000000000)) at /usr/include/qt6/QtCore/qnumeric.h:554
#7  0x00007efdb2d8bdaa in QPointF::toPoint (this=0x7fffd85dcc00) at /usr/include/qt6/QtCore/qpoint.h:420
#8  0x00007efdb312fd03 in KWin::Scene::addRepaint (this=0x7efda001a410, region=...) at /home/user/Desktop/kwin-pkg/src/kwin/src/scene/scene.cpp:546
#9  0x00007efdb2e97ce1 in KWin::EffectsHandler::addRepaint (this=0x55e9bb95b370, r=...) at /home/user/Desktop/kwin-pkg/src/kwin/src/effect/effecthandler.cpp:1065
#10 0x000055e99bf6bfaa in KWin::StartupFeedbackEffect::postPaintScreen (this=0x55e9bb9950a0) at /home/user/Desktop/kwin-pkg/src/kwin/src/plugins/startupfeedback/startupfeedback.cpp:254
#11 0x00007efdb2e94d16 in KWin::EffectsHandler::postPaintScreen (this=0x55e9bb95b370) at /home/user/Desktop/kwin-pkg/src/kwin/src/effect/effecthandler.cpp:379
#12 0x00007efdb2e8b07b in KWin::Effect::postPaintScreen (this=0x55e9bba6c1c0) at /home/user/Desktop/kwin-pkg/src/kwin/src/effect/effect.cpp:388
#13 0x00007efdb2e94d16 in KWin::EffectsHandler::postPaintScreen (this=0x55e9bb95b370) at /home/user/Desktop/kwin-pkg/src/kwin/src/effect/effecthandler.cpp:379
#14 0x00007efdb315c5f5 in KWin::WorkspaceScene::postPaint (this=0x7efda001a410) at /home/user/Desktop/kwin-pkg/src/kwin/src/scene/workspacescene.cpp:590
#15 0x00007efdb312d41d in KWin::SceneView::postPaint (this=0x55e9bbafb6e0) at /home/user/Desktop/kwin-pkg/src/kwin/src/scene/scene.cpp:120
#16 0x00007efdb2d60846 in KWin::Compositor::composite (this=0x55e9bad568b0, renderLoop=0x55e9bab52bd0) at /home/user/Desktop/kwin-pkg/src/kwin/src/compositor.cpp:915
#17 0x00007efdb2d5e57d in KWin::Compositor::handleFrameRequested (this=0x55e9bad568b0, renderLoop=0x55e9bab52bd0) at /home/user/Desktop/kwin-pkg/src/kwin/src/compositor.cpp:103
#18 0x00007efdb2d8e117 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<KWin::RenderLoop*>, void, void (KWin::Compositor::*)(KWin::RenderLoop*)>::call(void (KWin::Compositor::*)(KWin::RenderLoop*), KWin::Compositor*, void**)::{lambda()#1}::operator()() const (this=0x7fffd85dd9b0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:127
#19 0x00007efdb2d8e099 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<KWin::RenderLoop*>, void, void (KWin::Compositor::*)(KWin::RenderLoop*)>::call(void (KWin::Compositor::*)(KWin::RenderLoop*), KWin::Compositor*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<KWin::RenderLoop*>, void, void (KWin::Compositor::*)(KWin::RenderLoop*)>::call(void (KWin::Compositor::*)(KWin::RenderLoop*), KWin::Compositor*, void**)::{lambda()#1}&&) (args=0x7fffd85ddbc0, fn=...) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:65
#20 0x00007efdb2d8e063 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<KWin::RenderLoop*>, void, void (KWin::Compositor::*)(KWin::RenderLoop*)>::call (f=(void (KWin::Compositor::*)(class KWin::Compositor * const, class KWin::RenderLoop *)) 0x7efdb2d5e560 <KWin::Compositor::handleFrameRequested(KWin::RenderLoop*)>, o=0x55e9bad568b0, arg=0x7fffd85ddbc0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:126
#21 0x00007efdb2d8dfdd in QtPrivate::FunctionPointer<void (KWin::Compositor::*)(KWin::RenderLoop*)>::call<QtPrivate::List<KWin::RenderLoop*>, void> (f=(void (KWin::Compositor::*)(class KWin::Compositor * const, class KWin::RenderLoop *)) 0x7efdb2d5e560 <KWin::Compositor::handleFrameRequested(KWin::RenderLoop*)>, o=0x55e9bad568b0, arg=0x7fffd85ddbc0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:174
#22 0x00007efdb2d8df06 in QtPrivate::QCallableObject<void (KWin::Compositor::*)(KWin::RenderLoop*), QtPrivate::List<KWin::RenderLoop*>, void>::impl (which=1, this_=0x55e9bbb67780, r=0x55e9bad568b0, a=0x7fffd85ddbc0, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:545
#23 0x00007efdaf9d716f in ??? () at /usr/lib/libQt6Core.so.6
#24 0x00007efdb2de1a4c in QMetaObject::activate<void, KWin::RenderLoop*> (sender=0x55e9bab52bd0, mo=0x7efdb3c91e68 <KWin::RenderLoop::staticMetaObject>, local_signal_index=2, ret=0x0, args=@0x7fffd85ddc00: 0x55e9bab52bd0) at /usr/include/qt6/QtCore/qobjectdefs.h:319
#25 0x00007efdb2ddfdda in KWin::RenderLoop::frameRequested (this=0x55e9bab52bd0, _t1=0x55e9bab52bd0) at src/kwin_autogen/include/moc_renderloop.cpp:171
#26 0x00007efdb2ddfb2b in KWin::RenderLoopPrivate::dispatch (this=0x55e9baba6020) at /home/user/Desktop/kwin-pkg/src/kwin/src/core/renderloop.cpp:190
#27 0x00007efdb2ddfa9a in KWin::RenderLoop::timerEvent (this=0x55e9bab52bd0, event=0x7fffd85dddf0) at /home/user/Desktop/kwin-pkg/src/kwin/src/core/renderloop.cpp:179
#28 0x00007efdaf9c44f6 in QObject::event(QEvent*) () at /usr/lib/libQt6Core.so.6
#29 0x00007efdb0d020a0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
#30 0x00007efdaf96a6c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
#31 0x00007efdafb2c6af in QTimerInfoList::activateTimers() () at /usr/lib/libQt6Core.so.6
#32 0x00007efdafb2f901 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#33 0x00007efdb0934773 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Gui.so.6
#34 0x00007efdaf975a86 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#35 0x00007efdaf96f171 in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
#36 0x000055e99be8e06e in main (argc=14, argv=0x7fffd85dfbb8) at /home/user/Desktop/kwin-pkg/src/kwin/src/main_wayland.cpp:635
Comment 2 Nate Graham 2025-10-27 20:31:48 UTC
Dig it work properly in 6.4.5?
Comment 3 Błażej Szczygieł 2025-10-28 17:08:51 UTC
> Dig it work properly in 6.4.5?

Can't reproduce on 6.4.5.
Comment 4 Zamundaaa 2025-10-29 14:37:09 UTC
Can confirm, though here it doesn't crash until I close OBS again.

gdb shows that the viewport coordinate it's rounding is -nan, so that's quite odd.
Comment 5 Zamundaaa 2025-10-29 15:44:31 UTC
https://invent.kde.org/plasma/kwin/-/merge_requests/8327 fixes it for me
Comment 6 Zamundaaa 2025-10-29 21:07:55 UTC
Git commit 75476e2230c84f1241c535fa8c1275543f2c10f6 by Xaver Hugl.
Committed on 29/10/2025 at 20:19.
Pushed by zamundaaa into branch 'master'.

plugins/screencast: on close, reset screencast sources instead of just pausing

As the screencast being closed may also trigger the virtual output to be
removed, keeping the source around can cause crashes, as the source contains
output layers for that virtual output.

M  +1    -1    src/plugins/screencast/screencaststream.cpp

https://invent.kde.org/plasma/kwin/-/commit/75476e2230c84f1241c535fa8c1275543f2c10f6
Comment 7 Zamundaaa 2025-10-30 15:02:03 UTC
Git commit 07a42c895d868acd0bed55b6ddac87d464655719 by Xaver Hugl.
Committed on 30/10/2025 at 13:59.
Pushed by zamundaaa into branch 'Plasma/6.5'.

plugins/screencast: on close, reset screencast sources instead of just pausing

As the screencast being closed may also trigger the virtual output to be
removed, keeping the source around can cause crashes, as the source contains
output layers for that virtual output.
(cherry picked from commit 75476e2230c84f1241c535fa8c1275543f2c10f6)

M  +1    -1    src/plugins/screencast/screencaststream.cpp

https://invent.kde.org/plasma/kwin/-/commit/07a42c895d868acd0bed55b6ddac87d464655719