Bug 350572 - kwin crash closeing a 32bit depth window
Summary: kwin crash closeing a 32bit depth window
Status: RESOLVED DUPLICATE of bug 346857
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.3.2
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-07-24 06:23 UTC by Mike Romberg
Modified: 2015-07-27 11:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
try this C program (1.36 KB, text/x-csrc)
2015-07-24 07:02 UTC, Mike Romberg
Details
libXft/freetype2 demo + kwin crasher (6.32 KB, text/x-csrc)
2015-07-24 07:19 UTC, Mike Romberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Romberg 2015-07-24 06:23:11 UTC
Application: kwin_x11 (5.3.2)

Qt Version: 5.4.2
Operating System: Linux 4.0.8-300.fc22.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
  Custom X11 application using a non default visual (default 24 application using 32
bit visual).  Transparent background pixel (if that matters).  KWin bought the farm
right after the close window button was pushed on the window manager supplied title bar.  This app is 100% X11.  No open GL is being used. 

  I believe this is repeatable as I've seen it (the kwin crash) before with similar code.

- Custom settings of the application:

  Uses a non default visual.
Default of display/screen: 24bit Truecolor.
Visual of window: 32bit Truecolor

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe0e383e900 (LWP 1821))]

Thread 4 (Thread 0x7fe0bb21d700 (LWP 1836)):
#0  0x00007fe0d86a3063 in select () at /lib64/libc.so.6
#1  0x00007fe0d9be71ff in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () at /lib64/libQt5Core.so.5
#2  0x00007fe0d9be8cfe in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () at /lib64/libQt5Core.so.5
#3  0x00007fe0d9be922e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007fe0d9b91eba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007fe0d99aff54 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007fe0e142b955 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#7  0x00007fe0d99b4e3e in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007fe0dcc77555 in start_thread () at /lib64/libpthread.so.0
#9  0x00007fe0d86acb9d in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fe0b36d3700 (LWP 1872)):
#0  0x00007fe0dcc7c540 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007fe0e25eb474 in QTWTF::TCMalloc_PageHeap::scavengerThread() () at /lib64/libQt5Script.so.5
#2  0x00007fe0e25eb4b9 in  () at /lib64/libQt5Script.so.5
#3  0x00007fe0dcc77555 in start_thread () at /lib64/libpthread.so.0
#4  0x00007fe0d86acb9d in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fe026fe6700 (LWP 2086)):
#0  0x00007fe0d86a3063 in select () at /lib64/libc.so.6
#1  0x00007fe0d9be71ff in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () at /lib64/libQt5Core.so.5
#2  0x00007fe0d9be8cfe in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () at /lib64/libQt5Core.so.5
#3  0x00007fe0d9be922e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007fe0d9b91eba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007fe0d99aff54 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007fe0e142b955 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#7  0x00007fe0d99b4e3e in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007fe0dcc77555 in start_thread () at /lib64/libpthread.so.0
#9  0x00007fe0d86acb9d in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7fe0e383e900 (LWP 1821)):
[KCrash Handler]
#5  0x00007fe0e13b5e20 in QQmlBoundSignalExpression::function() const () at /lib64/libQt5Qml.so.5
#6  0x00007fe0e13b5ec0 in QQmlBoundSignalExpression::sourceLocation() const () at /lib64/libQt5Qml.so.5
#7  0x00007fe0e1394a48 in QQmlData::destroyed(QObject*) () at /lib64/libQt5Qml.so.5
#8  0x00007fe0d9bccd14 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#9  0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#10 0x00007fe0e191b3f6 in QQmlPrivate::QQmlElement<QQuickMouseArea>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#11 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#12 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#13 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#14 0x00007fe0e191b026 in QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#15 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#16 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#17 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#18 0x00007fe0e191b346 in QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#19 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#20 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#21 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#22 0x00007fe0e191a69e in QQmlPrivate::QQmlElement<QQuickRow>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#23 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#24 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#25 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#26 0x00007fe0e191b026 in QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#27 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#28 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#29 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#30 0x00007fe0e191b026 in QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#31 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#32 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#33 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#34 0x00007fe0e191b0ce in QQmlPrivate::QQmlElement<QQuickRectangle>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#35 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#36 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#37 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#38 0x00007fe0e191b0ce in QQmlPrivate::QQmlElement<QQuickRectangle>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#39 0x00007fe0d9bc361b in QObjectPrivate::deleteChildren() () at /lib64/libQt5Core.so.5
#40 0x00007fe0d9bccf10 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#41 0x00007fe0e1900b1d in QQuickItem::~QQuickItem() () at /lib64/libQt5Quick.so.5
#42 0x00007fe0e191b026 in QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() () at /lib64/libQt5Quick.so.5
#43 0x00007fe0bb23a795 in Aurorae::Decoration::~Decoration() () at /usr/lib64/qt5/plugins/org.kde.kdecoration2/kwin5_aurorae.so
#44 0x00007fe0bb23a9d9 in Aurorae::Decoration::~Decoration() () at /usr/lib64/qt5/plugins/org.kde.kdecoration2/kwin5_aurorae.so
#45 0x00007fe0e30a8a12 in KWin::Client::destroyDecoration() () at /lib64/libkwin.so.5
#46 0x00007fe0e30af927 in KWin::Client::destroyClient() () at /lib64/libkwin.so.5
#47 0x00007fe0e30afc43 in KWin::Client::killWindow() () at /lib64/libkwin.so.5
#48 0x00007fe0df75cf45 in KDecoration2::Decoration::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () at /lib64/libkdecorations2.so.5
#49 0x00007fe0df75e825 in KDecoration2::Decoration::qt_metacall(QMetaObject::Call, int, void**) () at /lib64/libkdecorations2.so.5
#50 0x00007fe0bb24c317 in Aurorae::Decoration::qt_metacall(QMetaObject::Call, int, void**) () at /usr/lib64/qt5/plugins/org.kde.kdecoration2/kwin5_aurorae.so
#51 0x00007fe0e136cbda in CallMethod(QObject*, int, int, int, int*, QV8Engine*, QV4::CallData*) [clone .constprop.153] () at /lib64/libQt5Qml.so.5
#52 0x00007fe0e136df95 in CallPrecise(QObject*, QQmlPropertyData const&, QV8Engine*, QV4::CallData*) [clone .constprop.150] () at /lib64/libQt5Qml.so.5
#53 0x00007fe0e136e6b5 in QV4::QObjectMethod::callInternal(QV4::CallData*) () at /lib64/libQt5Qml.so.5
#54 0x00007fe0e137c038 in QV4::Runtime::callProperty(QV4::ExecutionContext*, QV4::String*, QV4::CallData*) () at /lib64/libQt5Qml.so.5
#55 0x00007fe0b29859ab in  ()
#56 0x0000000000000800 in  ()
#57 0x0003000000000007 in  ()
#58 0x0003000000000000 in  ()
#59 0x00007fe025fe6058 in  ()
#60 0x00007fe0b2500000 in  ()
#61 0x00007fe01ddb07a0 in  ()
#62 0x0000000001b14b60 in  ()
#63 0x00007fe01ddb07d0 in  ()
#64 0x00007fe0b2500000 in  ()
#65 0x00007fe0e132f286 in QV4::SimpleScriptFunction::call(QV4::Managed*, QV4::CallData*) () at /lib64/libQt5Qml.so.5
#66 0x00007fe0e14126c8 in QQmlJavaScriptExpression::evaluate(QQmlContextData*, QV4::ValueRef, QV4::CallData*, bool*) () at /lib64/libQt5Qml.so.5
#67 0x00007fe0e13b7246 in QQmlBoundSignalExpression::evaluate(void**) () at /lib64/libQt5Qml.so.5
#68 0x00007fe0e13b7a8b in QQmlBoundSignal_callback(QQmlNotifierEndpoint*, void**) () at /lib64/libQt5Qml.so.5
#69 0x00007fe0e13f5f57 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () at /lib64/libQt5Qml.so.5
#70 0x00007fe0e1395b7c in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () at /lib64/libQt5Qml.so.5
#71 0x00007fe0d9bc4980 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#72 0x00007fe0e1a3e902 in QQuickMouseArea::clicked(QQuickMouseEvent*) () at /lib64/libQt5Quick.so.5
#73 0x00007fe0e197ccde in QQuickMouseArea::setPressed(Qt::MouseButton, bool) () at /lib64/libQt5Quick.so.5
#74 0x00007fe0e197d7fb in QQuickMouseArea::mouseReleaseEvent(QMouseEvent*) () at /lib64/libQt5Quick.so.5
#75 0x00007fe0e18fe718 in QQuickItem::event(QEvent*) () at /lib64/libQt5Quick.so.5
#76 0x00007fe0da8567ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#77 0x00007fe0da85be90 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#78 0x00007fe0d9b9467b in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#79 0x00007fe0e190cedb in QQuickWindow::sendEvent(QQuickItem*, QEvent*) () at /lib64/libQt5Quick.so.5
#80 0x00007fe0e190d272 in QQuickWindowPrivate::deliverMouseEvent(QMouseEvent*) () at /lib64/libQt5Quick.so.5
#81 0x00007fe0e190f70d in QQuickWindow::mouseReleaseEvent(QMouseEvent*) () at /lib64/libQt5Quick.so.5
#82 0x00007fe0da0bc145 in QWindow::event(QEvent*) () at /lib64/libQt5Gui.so.5
#83 0x00007fe0e1913843 in QQuickWindow::event(QEvent*) () at /lib64/libQt5Quick.so.5
#84 0x00007fe0da8567ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#85 0x00007fe0da85be90 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#86 0x00007fe0d9b9467b in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#87 0x00007fe0bb23e269 in Aurorae::Decoration::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/qt5/plugins/org.kde.kdecoration2/kwin5_aurorae.so
#88 0x00007fe0df753fe9 in KDecoration2::Decoration::event(QEvent*) () at /lib64/libkdecorations2.so.5
#89 0x00007fe0da8567ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#90 0x00007fe0da85be90 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#91 0x00007fe0d9b9467b in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#92 0x00007fe0e30eadf8 in KWin::Client::buttonReleaseEvent(unsigned int, int, int, int, int, int, int) () at /lib64/libkwin.so.5
#93 0x00007fe0e30ec044 in KWin::Client::windowEvent(xcb_generic_event_t*) () at /lib64/libkwin.so.5
#94 0x00007fe0e30ed6c0 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /lib64/libkwin.so.5
#95 0x00007fe0d9b9104f in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /lib64/libQt5Core.so.5
#96 0x00007fe0c2dc330e in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /usr/lib64/qt5/plugins/platforms/libqxcb.so
#97 0x00007fe0c2dc4363 in QXcbConnection::processXcbEvents() () at /usr/lib64/qt5/plugins/platforms/libqxcb.so
#98 0x00007fe0d9bc5f41 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#99 0x00007fe0da8567ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#100 0x00007fe0da85be90 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#101 0x00007fe0d9b9467b in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#102 0x00007fe0d9b967b7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt5Core.so.5
#103 0x00007fe0d9be90f2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#104 0x00007fe0c2e183dd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/qt5/plugins/platforms/libqxcb.so
#105 0x00007fe0d9b91eba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#106 0x00007fe0d9b99a2c in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#107 0x00007fe0e34d2b07 in kdemain () at /lib64/libkdeinit5_kwin_x11.so
#108 0x00007fe0d85ca700 in __libc_start_main () at /lib64/libc.so.6
#109 0x0000000000400c89 in _start ()

