Bug 488112 - kwin_x11 crashed at KWin::OutputFrame::queryRenderTime() when changing global themes
Summary: kwin_x11 crashed at KWin::OutputFrame::queryRenderTime() when changing global...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-06-06 14:04 UTC by Fushan Wen
Modified: 2024-06-08 02:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2024-06-06 14:04:08 UTC
SUMMARY
When I changed the global theme from Breeze Twilight to Breeze, kwin_x11 unexpectedly crashed.

STEPS TO REPRODUCE
1. Open kcm_lookandfeel
2. Change the current global theme

OBSERVED RESULT
kwin_x11 crashed

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.1.80 (kwin at https://invent.kde.org/plasma/kwin/-/commit/cadf16b12e10c591b746d6f8228a16ec0101362b)
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
(gdb) bt
#0  0x00007fddc94949dc in __pthread_kill_implementation () at /lib64/libc.so.6
#1  0x00007fddc9441176 in raise () at /lib64/libc.so.6
#2  0x00007fddcd1b4c03 in KCrash::defaultCrashHandler(int) () at /lib64/libKF6Crash.so.6
#3  0x00007fddc9441240 in <signal handler called> () at /lib64/libc.so.6
#4  0x00007fddcca5716a in __gnu_cxx::__normal_iterator<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> > const*, std::vector<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> >, std::allocator<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> > > > >::__normal_iterator(std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> > const* const&) (__i=<optimized out>, this=<optimized out>)
    at /usr/include/c++/13/bits/stl_iterator.h:1077
#5  std::vector<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> >, std::allocator<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> > > >::begin() const (this=<optimized out>) at /usr/include/c++/13/bits/stl_vector.h:884
#6  std::vector<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> >, std::allocator<std::unique_ptr<KWin::RenderTimeQuery, std::default_delete<KWin::RenderTimeQuery> > > >::empty() const (this=<optimized out>) at /usr/include/c++/13/bits/stl_vector.h:1089
#7  KWin::OutputFrame::queryRenderTime() const (this=this@entry=0x0)
    at /usr/src/debug/kwin-6.0.90git.20240603T145440~cadf16b1/src/core/renderbackend.cpp:69
#8  0x00007fddcca5ac3a in KWin::OutputFrame::presented(std::chrono::duration<long, std::ratio<1l, 1000000000l> >, KWin::PresentationMode)
    (this=0x0, timestamp=std::chrono::duration = { <optimized out>ns }, mode=KWin::PresentationMode::VSync) at /usr/src/debug/kwin-6.0.90git.20240603T145440~cadf16b1/src/core/renderbackend.cpp:89
#9  0x0000559f59e0bdd4 in  ()
#10 0x00007fddccb2141e in KWin::Application::dispatchEvent(xcb_generic_event_t*)
    (this=<optimized out>, event=0x7fddb808d0f0)
    at /usr/src/debug/kwin-6.0.90git.20240603T145440~cadf16b1/src/main.cpp:526
#11 0x00007fddc9d8c5ef in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long long*) (this=<optimized out>, eventType=..., message=message@entry=0x7fddb808d0f0, result=result@entry=0x7ffc437edb18) at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/corelib/kernel/qabstracteventdispatcher.cpp:432
#12 0x00007fddc5171066 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*)
    (this=0x559f8fc91260, event=0x7fddb808d0f0)
    at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/plugins/platforms/xcb/qxcbconnection.cpp:540
#13 0x00007fddc5178fbe in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=0x559f8fc91260, flags=...)
    at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/plugins/platforms/xcb/qxcbconnection.cpp:1087
#14 0x00007fddc5190f73 in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>)
    at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:55
#15 0x00007fddc8d12740 in  () at /lib64/libglib-2.0.so.0
#16 0x00007fddc8d14388 in  () at /lib64/libglib-2.0.so.0
#17 0x00007fddc8d14a3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#18 0x00007fddc9fc147c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=0x559f8fcf34f0, flags=...)
    at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#19 0x00007fddc9d9959b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=0x7ffc437edea0, flags=...)
    at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/corelib/global/qflags.h:34
#20 0x00007fddc9d92da6 in QCoreApplication::exec() ()
    at /usr/src/debug/qtbase-everywhere-src-6.7.1/src/corelib/global/qflags.h:74
#21 0x0000559f59dfbf6f in  ()
#22 0x00007fddc942a1f0 in __libc_start_call_main () at /lib64/libc.so.6
#23 0x00007fddc942a2b9 in __libc_start_main_impl () at /lib64/libc.so.6
#24 0x0000559f59dffca5 in  ()
Comment 1 Bug Janitor Service 2024-06-06 14:52:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5845
Comment 2 Zamundaaa 2024-06-06 17:15:35 UTC
Git commit 3bf97e87e5adc79cf5a798bf23dec1e195803118 by Xaver Hugl.
Committed on 06/06/2024 at 16:54.
Pushed by zamundaaa into branch 'master'.

backends/x11/standalone: add a nullptr check in the vblank handler

It can be called without a previous presentation in some cases

M  +4    -2    src/backends/x11/standalone/x11_standalone_glx_backend.cpp

https://invent.kde.org/plasma/kwin/-/commit/3bf97e87e5adc79cf5a798bf23dec1e195803118
Comment 3 Zamundaaa 2024-06-07 01:01:21 UTC
Git commit 5db1cae615b177d58b065276e81da0993af0ed6e by Xaver Hugl.
Committed on 07/06/2024 at 00:44.
Pushed by zamundaaa into branch 'Plasma/6.1'.

backends/x11/standalone: add a nullptr check in the vblank handler

It can be called without a previous presentation in some cases


(cherry picked from commit 3bf97e87e5adc79cf5a798bf23dec1e195803118)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +4    -2    src/backends/x11/standalone/x11_standalone_glx_backend.cpp

https://invent.kde.org/plasma/kwin/-/commit/5db1cae615b177d58b065276e81da0993af0ed6e