Bug 464990 - KWin crashes in KWin::GLTexture::bind
Summary: KWin crashes in KWin::GLTexture::bind
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-29 16:28 UTC by Nicolas Fella
Modified: 2023-06-12 11:07 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2023-01-29 16:28:54 UTC
I was running the KTextEditor test suite with "export QT_QPA_PLATFORM=xcb"

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f3a22aafec3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f3a22a5fa76 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f3a22a497fc in __GI_abort () at abort.c:79
#4  0x00007f3a24698b75 in qt_message_fatal (message=<synthetic pointer>..., context=<optimized out>) at global/qlogging.cpp:1914
#5  QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7ffc27240fb0, msg=msg@entry=0x7f3a2498b048 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:893
#6  0x00007f3a24697ff5 in qt_assert(char const*, char const*, int) (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:3391
#7  0x00007f3a26e85125 in KWin::GLTexture::bind() (this=0x2b509b0) at /home/nico/kde/src/kwin/src/libkwineffects/kwingltexture.cpp:449
#8  0x00007f3a26e83e8a in KWin::GLTexture::GLTexture(unsigned int, int, int, int, bool) (this=0x2b509b0, internalFormat=32856, width=512, height=47, levels=1, needsMutability=false)
    at /home/nico/kde/src/kwin/src/libkwineffects/kwingltexture.cpp:209
#9  0x00007f3a26672b0d in KWin::SceneOpenGLDecorationRenderer::resizeTexture() (this=0x41eb760) at /home/nico/kde/src/kwin/src/scene/workspacescene_opengl.cpp:461
#10 0x00007f3a26671c07 in KWin::SceneOpenGLDecorationRenderer::render(QRegion const&) (this=0x41eb760, region=...) at /home/nico/kde/src/kwin/src/scene/workspacescene_opengl.cpp:333
#11 0x00007f3a2664690d in KWin::DecorationItem::preprocess() (this=0x39e7480) at /home/nico/kde/src/kwin/src/scene/decorationitem.cpp:172
#12 0x00007f3a26646be8 in KWin::DecorationItem::handleWindowClosed(KWin::Window*, KWin::Deleted*) (this=0x39e7480, original=0x24e7170, deleted=0x4b82160) at /home/nico/kde/src/kwin/src/scene/decorationitem.cpp:210
#13 0x00007f3a266497a9 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<KWin::Window*, KWin::Deleted*>, void, void (KWin::DecorationItem::*)(KWin::Window*, KWin::Deleted*)>::call(void (KWin::DecorationItem::*)(KWin::Window*, KWin::Deleted*), KWin::DecorationItem*, void**)
     (f=(void (KWin::DecorationItem::*)(class KWin::DecorationItem * const, class KWin::Window *, class KWin::Deleted *)) 0x7f3a26646bae <KWin::DecorationItem::handleWindowClosed(KWin::Window*, KWin::Deleted*)>, o=0x39e7480, arg=0x7ffc27241510) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:152
#14 0x00007f3a266494d5 in QtPrivate::FunctionPointer<void (KWin::DecorationItem::*)(KWin::Window*, KWin::Deleted*)>::call<QtPrivate::List<KWin::Window*, KWin::Deleted*>, void>(void (KWin::DecorationItem::*)(KWin::Window*, KWin::Deleted*), KWin::DecorationItem*, void**)
     (f=(void (KWin::DecorationItem::*)(class KWin::DecorationItem * const, class KWin::Window *, class KWin::Deleted *)) 0x7f3a26646bae <KWin::DecorationItem::handleWindowClosed(KWin::Window*, KWin::Deleted*)>, o=0x39e7480, arg=0x7ffc27241510) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:185