Possible duplicates by query: bug 346857, bug 346447.

Reported using DrKonqi
Comment 1 Thomas Lübking 2015-07-24 06:44:34 UTC
I doubt it's related to the depth ("konsole" is ARGB as well) => which client in particular?

*** This bug has been marked as a duplicate of bug 346857 ***
Comment 2 Mike Romberg 2015-07-24 06:55:53 UTC
The client is xosview.  It is not released yet as it is a version I am developing.  KWin
pretty much bites it if I go from XCreateSimpleWindow() to something like this:

    _visual = DefaultVisual(display_, DefaultScreen(display_));

    colormap_ = DefaultColormap( display_, screen() );
    setColors();

    XSizeHints *szHints = getGeometry();

    window_ = XCreateSimpleWindow(display_, DefaultRootWindow(display_),
      szHints->x, szHints->y,
      szHints->width, szHints->height,
      1,
      fgcolor_, bgcolor_);

    setHints(szHints);
    XFree(szHints);

  To This:

    XVisualInfo vinfo;
    XMatchVisualInfo(display_, DefaultScreen(display_), 32,
      TrueColor, &vinfo);
    _visual = vinfo.visual;

    XSetWindowAttributes attr;
    colormap_ = XCreateColormap(display_, DefaultRootWindow(display_),
      vinfo.visual, AllocNone);

    setColors();
    XSizeHints *szHints = getGeometry();

    attr.colormap = colormap_;
    attr.border_pixel = 0;
    attr.background_pixel = 0;

    window_ = XCreateWindow(display_, DefaultRootWindow(display_),
      szHints->x, szHints->y, szHints->width, szHints->height,
      0, vinfo.depth, InputOutput, vinfo.visual,
      CWColormap | CWBorderPixel | CWBackPixel, &attr);


  I'm basing my changes off a really short C example I found on the interwebs.  I think it crashes kwin too.   I can attach it (or mail it to someone if there is no way to attach files)
Comment 3 Mike Romberg 2015-07-24 07:02:53 UTC
Created attachment 93721 [details]
try this C program

  This is a very simple C/X11 program that should also reproduce this.  Lemme know
if you need me to supply a makefile.  On a linux system it builds with just adding -lX11 (I think)
Comment 4 Mike Romberg 2015-07-24 07:16:43 UTC
The 32bit thing may be a red herring.  Or it may be several things crashing kwin.
I ran the 32 bit demo again and no crash.  But this libXft example (which xosview also uses)
crashed kwin hard (bug tool did not even pop up).  So, try this one too (it is also short)
Comment 5 Mike Romberg 2015-07-24 07:19:30 UTC
Created attachment 93723 [details]
libXft/freetype2 demo + kwin crasher

libXft/freetype2 example program.  Closing it also crashes (more reliably so) kwin
Comment 6 Thomas Lübking 2015-07-27 11:59:08 UTC
> XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
>      after 45 requests (43 known processed) with 0 events remaining.

This /is/ bug #346857 and it's also bug #303450 - the "new" qml stuff invokes the close directly again.

Adding Xcb::sync(); to "Client::closeWindow()" doesn't help anything - QtQuick just sucks.

*** This bug has been marked as a duplicate of bug 346857 ***