Summary: | KWin crashed when using the Slide effect and Alt+F2 shortcut | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | ultr <ultr> |
Component: | general | Assignee: | Vlad Zahorodnii <vlad.zahorodnii> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kde, nate, ultr |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.14.2 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kwin/ad28da84e78c7eb7ff1e608c4819707b2142daea | Version Fixed In: | 5.14.4 |
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
ultr
2018-10-22 21:35:01 UTC
Interesting, it looks like when Deleted is about to go away, its refcount is not equal to 0. Can you please attach output of qdbus org.kde.KWin /KWin supportInformation @Vlad Zagorodniy
> qdbus org.kde.KWin /KWin supportInformation
==========================
Version
=======
KWin version: 5.14.2
Qt Version: 5.11.1
Qt compile version: 5.11.1
XCB compile version: 1.13.1
Operation Mode: X11 only
Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes
X11
===
Vendor: The X.Org Foundation
Vendor Release: 12001000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0
Decoration
==========
Plugin: org.kde.breeze
Theme:
Blur: 0
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 9, 8, 2
decorationButtonsRight: 7, 3, 4, 5
borderSize: 0
gridUnit: 10
font: Ubuntu,10,-1,5,75,0,0,0,0,0,Bold
smallSpacing: 2
largeSpacing: 10
Platform
==========
Name: KWin::X11StandalonePlatform
Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: false
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
glSmoothScale: 2
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: false
glPreferBufferSwap: 0
glPlatformInterface: 1
windowsBlockCompositing: true
Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0
Screens
=======
Multi-Head: no
Active screen follows mouse: no
Number of Screens: 1
Screen 0:
---------
Name: DVI-D-0
Geometry: 0,0,1920x1080
Scale: 1
Refresh Rate: 59.9339
Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 970/PCIe/SSE2
OpenGL version string: 4.6.0 NVIDIA 390.87
OpenGL platform interface: GLX
OpenGL shading language version string: 4.60 NVIDIA
Driver: NVIDIA
Driver version: 390.87
GPU class: Unknown
OpenGL version: 4.6
GLSL version: 4.60
X server version: 1.20.1
Linux kernel version: 4.18
Direct rendering: Requires strict binding: no
GLSL shaders: yes
Texture NPOT support: yes
Virtual Machine: no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace: no
Loaded Effects:
---------------
zoom
kwin4_effect_frozenapp
kwin4_effect_fade
kwin4_effect_translucency
kwin4_effect_logout
kwin4_effect_maximize
kwin4_effect_morphingpopups
kwin4_effect_dialogparent
slidingpopups
slideback
slide
screenshot
magiclamp
glide
flipswitch
desktopgrid
coverswitch
colorpicker
wobblywindows
presentwindows
highlightwindow
blur
startupfeedback
screenedge
kscreen
Currently Active Effects:
-------------------------
blur
Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1
kwin4_effect_frozenapp:
kwin4_effect_fade:
kwin4_effect_translucency:
kwin4_effect_logout:
kwin4_effect_maximize:
kwin4_effect_morphingpopups:
kwin4_effect_dialogparent:
slidingpopups:
slideInDuration: 150
slideOutDuration: 250
slideback:
slide:
duration: 150
horizontalGap: 0
verticalGap: 0
slideDocks: false
slideBackground: false
screenshot:
magiclamp:
glide:
duration: 160
inRotationEdge: 0
inRotationAngle: 0
inDistance: 200
inOpacity: 0.4
outRotationEdge: 2
outRotationAngle: 0
outDistance: 200
outOpacity: 0
flipswitch:
tabBox: false
tabBoxAlternative: false
duration: 200
angle: 30
xPosition: 0.33000001311302185
yPosition: 1
windowTitle: true
desktopgrid:
zoomDuration: 150
border: 0
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 3
usePresentWindows: true
coverswitch:
animationDuration: 200
animateSwitch: true
animateStart: true
animateStop: true
reflection: true
windowTitle: true
zPosition: 900
primaryTabBox: true
secondaryTabBox: false
colorpicker:
wobblywindows:
stiffness: 0.15
drag: 0.8
moveFactor: 0.1
xTesselation: 20
yTesselation: 20
minVelocity: 0
maxVelocity: 1000
stopVelocity: 0.5
minAcceleration: 0
maxAcceleration: 1000
stopAcceleration: 0.5
moveEffectEnabled: true
openEffectEnabled: false
closeEffectEnabled: false
moveWobble: true
resizeWobble: true
presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0
highlightwindow:
blur:
startupfeedback:
type: 0
screenedge:
kscreen:
I updated KWin from 5.14.1 to 5.14.2, and I can no longer reproduce this issue. If it happens again, I will report it here. Ok, please reopen if you do. Created attachment 116032 [details]
New crash information added by DrKonqi
kwin_x11 (5.14.2) using Qt 5.11.1
- What I was doing when the application crashed:
Pressing shortcuts for switching virtual desktops (1,2,3,4) and Alt+F2 for running a command fast.
-- Backtrace (Reduced):
#6 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#7 0x00007f01e18a0535 in __GI_abort () at abort.c:79
#8 0x00007f01e18a040f in __assert_fail_base (fmt=0x7f01d44cc27a "%s%s%s:%u: %s%sWarunek zapewnienia `%s' nie zosta\305\202 spe\305\202niony.\n%n", assertion=0x7f01e17e3b4c "delete_refcount == 0", file=0x7f01e17e3b98 "/build/kwin-dKqRUG/kwin-5.14.2/deleted.cpp", line=56, function=<optimized out>) at assert.c:92
#9 0x00007f01e18b0142 in __GI___assert_fail (assertion=0x7f01e17e3b4c "delete_refcount == 0", file=0x7f01e17e3b98 "/build/kwin-dKqRUG/kwin-5.14.2/deleted.cpp", line=56, function=0x7f01e17e3c40 "virtual KWin::Deleted::~Deleted()") at assert.c:101
#10 0x00007f01e16fed92 in KWin::Deleted::~Deleted() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
Still reproducible in KWin 5.14.2. Reopening. Can you please give us more information about what you were doing when the crash happened? What windows were open? Did you close a window before switching virtual desktops? How often KWin crashes? etc. Also, if you disable Fade and Glide effect, can you reproduce this bug? Happens only with Glide effect. Could not reproduce with Fade or no effect. No windows need to be present on any virtual desktop. Press Alt+1, Alt+2, Alt+F2 fast randomly. (I use reassigned shortcuts for desktops from Ctrl+Fn to Alt+n, that's probably why it was easy for me to trigger this by accident) (In reply to ultr from comment #9) > Happens only with Glide effect. Csn you reproduce this bug if you enable the Scale effect? (make sure that the Glide effect is disabled) > Happens only with Glide effect. > Could not reproduce with Fade or no effect. I meant: > Happens only with "Slide" effect. > Could not reproduce with "Fade Desktop" or no [desktop switching] effect. As for "Glide", "Fade" and "Scale" window effects: The issue is reproducible always no matter of the combination of these three. (depends only on the state of the desktop switching "Slide" effect) Thanks, that's pretty useful information. Hmm, can't reproduce. Could you please run kwin as follows: QT_LOGGING_RULES="*.debug=true" kwin_x11 --replace &> log.txt reproduce the bug and then submit log.txt here? I have a feeling that it might be caused by the Sliding Popups effect (maybe it unref windows that haven't been ref'ed). If you disable the Sliding Popups effect, can you reproduce this bug? Yep, can reproduce. Git commit ad28da84e78c7eb7ff1e608c4819707b2142daea by Vlad Zagorodniy. Committed on 07/11/2018 at 17:22. Pushed by vladz into branch 'Plasma/5.14'. [effects/slidingpopups] Don't crash when sliding virtual desktops Summary: If you switch virtual desktops while krunner is sliding in, then depending on whether your distro strips assert statements away, KWin can crash. The reason why it crashes is the sliding popups effect tries to unref deleted windows that it hasn't referenced before (if there is an active full screen effect, then popups won't be slided out, which in its turn means that we won't reference deleted windows). So, in the end, the refcount of those windows can be -1. That triggers an assert statement in the destructor of the Deleted class, which checks whether the refcount is equal to 0. Popups are not slided while there is an active full screen effect because we don't know what the full screen effect does. This patch adjusts the sliding popups effect so it stops all active animations when user switches virtual desktops or when a full screen effect kicks in. We need to do that so the effect won't try to unreference windows in postPaintWindow. Visually, it doesn't look quite nice, but for now that's good enough. A proper fix would be more complex: we would need to make sure that full screen effects ignore sliding popups (and also maybe docks) and perform some input redirection. FIXED-IN: 5.14.4 Test Plan: I'm not able anymore to reproduce bug 400170. Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: davidedmundson, graesslin, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16731 M +22 -0 effects/slidingpopups/slidingpopups.cpp M +3 -3 effects/slidingpopups/slidingpopups.h https://commits.kde.org/kwin/ad28da84e78c7eb7ff1e608c4819707b2142daea |