[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Protect animation list iterators against external changes
From: "Commit Hook" <null () kde ! org>
Date: 2013-01-08 20:51:59
Message-ID: 20130108205159.8552.80335 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108151/#review25002
-----------------------------------------------------------
This review has been submitted with commit e7c775631eea5ab983688e08199cd4e0b9939fc5 \
by Thomas Lübking to branch KDE/4.10.
- Commit Hook
On Jan. 3, 2013, 11:15 p.m., Thomas Lübking wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108151/
> -----------------------------------------------------------
>
> (Updated Jan. 3, 2013, 11:15 p.m.)
>
>
> Review request for kwin and Martin Gräßlin.
>
>
> Description
> -------
>
> I recently started to run into random crashes on the heap and slightly started to \
> fear to have broken sth. on activities... whatever.
> Turned out* that moving BE::Faded to AnimationEffect and for the very first time \
> actually using "animationEnded" to chain animations (fade out -> fade in) would \
> (actually obviously) alter the m_animations list what unfortunately turns our nice \
> little iterators into random junk.
> So this patch tracks list manipulations (in this case during the iteration calling \
> animationEnded, being the natural candidate) and when they happen, re-validates the \
> iterators (the map traversion is required due to the internals of QMap/QHash; the \
> list could instead also be accessed by entry->first.at(animationCounter) instead; \
> not sure about performance impact but it would have made the patch much larger ;-)
> * I actually figured it because resizing on fullscreen changes always worked like \
> crap because the window gets to resizes in a row (once for the decoration being \
> removed and then the actual resize to the FS geometry) what got me multiplicative \
> traslation/scaling. Chaining this made the crashes pretty reproducible but the \
> result is pretty cool =)
>
> Diffs
> -----
>
> kwin/libkwineffects/kwinanimationeffect.cpp e0a6694
>
> Diff: http://git.reviewboard.kde.org/r/108151/diff/
>
>
> Testing
> -------
>
> hehe - i un/fullscreened mplayer about a hundred times the last few minutes.
> That crashed nearly *each* time before the patch.
>
>
> Thanks,
>
> Thomas Lübking
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/108151/">http://git.reviewboard.kde.org/r/108151/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been \
submitted with commit e7c775631eea5ab983688e08199cd4e0b9939fc5 by Thomas Lübking to \
branch KDE/4.10.</pre> <br />
<p>- Commit</p>
<br />
<p>On January 3rd, 2013, 11:15 p.m., Thomas Lübking wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kwin and Martin Gräßlin.</div>
<div>By Thomas Lübking.</div>
<p style="color: grey;"><i>Updated Jan. 3, 2013, 11:15 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I recently started to run into random crashes on the heap and slightly \
started to fear to have broken sth. on activities... whatever.
Turned out* that moving BE::Faded to AnimationEffect and for the very first time \
actually using "animationEnded" to chain animations (fade out -> fade \
in) would (actually obviously) alter the m_animations list what unfortunately turns \
our nice little iterators into random junk.
So this patch tracks list manipulations (in this case during the iteration calling \
animationEnded, being the natural candidate) and when they happen, re-validates the \
iterators (the map traversion is required due to the internals of QMap/QHash; the \
list could instead also be accessed by entry->first.at(animationCounter) instead; \
not sure about performance impact but it would have made the patch much larger ;-)
* I actually figured it because resizing on fullscreen changes always worked like \
crap because the window gets to resizes in a row (once for the decoration being \
removed and then the actual resize to the FS geometry) what got me multiplicative \
traslation/scaling. Chaining this made the crashes pretty reproducible but the result \
is pretty cool =)</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">hehe - i un/fullscreened mplayer about a hundred times the last few \
minutes. That crashed nearly *each* time before the patch.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kwin/libkwineffects/kwinanimationeffect.cpp <span style="color: \
grey">(e0a6694)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/108151/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic