<table><tr><td style="">mart retitled this revision from "track the validity of the texture" to "disconnect render() on window change".<br />mart edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-7r2hbgrmba4htab/" rel="noreferrer">(Show Details)</a>
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10250" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">the texture of ManagedTextureNode gets deleted by the<br />
refcountung of the internal QSharedPointer,<br />
but in some rare cases</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">when the window changes</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">it can be deleted too by some<br />
external cause</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the node will be deleted</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">usually when a widget changes its parent<br />
window (either changing containment or switching between<br />
full/collapsed view)<br />
dragging a system monitor applet that uses the plotter<br />
component between the desktop and panel quite reliably</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">and render()</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">crashes plasma, as it was trying to access the texture that may</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">will access an invalid pointer.</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">have become invalid at</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">disconnect the render slot when</span> the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">moment.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">window change, as it</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">track it also with a qpointer which is used only to provide</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">can't do anything useful until the next updatepaintnode.</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">an hasValidT</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Make the managedt</span>exture<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> boolean which should be checked before</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">node actually do the management, as</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">accessing the texture of the node.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">textures were never deleted</span><br />
<br />
BUG:388508<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R296 KDeclarative</div></div></div><br /><div><strong>BRANCH</strong><div><div>phab/guardTexture2</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10250" rel="noreferrer">https://phabricator.kde.org/D10250</a></div></div><br /><div><strong>To: </strong>mart, Plasma, davidedmundson<br /><strong>Cc: </strong>davidedmundson, broulik, ngraham, plasma-devel, Frameworks, michaelh, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>