Merge lp://qastaging/~uriboni/unity-2d/spread-safer-window-image-provider into lp://qastaging/unity-2d/3.0

Proposed by Ugo Riboni
Status: Merged
Approved by: Florian Boucault
Approved revision: 536
Merged at revision: 541
Proposed branch: lp://qastaging/~uriboni/unity-2d/spread-safer-window-image-provider
Merge into: lp://qastaging/unity-2d/3.0
Diff against target: 169 lines (+76/-35)
2 files modified
libunity-2d-private/Unity2d/windowimageprovider.cpp (+71/-35)
libunity-2d-private/Unity2d/windowimageprovider.h (+5/-0)
To merge this branch: bzr merge lp://qastaging/~uriboni/unity-2d/spread-safer-window-image-provider
Reviewer Review Type Date Requested Status
Florian Boucault (community) functional Approve
Review via email: mp+57856@code.qastaging.launchpad.net

Commit message

[spread] Implement a safer logic to convert the captured window pixmap into images that is resistant to the window being unmapped while we convert.

Description of the change

This MR makes sure that if the conversion of the captured window pixmap to fails due to the window being unmapped while we're converting it, we don't crash (and we retry to grab the pixmap following the alternative code path for unmapped windows).

The reason for the crash is explained in large detail in the attached bug.

To test this patch I suggest you do *not* apply the fix in lp:~uriboni/unity-2d/spread-no-windows-when-inactive , then follow the instructions in the bug report and verify that no matter how many times you try you don't get the crash.
A more scientific approach (given the fact that the bug is not reproducible reliably, but only randomly after usually two or three tries) would be to go in with a debugger and verify that we're actually at least once failing to convert the image and recover safely from that.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

Functionally fine, fixes the crasher and does not introduce regressions.

review: Approve (functional)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: