mate-screenshot crashed with SIGSEGV in gdk_property_get()

Bug #1638835 reported by ernsteiswuerfel
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mate-utils (Ubuntu)
Fix Released
Medium
Unassigned
Zesty
Fix Released
Medium
Vlad Orlov
Artful
Fix Released
Medium
Vlad Orlov
Bionic
Fix Released
Medium
Unassigned

Bug Description

[Impact]

Making screenshot of the current window might result in mate-screenshot crashing.

The fix for this issue is provided in the debdiffs attached to the report.

Would be nice to have the fix backported to Zesty and Artful, as the issue breaks one of the common features that users expect to work always.

[Test Case]

Use Alt-PrintScreen (or "mate-screenshot -w" from the terminal) to grab the current window.

As stated in the original description, this should be tried on PowerPC machines to reproduce the bug reliably. In this case, mate-screenshot should crash. Intel/AMD machines may or may not be affected.

[Regression Potential]

The fix is achieved by removing some unneeded code from mate-screenshot. The code was obtaining window title from the current window, but that title wasn't used by any other parts of code afterwards. The only effect of removing that code is fixing the crash, as it happened exactly in that part. Therefore, there's no place for regressions here.

[Original Description]

mate-screenshot always crashes when doing a 'grab the current window'-screenshot. Doing a screenshot of the whole desktop works. Tested on Zestys daily iso on a PowerBook G4 5,6.

ProblemType: Crash
DistroRelease: Ubuntu 17.04
Package: mate-utils 1.16.0-1
ProcVersionSignature: Ubuntu 4.8.0-26.28-powerpc-smp 4.8.0
Uname: Linux 4.8.0-26-powerpc-smp ppc
ApportVersion: 2.20.3-0ubuntu8
Architecture: powerpc
CurrentDesktop: MATE
Date: Thu Nov 3 09:45:07 2016
ExecutablePath: /usr/bin/mate-screenshot
InstallationDate: Installed on 2016-11-03 (0 days ago)
InstallationMedia: Ubuntu-MATE 17.04 "Zesty Zapus" - Alpha powerpc (20161103)
ProcCmdline: mate-screenshot --interactive
ProcEnviron:
 LANGUAGE=de_AT:de
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
Signal: 11
SourcePackage: mate-utils
StacktraceTop:
 gdk_property_get () from /usr/lib/powerpc-linux-gnu/libgdk-3.so.0
 screenshot_get_window_title ()
 ?? ()
 ?? ()
 ?? () from /lib/powerpc-linux-gnu/libglib-2.0.so.0
Title: mate-screenshot crashed with SIGSEGV in gdk_property_get()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
ernsteiswuerfel (erhard-f) wrote :
information type: Private → Public
Revision history for this message
ernsteiswuerfel (erhard-f) wrote :

Filed as new bug, as suggested in #1615848. Hopefully with a complete stacktrace now.

Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 gdk_property_get (window=window@entry=0x0, property=property@entry=0x55, type=type@entry=0x46, offset=offset@entry=0, length=length@entry=2147483647, pdelete=pdelete@entry=0, actual_property_type=actual_property_type@entry=0xbfd77d3c, actual_format_type=actual_format_type@entry=0xbfd77d40, actual_length=actual_length@entry=0xbfd77d44, data=data@entry=0xbfd77d48) at ././gdk/gdkwindow.c:11595
 get_utf8_property (atom=0x55, window=0x0) at screenshot-utils.c:61
 screenshot_get_window_title (win=<optimized out>) at screenshot-utils.c:1079
 find_current_window (window_title=0x2033d07c <window_title>) at mate-screenshot.c:1112
 push_check_file_job (rectangle=0x0) at mate-screenshot.c:1138

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in mate-utils (Ubuntu):
importance: Undecided → Medium
tags: removed: need-powerpc-retrace
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1638835

tags: added: iso-testing
Revision history for this message
ernsteiswuerfel (erhard-f) wrote :

Functionality works flawlessly in MATE 12.1 (Xenial daily iso). Bug must have been introduced afterwards.

Changed in mate-desktop:
status: Unknown → New
tags: added: artful
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mate-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Vlad Orlov (monsta) wrote :

This is now fixed upstream. Attaching the patch with the fix.

tags: added: ubuntu-mate-zesty-sru
no longer affects: mate-desktop
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Fix mate-screenshot crash" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :

[Impact]

Making screenshot of the current window might result
in mate-screenshot crashing.