#15 0x00007f3a26649069 in QtPrivate::QSlotObject<void (KWin::DecorationItem::*)(KWin::Window*, KWin::Deleted*), QtPrivate::List<KWin::Window*, KWin::Deleted*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x235d580, r=0x39e7480, a=0x7ffc27241510, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:418
#16 0x00007f3a248e7ab2 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc27241510, r=0x39e7480, this=0x235d580) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#17 doActivate<false>(QObject*, int, void**) (sender=0x24e7170, signal_index=10, argv=0x7ffc27241510) at kernel/qobject.cpp:3923
#18 0x00007f3a2674207a in KWin::Window::windowClosed(KWin::Window*, KWin::Deleted*) (this=0x24e7170, _t1=0x24e7170, _t2=0x4b82160) at /home/nico/kde/build/kwin/src/kwin_autogen/include/moc_window.cpp:1580
#19 0x00007f3a2678ccb3 in KWin::X11Window::releaseWindow(bool) (this=0x24e7170, on_shutdown=false) at /home/nico/kde/src/kwin/src/x11window.cpp:344
#20 0x00007f3a26585630 in KWin::X11Window::unmapNotifyEvent(xcb_unmap_notify_event_t*) (this=0x24e7170, e=0x4375fb0) at /home/nico/kde/src/kwin/src/events.cpp:567
#21 0x00007f3a26584dfd in KWin::X11Window::windowEvent(xcb_generic_event_t*) (this=0x24e7170, e=0x4375fb0) at /home/nico/kde/src/kwin/src/events.cpp:387
#22 0x00007f3a26583fec in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) (this=0x1a61c20, e=0x4375fb0) at /home/nico/kde/src/kwin/src/events.cpp:156
#23 0x00007f3a265f6e95 in KWin::Application::dispatchEvent(xcb_generic_event_t*) (this=0x7ffc27241fd0, event=0x4375fb0) at /home/nico/kde/src/kwin/src/main.cpp:490
#24 0x00007f3a265f7163 in KWin::XcbEventFilter::nativeEventFilter(QByteArray const&, void*, long*) (this=0x17f4b70, eventType=..., message=0x4375fb0, result=0x7ffc27241ad8) at /home/nico/kde/src/kwin/src/main.cpp:606
#25 0x00007f3a248affef in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (this=<optimized out>, eventType=..., message=0x4375fb0, result=0x7ffc27241ad8) at kernel/qabstracteventdispatcher.cpp:495
#26 0x0000000000465f6e in KWin::Xwl::Xwayland::dispatchEvents() (this=0x1aecd80) at /home/nico/kde/src/kwin/src/xwayland/xwayland.cpp:242
#27 0x000000000046c4a4 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Xwl::Xwayland::*)()>::call(void (KWin::Xwl::Xwayland::*)(), KWin::Xwl::Xwayland*, void**)
    (f=(void (KWin::Xwl::Xwayland::*)(class KWin::Xwl::Xwayland * const)) 0x465dd0 <KWin::Xwl::Xwayland::dispatchEvents()>, o=0x1aecd80, arg=0x7ffc27241c80) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:152
#28 0x000000000046bd8a in QtPrivate::FunctionPointer<void (KWin::Xwl::Xwayland::*)()>::call<QtPrivate::List<>, void>(void (KWin::Xwl::Xwayland::*)(), KWin::Xwl::Xwayland*, void**)
    (f=(void (KWin::Xwl::Xwayland::*)(class KWin::Xwl::Xwayland * const)) 0x465dd0 <KWin::Xwl::Xwayland::dispatchEvents()>, o=0x1aecd80, arg=0x7ffc27241c80) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:185
#29 0x000000000046b231 in QtPrivate::QSlotObject<void (KWin::Xwl::Xwayland::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x2a4dbe0, r=0x1aecd80, a=0x7ffc27241c80, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:418
#30 0x00007f3a248e7ab2 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc27241c80, r=0x1aecd80, this=0x2a4dbe0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#31 doActivate<false>(QObject*, int, void**) (sender=0x17bd9a0, signal_index=4, argv=0x7ffc27241c80) at kernel/qobject.cpp:3923
#32 0x00007f3a248e130f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x17bd9a0, m=m@entry=0x7f3a24b88800 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3983
#33 0x00007f3a248af6e3 in QAbstractEventDispatcher::awake() (this=this@entry=0x17bd9a0) at .moc/moc_qabstracteventdispatcher.cpp:149
#34 0x00007f3a2490454d in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x17bd9a0, flags=...) at kernel/qeventdispatcher_unix.cpp:465
#35 0x00000000005a0ecd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:63
#36 0x00007f3a248b141b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc27241e10, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#37 0x00007f3a248b8f22 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#38 0x00000000004a2888 in main(int, char**) (argc=14, argv=0x7ffc272428b8) at /home/nico/kde/src/kwin/src/main_wayland.cpp:629
Comment 1 Zamundaaa 2023-06-12 11:07:52 UTC
KWin now properly handles (most) OpenGL allocation failures instead of asserting, so this crash shouldn't be possible anymore