Bug 406671

Summary: kwin broke when I threw the anbox
Product: [Plasma] kwin Reporter: Marcelo Zoel <marcelo.zoel>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: nate
Priority: NOR Keywords: drkonqi
Version: 5.13.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marcelo Zoel 2019-04-19 04:38:54 UTC
Application: kwin_x11 (5.13.5)

Qt Version: 5.11.1
Frameworks Version: 5.50.0
Operating System: Linux 4.18.0-17-generic x86_64
Distribution: Ubuntu 18.10

-- Information about the crash:
- What I was doing when the application crashed:

I just loaded ANBOX from the application launcher and got the alert stating that kwin broke.
Sorry if at the moment I have no more details, because it was the first time this error occurred. I am willing to inform you further details.

Thank you.

-- Backtrace:
Application: KWin (kwin_x11), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f366c140840 (LWP 2276))]

Thread 5 (Thread 0x7f364ef3a700 (LWP 2444)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f3674ce9fb8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7f3674ce9f68, cond=0x7f3674ce9f90) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x7f3674ce9f90, mutex=0x7f3674ce9f68) at pthread_cond_wait.c:655
#3  0x00007f3674bf2e2a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#4  0x00007f3674bf2e49 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#5  0x00007f3673f06164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007f3676737def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f3659676700 (LWP 2424)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5569635c01cc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x5569635c0178, cond=0x5569635c01a0) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x5569635c01a0, mutex=0x5569635c0178) at pthread_cond_wait.c:655
#3  0x00007f3659cd6ebb in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007f3659cd6c27 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007f3673f06164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007f3676737def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f3669008700 (LWP 2421)):
#0  0x00007f367672b7d6 in __GI_ppoll (fds=0x7f3654000d28, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f36752cc141 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f36752cd5b9 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f367527d16b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f36750cc0b6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f36737371f5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f36750d5c87 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f3673f06164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007f3676737def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f366a4ac700 (LWP 2368)):
#0  0x00007f367672b7d6 in __GI_ppoll (fds=0x7f365c00aae8, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f36752cc141 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f36752cd5b9 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f367527d16b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f36750cc0b6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f367321b545 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007f36750d5c87 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f3673f06164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007f3676737def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f366c140840 (LWP 2276)):
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#7  0x00007f367663f535 in __GI_abort () at abort.c:79
#8  0x00007f367663f40f in __assert_fail_base (fmt=0x7f36690362ab "%s%s%s:%u: %s%sAssertiva \342\200\234%s\342\200\235 falhou.\n%n", assertion=0x7f3673e25808 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=0x7f3673e25760 "../src/dispatch_common.c", line=863, function=<optimized out>) at assert.c:92
#9  0x00007f367664f142 in __GI___assert_fail (assertion=0x7f3673e25808 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=0x7f3673e25760 "../src/dispatch_common.c", line=863, function=0x7f3673e25840 "epoxy_get_proc_address") at assert.c:101
#10 0x00007f3673e0043f in ?? () from /usr/lib/x86_64-linux-gnu/libepoxy.so.0
#11 0x00007f3673dd5f8a in ?? () from /usr/lib/x86_64-linux-gnu/libepoxy.so.0
#12 0x00007f3673e845bb in KWin::GLTexturePrivate::~GLTexturePrivate() () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.11
#13 0x00007f3673e845d9 in KWin::GLTexturePrivate::~GLTexturePrivate() () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.11
#14 0x00007f3673e85a19 in KWin::GLTexture::~GLTexture() () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.11
#15 0x00007f36681aeb96 in KWin::SceneOpenGL::EffectFrame::cleanup() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#16 0x00007f36681aebe5 in KWin::SceneOpenGL::~SceneOpenGL() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#17 0x00007f36681aec99 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#18 0x00007f3676489ba9 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#19 0x00007f367648a11c in KWin::Compositor::suspend(KWin::Compositor::SuspendReason) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#20 0x00007f36752a7f92 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f3675c3f4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f3675c46ae0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f367527e499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f367528148b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f36752cd42b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f366bb070ed in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#27 0x00007f367527d16b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f36752852e2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f367681147b in kdemain () from /usr/lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so
#30 0x00007f367664109b in __libc_start_main (main=0x556962140050, argc=3, argv=0x7ffc6338a638, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc6338a628) at ../csu/libc-start.c:308
#31 0x000055696214008a in _start ()
[Inferior 1 (process 2276) detached]

Possible duplicates by query: bug 404166, bug 401491, bug 400358, bug 400170, bug 399644.

Reported using DrKonqi
Comment 1 Vlad Zahorodnii 2019-04-19 07:13:17 UTC
Hmm, looks like we have missing call to makeOpenGLContextCurrent().
Comment 2 Vlad Zahorodnii 2019-04-23 20:59:37 UTC
Git commit b617613bf71f872b4b678cab75080ad4d89043c8 by Vlad Zagorodniy.
Committed on 23/04/2019 at 20:59.
Pushed by vladz into branch 'master'.

[scenes/opengl] Ensure there is current OpenGL context when destroying EffectFrame unstyled texture

Summary: BUG: 406671

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20723

M  +8    -5    plugins/scenes/opengl/scene_opengl.cpp

https://commits.kde.org/kwin/b617613bf71f872b4b678cab75080ad4d89043c8