The fix for this issue is provided in the debdiffs
attached to the report.

Would be nice to have the fix backported to Zesty and
Artful, as the issue breaks one of the common features
that users expect to work always.

[Test Case]

Use Alt-PrintScreen (or "mate-screenshot -w" from the
terminal) to grab the current window.

As stated in the original description, this should be
tried on PowerPC machines to reproduce the bug reliably.
In this case, mate-screenshot should crash.
Intel/AMD machines may or may not be affected.

[Regression Potential]

The fix is achieved by removing some unneeded code from
mate-screenshot. The code was obtaining window title
from the current window, but that title wasn't used by
any other parts of code afterwards. The only effect of
removing that code is fixing the crash, as it happened
exactly in that part. Therefore, there's no place for
regressions here.

Simon Quigley (tsimonq2)
Changed in mate-utils (Ubuntu Artful):
status: New → In Progress
Changed in mate-utils (Ubuntu Bionic):
status: Confirmed → In Progress
Changed in mate-utils (Ubuntu Zesty):
status: New → In Progress
Changed in mate-utils (Ubuntu Artful):
importance: Undecided → Medium
Changed in mate-utils (Ubuntu Zesty):
importance: Undecided → Medium
assignee: nobody → Vlad Orlov (monsta)
Changed in mate-utils (Ubuntu Artful):
assignee: nobody → Vlad Orlov (monsta)
Changed in mate-utils (Ubuntu Bionic):
assignee: nobody → Vlad Orlov (monsta)
description: updated
Revision history for this message
Vlad Orlov (monsta) wrote :

It's fixed in Bionic as version 1.18.3 is there now.

Changed in mate-utils (Ubuntu Bionic):
status: In Progress → Fix Released
assignee: Vlad Orlov (monsta) → nobody
Revision history for this message
Simon Quigley (tsimonq2) wrote :

This was uploaded as well, forgot to update the bug...

Revision history for this message
Vlad Orlov (monsta) wrote :

No problem - I know it wasn't auto-updated because the new release came from Debian, so it didn't have references to LP.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello ernsteiswuerfel, or anyone else affected,

Accepted mate-utils into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mate-utils/1.18.2-1ubuntu0.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 on 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-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. 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 mate-utils (Ubuntu Artful):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-artful
Revision history for this message
ernsteiswuerfel (erhard-f) wrote :

Hello brian-murray,

as Ubuntu MATE 17.04/17.10 is no longer availabe on ppc I cannot test it. On my amd64 boxes this bug does not show up anyhow.

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello ernsteiswuerfel, or anyone else affected,

Accepted mate-utils into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mate-utils/1.18.1-0ubuntu1.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 on 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-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. 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 mate-utils (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed-zesty
Revision history for this message
Vlad Orlov (monsta) wrote :

Oh well. I forgot that powerpc had been dropped before 17.04.

I guess we'll only have to test that the updated version works exactly as before.

Revision history for this message
Vlad Orlov (monsta) wrote :

Tested proposed packages in Zesty and Artful. Replaced local builds of mate-utils, mate-utils-common, libmatedict6 packages with:

- version 1.18.2-1ubuntu0.1 from artful-proposed in Artful
- version 1.18.1-0ubuntu1.1 from zesty-proposed in Zesty

Opened several apps and made screenshots of various windows, including the desktop (with all apps minimized). Used various methods for that:

- Alt-PrintScreen shortcut
- running "mate-screenshot -w" via Alt-F2 dialog
- running the same from mate-terminal

All screenshots were created successfully, without any crashes.

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

This bug was fixed in the package mate-utils - 1.18.1-0ubuntu1.1

---------------
mate-utils (1.18.1-0ubuntu1.1) zesty; urgency=medium

  * fix-screenshot-crash.patch: new patch. Fixes occasional
    mate-screenshot crashes (LP: #1638835)

 -- Vlad Orlov <email address hidden> Sat, 14 Oct 2017 16:25:17 +0300

Changed in mate-utils (Ubuntu Zesty):
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 mate-utils 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mate-utils - 1.18.2-1ubuntu0.1

---------------
mate-utils (1.18.2-1ubuntu0.1) artful; urgency=medium

  * fix-screenshot-crash.patch: new patch. Fixes occasional
    mate-screenshot crashes (LP: #1638835)

 -- Vlad Orlov <email address hidden> Sun, 29 Oct 2017 13:02:30 +0300

Changed in mate-utils (Ubuntu Artful):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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