mart created this revision. mart added a reviewer: Plasma. Restricted Application added projects: Plasma, Frameworks. Restricted Application added subscribers: Frameworks, plasma-devel. mart requested review of this revision.
REVISION SUMMARY the texture of ManagedTextureNode gets deleted by the refcountung of the internal QSharedPointer, but in some rare cases, it can be deleted too by some external cause, usually when a widget changes its parent window (either changing containment or switching between full/collapsed view) dragging a system monitor applet that uses the plotter component between the desktop and panel quite reliably crashes plasma, as it was trying to access the texture that may have become invalid at the moment. track it also with a qpointer which is used only to provide an hasValidTexture boolean which should be checked before accessing the texture of the node. BUG:388508 BUG:374280 BUG:365052 BUG:343576 TEST PLAN The bug is easily reproducible without the patch, wasn't able to reproduce it anymore with it REPOSITORY R296 KDeclarative BRANCH phab/guardTexture REVISION DETAIL https://phabricator.kde.org/D10250 AFFECTED FILES src/qmlcontrols/kquickcontrolsaddons/plotter.cpp src/qmlcontrols/kquickcontrolsaddons/plotter.h src/quickaddons/managedtexturenode.cpp src/quickaddons/managedtexturenode.h To: mart, #plasma Cc: plasma-devel, #frameworks, michaelh, ZrenBot, ngraham, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart