unable to take VM screenshot

Bug #1571702 reported by Stijn Tintel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virt-manager (Debian)
Fix Released
Unknown
virt-manager (Fedora)
Fix Released
Medium
virt-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu 16.04 LTS
Release: 16.04

[ Description, reproducer ]

Start a KVM VM in via virt-manager. In the VM window, click "Virtual Machine", then "Take Screenshot" and "Save". It should save a screenshot.

Instead of creating a screenshot, it creates an empty png file and virt-manager throws this error:

Error taking screenshot: argument 1 must be convertible to a buffer, not _ResultTuple

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1455, in control_vm_screenshot
    return self._take_screenshot()
  File "/usr/share/virt-manager/virtManager/details.py", line 1507, in _take_screenshot
    file(filename, "wb").write(ret)
TypeError: argument 1 must be convertible to a buffer, not _ResultTuple

[ Fix ]

Looks like "ret" is now a named tuple. Upstream have a fix to check for this and take 'buffer' if so. We cherry-pick this commit.

[ Development fix ]

The same.

[ Regression potential ]

I'm not sure which part of the stack changed, I can imagine that if you run on an older version there might have been problems if you got the non-named tuple. But upstream cared for this by making the new codepath conditional, so I can't think of any other possibilities.

virt-manager:
  Installed: 1:1.3.2-3ubuntu1
  Candidate: 1:1.3.2-3ubuntu1
  Version table:
 *** 1:1.3.2-3ubuntu1 500
        500 http://be.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://be.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: virt-manager 1:1.3.2-3ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-18.34-generic 4.4.6
Uname: Linux 4.4.0-18-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: KDE
Date: Mon Apr 18 17:16:49 2016
InstallationDate: Installed on 2016-04-05 (13 days ago)
InstallationMedia: Kubuntu 16.04 LTS "Xenial Xerus" - Beta amd64 (20160405)
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

Trying to take a screenshot of the guest in virt-manager in current Rawhide - virt-manager-1.3.2-1.fc24.noarch - fails, with this error:

Error taking screenshot: must be convertible to a buffer, not _ResultTuple

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1455, in control_vm_screenshot
    return self._take_screenshot()
  File "/usr/share/virt-manager/virtManager/details.py", line 1507, in _take_screenshot
    file(filename, "wb").write(ret)
TypeError: must be convertible to a buffer, not _ResultTuple

Revision history for this message
In , Cole (cole-redhat-bugs) wrote :

Thanks for the report, fixed upstream now:

commit f454798b337aedb881671f62fe3b25fad703b768
Author: Cole Robinson <email address hidden>
Date: Fri Jan 15 15:07:58 2016 -0500

    details: Fix screenshot on F24 rawhide (bz 1297988)

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

virt-manager-1.3.2-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe3db5ef67

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

virt-manager-1.3.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-edb0c8d5df

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

virt-manager-1.3.2-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe3db5ef67

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

virt-manager-1.3.2-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-edb0c8d5df

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

virt-manager-1.3.2-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

virt-manager-1.3.2-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
Stijn Tintel (stintel) wrote :
Iain Lane (laney)
description: updated
Revision history for this message
Iain Lane (laney) wrote :

Thanks for the bug, fix is uploaded to yakkety (16.10) and 16.04

Changed in virt-manager (Ubuntu):
status: New → Fix Committed
Changed in virt-manager (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Stijn, or anyone else affected,

Accepted virt-manager into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/virt-manager/1:1.3.2-3ubuntu1.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in virt-manager (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 1:1.3.2-3ubuntu2

---------------
virt-manager (1:1.3.2-3ubuntu2) yakkety; urgency=medium

  * debian/patches/0001-details-Fix-screenshot-on-F24-rawhide-bz-1297988.patch:
    Cherry-pick from upstream. Fix screenshot capture with newer
    gdk-pixbuf/pygobject. (LP: #1571702)

 -- Iain Lane <email address hidden> Wed, 18 May 2016 11:08:46 +0100

Changed in virt-manager (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

yeah, I'm enjoying my screenshots since I updated!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 1:1.3.2-3ubuntu1.16.04.1

---------------
virt-manager (1:1.3.2-3ubuntu1.16.04.1) xenial; urgency=medium

  * debian/patches/0001-details-Fix-screenshot-on-F24-rawhide-bz-1297988.patch:
    Cherry-pick from upstream. Fix screenshot capture with newer
    gdk-pixbuf/pygobject. (LP: #1571702)

 -- Iain Lane <email address hidden> Wed, 18 May 2016 11:08:46 +0100

Changed in virt-manager (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for virt-manager has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in virt-manager (Debian):
status: Unknown → Fix Released
Changed in virt-manager (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.