Bug 373771

Summary: Log spam on WindowThumbnail unredirect
Product: [Frameworks and Libraries] libplasma Reporter: Roman Gilg <subdiff>
Component: libplasmaAssignee: Martin Flöser <mgraesslin>
Status: CONFIRMED ---    
Severity: normal CC: nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Roman Gilg 2016-12-17 15:23:25 UTC
Plasma::WindowThumbnail spams the log with:

QXcbConnection: XCB error: 2 (BadValue), sequence: <unknown number>, resource id: <window id>, major code: <unknown number> (Unknown), minor code: <unknown number>

Examining the situation I found the problem to be in WindowThumbnail::stopRedirecting(), line 708, where the redirecting is stopped.

Apparently later some Qt object tries to access it still. Removing line 708 ends the log spam while window thumbnails still work, but it's probably not the best solution to it.
Comment 1 Roman Gilg 2016-12-17 15:25:13 UTC
To make it clear, line 708 is in my source file:

xcb_composite_unredirect_window(c, m_winId, XCB_COMPOSITE_REDIRECT_AUTOMATIC);
Comment 2 Martin Flöser 2016-12-17 16:39:47 UTC
Most likely the window doesn't exist any more. You can see similar warning messages triggered in KWin. It's not really an issue, just Qt should not report the messages.

A solution might be to just filter out the errors in a NativeEventFilter.
Comment 3 Roman Gilg 2016-12-18 12:59:49 UTC
(In reply to Martin Gräßlin from comment #2)
> A solution might be to just filter out the errors in a NativeEventFilter.

Would this be easy to implement? There is already an override of nativeEventFilter(..) in the WindowThumbnail class.
Comment 4 Martin Flöser 2016-12-18 20:59:49 UTC
Yeah quite easy. KWin does so in events.cpp for example.