Summary: | Kwin always crashes when I try adjust the scale of a bitmap image in mtPaint | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Roman Bysh <rb03884> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | CC: | lbeltrame, rb03884 |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.6.4 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Screenshot showing where the crash originated from in MTPaint
Here's the little bitmap file that I was trying to edit Possible patch Patch variant with QPointer |
Description
Roman Bysh
2016-07-11 16:37:20 UTC
The crash begins immediately after clicking on the OK button to confirm me resizing the bitmap. Created attachment 100012 [details]
Screenshot showing where the crash originated from in MTPaint
*** This bug has been marked as a duplicate of bug 363224 *** qdbus org.kde.KWin /KWin supportInformation KWin Support Information: The following information should be used when requesting support on e.g. http://forum.kde.org. It provides information about the currently running instance, which options are used, what OpenGL driver and which effects are running. Please post the information provided underneath this introductory text to a paste bin service like http://paste.kde.org instead of pasting into support threads. ========================== Version ======= KWin version: 5.6.4 Qt Version: 5.6.1 Qt compile version: 5.6.1 XCB compile version: 1.12 Operation Mode: X11 only Build Options ============= KWIN_BUILD_DECORATIONS: yes KWIN_BUILD_TABBOX: yes KWIN_BUILD_ACTIVITIES: yes HAVE_INPUT: 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: 11803000 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.kwin.aurorae Theme: __aurorae__svg__Zukitwo Blur: 1 onAllDesktopsAvailable: true alphaChannelSupported: true closeOnDoubleClickOnMenu: false decorationButtonsLeft: 0, 2 decorationButtonsRight: 6, 3, 4, 5 borderSize: 3 gridUnit: 10 font: Noto Sans,9,-1,5,50,0,0,0,0,0 smallSpacing: 2 largeSpacing: 10 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: true 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: false 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 unredirectFullscreen: false glSmoothScale: 2 colorCorrected: false xrenderSmoothScale: false maxFpsInterval: 16666666 refreshRate: 0 vBlankTime: 6000000 glStrictBinding: false glStrictBindingFollowsDriver: true glCoreProfile: true glPreferBufferSwap: 0 glPlatformInterface: 1 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-I-3 Geometry: 0,0,1680x1050 Refresh Rate: 59.9543 Compositing =========== Compositing is active Compositing Type: OpenGL OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce 8600 GTS/PCIe/SSE2 OpenGL version string: 3.1.0 NVIDIA 340.96 OpenGL platform interface: GLX OpenGL shading language version string: 1.40 NVIDIA via Cg compiler Driver: NVIDIA Driver version: 340.96 GPU class: G80/G90 OpenGL version: 3.1 GLSL version: 1.40 X server version: 1.18.3 Linux kernel version: 4.6.3 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 slidingpopups kwin4_effect_login wobblywindows screenshot kwin4_effect_eyeonscreen kwin4_effect_scalein kwin4_effect_windowaperture magiclamp kwin4_effect_translucency flipswitch desktopgrid kwin4_effect_fadedesktop coverswitch kwin4_effect_maximize kwin4_effect_morphingpopups kwin4_effect_fade presentwindows kwin4_effect_dialogparent highlightwindow blur contrast logout startupfeedback screenedge kscreen Currently Active Effects: ------------------------- blur contrast Effect Settings: ---------------- zoom: zoomFactor: 1.2 mousePointer: 0 mouseTracking: 0 enableFocusTracking: false followFocus: true focusDelay: 350 moveFactor: 20 targetZoom: 1 slidingpopups: fadeInTime: 150 fadeOutTime: 250 kwin4_effect_login: wobblywindows: stiffness: 0.059999999999999998 drag: 0.90000000000000002 moveFactor: 0.10000000000000001 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 screenshot: kwin4_effect_eyeonscreen: kwin4_effect_scalein: kwin4_effect_windowaperture: magiclamp: animationDuration: 250 kwin4_effect_translucency: flipswitch: tabBox: false tabBoxAlternative: false duration: 200 angle: 30 xPosition: 0.33000001311302185 yPosition: 1 windowTitle: true desktopgrid: zoomDuration: 300 border: 10 desktopNameAlignment: 0 layoutMode: 0 customLayoutRows: 2 usePresentWindows: true kwin4_effect_fadedesktop: coverswitch: animationDuration: 200 animateSwitch: true animateStart: true animateStop: true reflection: true windowTitle: true zPosition: 900 primaryTabBox: true secondaryTabBox: false kwin4_effect_maximize: kwin4_effect_morphingpopups: kwin4_effect_fade: 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 kwin4_effect_dialogparent: highlightwindow: blur: blurRadius: 12 cacheTexture: true contrast: logout: useBlur: true startupfeedback: type: 1 screenedge: kscreen: (In reply to Thomas Lübking from comment #3) > > > *** This bug has been marked as a duplicate of bug 363224 *** Where in this backtrace is it a duplicate? thread #1 - the relevant one. watch for desktopPresenceChanged and failed object creation in qtscript. I see it's optimized out. Follow Up We can see this resolved for Plasma 5.6.4? The crashes happen quite often in Tumbleweed. > We can see this resolved for Plasma 5.6.4? The crashes happen quite often in
> Tumbleweed.
You are the first one to ever report the crash with a full backtrace. So I hope that finally we will be able to understand what's going on here.
and of course following the steps does not result in a crash on my system *sigh* Though interesting finding: the dialog_parent effect is still on after closing the window. As that effect is connecting to the desktopPresenceChanged signal I think we are closer to the riddle. relevant code section: QMetaObject::Connection QObject::connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) { if (sender == 0 || receiver == 0 || signal == 0 || method == 0) { qWarning("QObject::connect: Cannot connect %s::%s to %s::%s", sender ? sender->metaObject()->className() : "(null)", (signal && *signal) ? signal+1 : "(null)", receiver ? receiver->metaObject()->className() : "(null)", (method && *method) ? method+1 : "(null)"); return QMetaObject::Connection(0); } QByteArray tmp_signal_name; if (!check_signal_macro(sender, signal, "connect", "bind")) return QMetaObject::Connection(0); const QMetaObject *smeta = sender->metaObject(); last line is the one which crashes. This would indicate a dangling pointer (which is what I already assumed). What's your animation speed in the Compositor Settings? Another investigation result: MTPaint opens a window which I never see when closing the scale canvas window. It has a caption of "Please Wait ...". I think that this is related - a window which is very short living. Would you be able to test a patch? As I'm not able to reproduce I don't know whether my patch works. The idea of the patch is to not forward any signals while the window is not yet shown to the effects. This assumes that the main problem is the short living window. (In reply to Martin Gräßlin from comment #13) > What's your animation speed in the Compositor Settings? I'm using the default setting for animation speed. (In reply to Martin Gräßlin from comment #14) > Another investigation result: MTPaint opens a window which I never see when > closing the scale canvas window. It has a caption of "Please Wait ...". I > think that this is related - a window which is very short living. Yes. I've provided a screenshot of the "Scale Canvas" pop up window. The crash happens after clicking on the OK button after increasing the size of the bitmap. (In reply to Martin Gräßlin from comment #15) > Would you be able to test a patch? As I'm not able to reproduce I don't know > whether my patch works. The idea of the patch is to not forward any signals > while the window is not yet shown to the effects. This assumes that the main > problem is the short living window. Sure, I can test your patch. Just tell me how to apply it. BTW That window should disappear right after clicking on the OK button Created attachment 100039 [details]
Here's the little bitmap file that I was trying to edit
Created attachment 100057 [details]
Possible patch
Please compile KWin (5.7) with this patch and check whether it resolves the problem. If you don't know how to do it, I can ask openSUSE devs to build a package.
Could one simply pass a QPointer<EffectWindow*>(c->effectWIndow()) in the queuedconnection invokeMethod call? In doubt using a lambda wrapper? (Something that virtually has to happen on all queued invocation parameters since they can always go during this event cycle) (In reply to Martin Gräßlin from comment #20) > Created attachment 100057 [details] > Possible patch > > Please compile KWin (5.7) with this patch and check whether it resolves the > problem. If you don't know how to do it, I can ask openSUSE devs to build a > package. Martin, That would great if a package can be compiled. We are having a serious problem with kwin crashing too often in Tumbleweed (perhaps the kwin crashes have been addressed in 5.7). Hopefully this patch will also fix the kwin crash that appears after a user clicks on a folder in Dolphin. > Could one simply pass a QPointer<EffectWindow*>(c->effectWIndow()) in the queuedconnection invokeMethod call?
That might work as well and I thought about it in the past. Don't remember why I discarded the idea.
It's likely troublesome as script API (thus "lambda wrapper") The queued connection problem is systematic (and easy to understand) but requiriung an exposure check everwhere frankly looks wonky and seems to beg for future oversights ;-) I can likely make a test package to have Roman test it: unsure of the timeline, though. No problem. I'll test it when it's ready. Created attachment 100108 [details]
Patch variant with QPointer
@Luca: the patch is against 5.6 branch, but applies also to other branches.
|