Bug 365367 - Kwin always crashes when I try adjust the scale of a bitmap image in mtPaint
Summary: Kwin always crashes when I try adjust the scale of a bitmap image in mtPaint
Status: RESOLVED DUPLICATE of bug 363224
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.6.4
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2016-07-11 16:37 UTC by Roman Bysh
Modified: 2016-07-15 08:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot showing where the crash originated from in MTPaint (17.86 KB, image/png)
2016-07-11 17:02 UTC, Roman Bysh
Details
Here's the little bitmap file that I was trying to edit (717 bytes, image/png)
2016-07-12 18:33 UTC, Roman Bysh
Details
Possible patch (10.38 KB, patch)
2016-07-13 08:20 UTC, Martin Flöser
Details
Patch variant with QPointer (2.98 KB, patch)
2016-07-15 08:23 UTC, Martin Flöser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Bysh 2016-07-11 16:37:20 UTC
Application: kwin_x11 (5.6.4)

Qt Version: 5.6.1
Frameworks Version: 5.23.0
Operating System: Linux 4.6.3-1-default x86_64
Distribution: "openSUSE Tumbleweed (20160625) (x86_64)"

-- Information about the crash:
1. Opened MTPaint and opened a bitmap file originally scaled at 22 x 22 px
2. Navigated to Image -->Scale Canvas
3. Clicked on the resize up button to increase the size of the bitmap to 80 x 80 px
4. This always freezes up followed by kwin_x11 crashing
5.  I can replicate this every time

The crash can be reproduced every time.

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

