Bug 346496 - It appears that kwin caused kwindowsystem to make an X call I think under Wayland
Summary: It appears that kwin caused kwindowsystem to make an X call I think under Way...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwindowsystem
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Martin Flöser
URL: https://git.reviewboard.kde.org/r/123...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-23 02:57 UTC by bluescreenavenger
Modified: 2015-04-28 06:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.10
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bluescreenavenger 2015-04-23 02:57:49 UTC
I attempted to start with both QT_QPA_PLATFORM=xcb and QT_QPA_PLATFORM=wayland.

I admit I have qtbase compiled with -qpa wayland to default to Wayland if that has anything to do with it, as if I understand kwin uses some QPA related things differently... I will try to recompile qtbase changing this option overnight,

I get this stack trace
#0  xcb_get_setup (c=0x0) at xcb_conn.c:314
#1  0xb7a05480 in KXUtils::createPixmapFromHandle(unsigned int, unsigned int)
    () from /opt/lib/i386-linux-gnu/libKF5WindowSystem.so.5
#2  0xb7a0cdc3 in KWindowSystemPrivateX11::icon(int, int, bool, int, NETWinInfo*) () from /opt/lib/i386-linux-gnu/libKF5WindowSystem.so.5
#3  0xb7a01283 in KWindowSystem::icon(unsigned int, int, int, bool, int, NETWinInfo*) () from /opt/lib/i386-linux-gnu/libKF5WindowSystem.so.5
#4  0xb7b55735 in KWin::Client::getIcons() ()
   from /opt/lib/i386-linux-gnu/libkwin.so.5
#5  0xb7ba953e in KWin::Client::manage(unsigned int, bool) ()
   from /opt/lib/i386-linux-gnu/libkwin.so.5
#6  0xb7b3d5df in KWin::Workspace::createClient(unsigned int, bool) ()
   from /opt/lib/i386-linux-gnu/libkwin.so.5
#7  0xb7b91f59 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) ()
   from /opt/lib/i386-linux-gnu/libkwin.so.5
#8  0xb7fcd853 in QtPrivate::QFunctorSlotObject<KWin::ApplicationWayland::continueStartupWithX()::{lambda()#1}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) ()
   from /opt/lib/i386-linux-gnu/libkdeinit5_kwin_wayland.so
#9  0xb69c28ff in QMetaObject::activate(QObject*, int, int, void**) ()
   from /opt/lib/libQt5Core.so.5
#10 0xb69c34cd in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/lib/libQt5Core.so.5
#11 0xb6a4a6e1 in QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) () from /opt/lib/libQt5Core.so.5
#12 0xb69d0d09 in QSocketNotifier::event(QEvent*) ()
   from /opt/lib/libQt5Core.so.5
#13 0xb73988fa in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /opt/lib/libQt5Widgets.so.5
#14 0xb739e179 in QApplication::notify(QObject*, QEvent*) ()
   from /opt/lib/libQt5Widgets.so.5
#15 0xb7b7fe8a in KWin::Application::notify(QObject*, QEvent*) ()
   from /opt/lib/i386-linux-gnu/libkwin.so.5
#16 0xb69919aa in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /opt/lib/libQt5Core.so.5
#17 0xb69e9a74 in QEventDispatcherUNIX::activateSocketNotifiers() ()
   from /opt/lib/libQt5Core.so.5
#18 0xb69e9cb4 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () from /opt/lib/libQt5Core.so.5
#19 0xb69ea176 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#20 0xb698eaf3 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/lib/libQt5Core.so.5
#21 0xb698ef5a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/lib/libQt5Core.so.5
#22 0xb69974f5 in QCoreApplication::exec() () from /opt/lib/libQt5Core.so.5
#23 0xb6d1ec41 in QGuiApplication::exec() () from /opt/lib/libQt5Gui.so.5
#24 0xb7393f64 in QApplication::exec() () from /opt/lib/libQt5Widgets.so.5
#25 0xb7fcf27c in kdemain ()
   from /opt/lib/i386-linux-gnu/libkdeinit5_kwin_wayland.so
#26 0x080485b7 in main ()


Reproducible: Always
Comment 1 Martin Flöser 2015-04-23 08:03:44 UTC
any chance that you had xterm open? On my whiteboard there is a note that xterm crashes kwin_wayland when accessing the icon.

Please note that it is expected that kwin_wayland uses X11. KWin cannot be run without X11 support yet and that's why it is required to have either a dedicated XServer running for kwin_wayland or to pass --xwayland to the command line argument.

The QPA plugin does not need to be specified for KWin. kwin_x11 forces to xcb, kwin-wayland forces to wayland.
Comment 2 bluescreenavenger 2015-04-23 11:35:37 UTC
Yes. I was first testing xterm, because I thought it would be one of the simpler X11 apps to try.

I tried to run qt's wiggly as an X11 app. It works.

BTW: I am calling kwin_wayland as
RANDOMNUMBER=$RANDOM
ServerID=wayland-$RANDOMNUMBER
kwin_wayland --windowed --xserver --socket=$ServerID
Comment 3 Martin Flöser 2015-04-24 06:01:36 UTC
> Yes. I was first testing xterm, because I thought it would be one of the simpler X11 apps to try.

Very well, that's the one I was already aware of (which is good).

> kwin_wayland --windowed --xserver --socket=$ServerID

use:
 kwin_wayland --windowed --xwayland --socket=$ServerID

There is no option --xserver in 5.3 any more.
Comment 4 Martin Flöser 2015-04-24 12:53:03 UTC
Review request created: https://git.reviewboard.kde.org/r/123490/
Comment 5 Martin Flöser 2015-04-28 06:24:48 UTC
Git commit 9bb99d6c06e014c7fd202597aef90afa2eaa0d38 by Martin Gräßlin.
Committed on 28/04/2015 at 06:24.
Pushed by graesslin into branch 'master'.

Do not hard depend on QX11Info in KXUtils::createPixmapFromHandle

KXUtils::createPixmapFromHandle is used from e.g.
KWindowSystemPrivateX11::icon which can be used on platforms != xcb. So
the methods called from that method should not hard depend on platform
xcb.
FIXED-IN: 5.10
REVIEW: 123490
CHANGELOG: Don't depend on QX11Info in KXUtils::createPixmapFromHandle

M  +1    -1    src/kwindowsystem_x11.cpp
M  +7    -6    src/kxutils.cpp
M  +3    -0    src/kxutils_p.h

http://commits.kde.org/kwindowsystem/9bb99d6c06e014c7fd202597aef90afa2eaa0d38