Thread 6 (Thread 0x7f61bd0db700 (LWP 28184)):
#0  0x00007f61d832ba1d in poll () from /lib64/libc.so.6
#1  0x00007f61d5de5410 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f61d5de71a9 in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f61bdfb2579 in QXcbEventReader::run (this=0x1b74010) at qxcbconnection.cpp:1325
#4  0x00007f61d60b52d8 in QThreadPrivate::start (arg=0x1b74010) at thread/qthread_unix.cpp:341
#5  0x00007f61d85f5474 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f61d83343ed in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f61b26c0700 (LWP 28185)):
#0  0x00007f61d832d0a3 in select () from /lib64/libc.so.6
#1  0x00007f61d62de30f in qt_safe_select (nfds=8, fdread=fdread@entry=0x7f61ac000a78, fdwrite=fdwrite@entry=0x7f61ac000d08, fdexcept=fdexcept@entry=0x7f61ac000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f61d62dfdb4 in QEventDispatcherUNIX::select (timeout=0x0, exceptfds=0x7f61ac000f98, writefds=0x7f61ac000d08, readfds=0x7f61ac000a78, nfds=<optimized out>, this=0x7f61ac0008c0) at kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f61ac0008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f61d62e02ca in QEventDispatcherUNIX::processEvents (this=0x7f61ac0008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f61d628a76a in QEventLoop::exec (this=this@entry=0x7f61b26bfc50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f61d60b03b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#7  0x00007f61cf06d9b5 in ?? () from /usr/lib64/libQt5DBus.so.5
#8  0x00007f61d60b52d8 in QThreadPrivate::start (arg=0x7f61cf2e0d20) at thread/qthread_unix.cpp:341
#9  0x00007f61d85f5474 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f61d83343ed in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f61abfff700 (LWP 28201)):
#0  0x00007f61d832d0a3 in select () from /lib64/libc.so.6
#1  0x00007f61d62de30f in qt_safe_select (nfds=14, fdread=fdread@entry=0x7f61a0000a78, fdwrite=fdwrite@entry=0x7f61a0000d08, fdexcept=fdexcept@entry=0x7f61a0000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f61d62dfdb4 in QEventDispatcherUNIX::select (timeout=0x0, exceptfds=0x7f61a0000f98, writefds=0x7f61a0000d08, readfds=0x7f61a0000a78, nfds=<optimized out>, this=0x7f61a00008c0) at kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f61a00008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f61d62e02ca in QEventDispatcherUNIX::processEvents (this=0x7f61a00008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f61d628a76a in QEventLoop::exec (this=this@entry=0x7f61abffec60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f61d60b03b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#7  0x00007f61d00f51e5 in ?? () from /usr/lib64/libQt5Qml.so.5
#8  0x00007f61d60b52d8 in QThreadPrivate::start (arg=0x1c78c80) at thread/qthread_unix.cpp:341
#9  0x00007f61d85f5474 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f61d83343ed in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f61a956a700 (LWP 28202)):
#0  0x00007f61d832d0a3 in select () from /lib64/libc.so.6
#1  0x00007f61d62de30f in qt_safe_select (nfds=23, fdread=fdread@entry=0x7f6198000a78, fdwrite=fdwrite@entry=0x7f6198000d08, fdexcept=fdexcept@entry=0x7f6198000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f61d62dfdb4 in QEventDispatcherUNIX::select (timeout=0x0, exceptfds=0x7f6198000f98, writefds=0x7f6198000d08, readfds=0x7f6198000a78, nfds=<optimized out>, this=0x7f61980008c0) at kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f61980008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f61d62e02ca in QEventDispatcherUNIX::processEvents (this=0x7f61980008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f61d628a76a in QEventLoop::exec (this=this@entry=0x7f61a9569c60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f61d60b03b3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#7  0x00007f61d00f51e5 in ?? () from /usr/lib64/libQt5Qml.so.5
#8  0x00007f61d60b52d8 in QThreadPrivate::start (arg=0x24d5500) at thread/qthread_unix.cpp:341
#9  0x00007f61d85f5474 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f61d83343ed in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f619eac6700 (LWP 28204)):
#0  0x00007f61d85fb09f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f61d5015fc4 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f61d52ffec0 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f61d5016009 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f61d85f5474 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f61d83343ed in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f61d8bc8940 (LWP 28181)):
[KCrash Handler]
#6  0x0000000000000570 in ?? ()
#7  0x00007f61d62bff50 in QObject::connect (sender=0x3664060, signal=signal@entry=0x7f61d50ae1a4 "2destroyed(QObject*)", receiver=0x2852a00, method=method@entry=0x7f61d50ae186 "1_q_objectDestroyed(QObject*)", type=type@entry=Qt::AutoConnection) at kernel/qobject.cpp:2642
#8  0x00007f61d50582ef in QScriptEnginePrivate::qobjectData (this=this@entry=0x279c860, object=<optimized out>, object@entry=0x3664060) at api/qscriptengine.cpp:1573
#9  0x00007f61d50583b4 in QScriptEnginePrivate::newQObject (this=this@entry=0x279c860, object=object@entry=0x3664060, ownership=ownership@entry=QScriptEngine::QtOwnership, options=...) at api/qscriptengine.cpp:1504
#10 0x00007f61d50586a2 in QScriptEngine::newQObject (this=<optimized out>, object=0x3664060, ownership=ownership@entry=QScriptEngine::QtOwnership, options=...) at api/qscriptengine.cpp:2281
#11 0x00007f61d7f48dac in KWin::effectWindowToScriptValue (eng=<optimized out>, window=<optimized out>) at /usr/src/debug/kwin-5.6.4/scripting/scriptedeffect.cpp:417
#12 0x00007f61d50589c5 in QScriptEnginePrivate::create (exec=exec@entry=0x279ca68, type=<optimized out>, ptr=ptr@entry=0x7ffdc823c028) at api/qscriptengine.cpp:3081
#13 0x00007f61d5081406 in QScript::QObjectConnectionManager::execute (this=this@entry=0x27a13e0, slotIndex=slotIndex@entry=6, argv=argv@entry=0x7ffdc823c030) at bridge/qscriptqobject.cpp:2173
#14 0x00007f61d50896d1 in QScript::QObjectConnectionManager::qt_static_metacall (_a=0x7ffdc823c030, _id=6, _c=QMetaObject::InvokeMetaMethod, _o=0x27a13e0) at bridge/qscriptqobject.cpp:2070
#15 QScript::QObjectConnectionManager::qt_metacall (this=0x27a13e0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7ffdc823c030) at bridge/qscriptqobject.cpp:2099
#16 0x00007f61d62b9ed7 in QMetaObject::activate (sender=0x275ab90, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffdc823c030) at kernel/qobject.cpp:3745
#17 0x00007f61d62ba757 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f61d5a4ea80 <KWin::EffectsHandler::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffdc823c030) at kernel/qobject.cpp:3595
#18 0x00007f61d5840518 in KWin::EffectsHandler::desktopPresenceChanged (this=<optimized out>, _t1=<optimized out>, _t2=<optimized out>, _t3=<optimized out>) at /usr/src/debug/kwin-5.6.4/build/libkwineffects/moc_kwineffects.cpp:1262
#19 0x00007f61d5841b1c in KWin::EffectsHandler::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kwin-5.6.4/build/libkwineffects/moc_kwineffects.cpp:577
#20 0x00007f61d62bacf9 in QObject::event (this=0x275ab90, e=<optimized out>) at kernel/qobject.cpp:1256
#21 0x00007f61d6fd2aec in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x275ab90, e=0x36679d0) at kernel/qapplication.cpp:3804
#22 0x00007f61d6fd7f8f in QApplication::notify (this=0x7ffdc823c600, receiver=0x275ab90, e=0x36679d0) at kernel/qapplication.cpp:3561
#23 0x00007f61d628ca20 in QCoreApplication::notifyInternal2 (receiver=0x275ab90, event=event@entry=0x36679d0) at kernel/qcoreapplication.cpp:1015
#24 0x00007f61d628e99c in QCoreApplication::sendEvent (event=0x36679d0, receiver=<optimized out>) at kernel/qcoreapplication.h:225
#25 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1b41bd0) at kernel/qcoreapplication.cpp:1650
#26 0x00007f61d62e01b2 in QEventDispatcherUNIX::processEvents (this=0x1bac930, flags=...) at kernel/qeventdispatcher_unix.cpp:579
#27 0x00007f61be026b9d in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62
#28 0x00007f61d628a76a in QEventLoop::exec (this=this@entry=0x7ffdc823c4f0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#29 0x00007f61d6292f6c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285
#30 0x00007f61d67dbb6c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1607
#31 0x00007f61d6fcfb25 in QApplication::exec () at kernel/qapplication.cpp:2979
#32 0x00007f61d8810ebe in kdemain (argc=<optimized out>, argv=0x7ffdc823c788) at /usr/src/debug/kwin-5.6.4/main_x11.cpp:327
#33 0x00007f61d826c741 in __libc_start_main () from /lib64/libc.so.6
#34 0x0000000000400809 in _start () at ../sysdeps/x86_64/start.S:118

Possible duplicates by query: bug 365003, bug 364826, bug 364643, bug 364196, bug 363224.

Reported using DrKonqi
Comment 1 Roman Bysh 2016-07-11 16:56:44 UTC
The crash begins immediately after clicking on the OK button to confirm me resizing the bitmap.
Comment 2 Roman Bysh 2016-07-11 17:02:42 UTC
Created attachment 100012 [details]
Screenshot showing where the crash originated from in MTPaint
Comment 3 Thomas Lübking 2016-07-11 17:05:37 UTC

*** This bug has been marked as a duplicate of bug 363224 ***
Comment 4 Roman Bysh 2016-07-11 17:16:25 UTC
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:
Comment 5 Roman Bysh 2016-07-11 17:23:27 UTC
(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?
Comment 6 Thomas Lübking 2016-07-11 17:32:54 UTC
thread #1 - the relevant one. watch for desktopPresenceChanged and failed object creation in qtscript.
Comment 7 Roman Bysh 2016-07-11 21:36:27 UTC
I see it's optimized out.
Comment 8 Roman Bysh 2016-07-11 21:38:42 UTC
Follow Up

We can see this resolved for Plasma 5.6.4? The crashes happen quite often in Tumbleweed.
Comment 9 Martin Flöser 2016-07-12 06:18:19 UTC
> 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.
Comment 10 Martin Flöser 2016-07-12 06:21:56 UTC
and of course following the steps does not result in a crash on my system *sigh*
Comment 11 Martin Flöser 2016-07-12 06:24:36 UTC
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.
Comment 12 Martin Flöser 2016-07-12 06:38:06 UTC
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).
Comment 13 Martin Flöser 2016-07-12 06:43:04 UTC
What's your animation speed in the Compositor Settings?
Comment 14 Martin Flöser 2016-07-12 06:57:22 UTC
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.
Comment 15 Martin Flöser 2016-07-12 09:52:14 UTC
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.
Comment 16 Roman Bysh 2016-07-12 18:24:17 UTC
(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.
Comment 17 Roman Bysh 2016-07-12 18:28:02 UTC
(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.
Comment 18 Roman Bysh 2016-07-12 18:31:38 UTC
(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
Comment 19 Roman Bysh 2016-07-12 18:33:20 UTC
Created attachment 100039 [details]
Here's the little bitmap file that I was trying to edit
Comment 20 Martin Flöser 2016-07-13 08:20:21 UTC
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.
Comment 21 Thomas Lübking 2016-07-13 14:13:51 UTC
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)
Comment 22 Roman Bysh 2016-07-13 15:37:17 UTC
(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.
Comment 23 Martin Flöser 2016-07-14 06:10:37 UTC
> 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.
Comment 24 Thomas Lübking 2016-07-14 07:05:50 UTC
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  ;-)
Comment 25 Luca Beltrame 2016-07-14 08:00:08 UTC
I can likely make a test package to have Roman test it: unsure of the timeline, though.
Comment 26 Roman Bysh 2016-07-14 20:14:51 UTC
No problem. I'll test it when it's ready.
Comment 27 Martin Flöser 2016-07-15 08:23:38 UTC
Created attachment 100108 [details]
Patch variant with QPointer

@Luca: the patch is against 5.6 branch, but applies also to other branches.