unity-control-center crashed with SIGSEGV in default_app_changed()

Bug #1304388 reported by Stuart Hine
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
unity-control-center (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Trusty by Trent Lloyd
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Crash report and bug appeared straight after boot, cause unknown, though system went on to run normally after.
Ubuntu 14.04 Beta 2

[Test case]
Set Firefox Nightly as default browser
UCC should not crash in that case

[Regression potential]
This is a null-pointer check, there's nothing to worry about.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: unity-control-center 14.04.3+14.04.20140407-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-23.45-generic 3.13.8
Uname: Linux 3.13.0-23-generic i686
ApportVersion: 2.14.1-0ubuntu1
Architecture: i386
CurrentDesktop: Unity
Date: Tue Apr 8 13:25:48 2014
ExecutablePath: /usr/bin/unity-control-center
ProcCmdline: unity-control-center
ProcEnviron:
 PATH=(custom, no user)
 LANGUAGE=en_GB:en
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0xac26dcbd: mov (%eax),%ecx
 PC (0xac26dcbd) ok
 source "(%eax)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%ecx" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: unity-control-center
StacktraceTop:
 ?? () from /usr/lib/i386-linux-gnu/unity-control-center-1/panels/libinfo.so
 g_cclosure_marshal_VOID__VOID () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
 g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
 ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
 g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
Title: unity-control-center crashed with SIGSEGV in g_cclosure_marshal_VOID__VOID()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
usr_lib_unity-control-center: deja-dup 30.0-0ubuntu4

Related branches

Revision history for this message
Stuart Hine (f-stuart) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 default_app_changed (button=0xa6c6cd8, self=0xa0be350) at cc-info-panel.c:803
 g_cclosure_marshal_VOID__VOID (closure=0xa71ab58, return_value=0x0, n_param_values=1, param_values=0xbf944990, invocation_hint=0xbf94493c, marshal_data=0x0) at /build/buildd/glib2.0-2.40.0/./gobject/gmarshal.c:85
 g_closure_invoke (closure=0xa71ab58, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0xbf944990, invocation_hint=invocation_hint@entry=0xbf94493c) at /build/buildd/glib2.0-2.40.0/./gobject/gclosure.c:768
 signal_emit_unlocked_R (node=node@entry=0xa67a700, detail=0, instance=0xa6c6cd8, emission_return=emission_return@entry=0x0, instance_and_params=0xbf944990) at /build/buildd/glib2.0-2.40.0/./gobject/gsignal.c:3551
 g_signal_emit_valist (instance=instance@entry=0xa6c6cd8, signal_id=signal_id@entry=355, detail=detail@entry=0, var_args=var_args@entry=0xbf944acc "\200\026H\267\220\214p\n\220\264p\n\001") at /build/buildd/glib2.0-2.40.0/./gobject/gsignal.c:3307

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in unity-control-center (Ubuntu):
importance: Undecided → Medium
summary: - unity-control-center crashed with SIGSEGV in
- g_cclosure_marshal_VOID__VOID()
+ unity-control-center crashed with SIGSEGV in default_app_changed()
tags: removed: need-i386-retrace
information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Trent Lloyd (lathiat) wrote :

This is happening to me on Xenial, crash in the same function when selecting Google Chrome from the default application list after selecting another item first (since it is currently the default when the dialog opens)

This occurred on a fresh install, seemingly after telling Chrome "yes" to setting itself as default.

We can see that mime_types = g_app_info_get_supported_types (info) returns NULL but there is no check for this condition.

Upstream patch d9f08df39cafbd1f15c510da444f8ac913cdc493 introduces a NULL check and fixes this issue.

Thread 1 "unity-control-c" received signal SIGSEGV, Segmentation fault.
default_app_changed (button=<optimised out>, self=<optimised out>) at cc-info-panel.c:816
816 for (i = 0; mime_types[i]; i++)
(gdb) bt
#0 default_app_changed (button=<optimised out>, self=<optimised out>) at cc-info-panel.c:816
<truncated>
#32 0x0000000000407503 in main (argc=1, argv=0x7fffffffdee8) at control-center.c:317
(gdb) l
814 mime_types = g_app_info_get_supported_types (info);
815
816 for (i = 0; mime_types[i]; i++)
(gdb) print mime_types
$1 = (const char * const *) 0x0

From d9f08df39cafbd1f15c510da444f8ac913cdc493 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <email address hidden>
Date: Wed, 18 Feb 2015 10:10:08 +0100
Subject: [PATCH] info: Fix crash when application supports no mime-type

It seems to be possible for Firefox Nightly to set itself up as the
default x-scheme-handler/http without actually handling any mime-types.

See https://bugzilla.redhat.com/show_bug.cgi?id=1193680

https://bugzilla.gnome.org/show_bug.cgi?id=744695
---
 panels/info/cc-info-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 86513a4..ad89d54 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -854,7 +854,7 @@ default_app_changed (GtkAppChooserButton *button,
       pattern = g_pattern_spec_new (app_data->extra_type_filter);
       mime_types = g_app_info_get_supported_types (info);

- for (i = 0; mime_types[i]; i++)
+ for (i = 0; mime_types && mime_types[i]; i++)
         {
           if (!g_pattern_match_string (pattern, mime_types[i]))
             continue;
--
2.7.4

Revision history for this message
Trent Lloyd (lathiat) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-info-Fix-crash-when-application-supports-no-mime-typ.patch" 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
Brian Murray (brian-murray) wrote :
Changed in unity-control-center (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Stuart, or anyone else affected,

Accepted unity-control-center into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unity-control-center/15.04.0+16.04.20160705-0ubuntu1 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!

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

This bug was fixed in the package unity-control-center - 15.04.0+16.10.20160705.1-0ubuntu1

---------------
unity-control-center (15.04.0+16.10.20160705.1-0ubuntu1) yakkety; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * CcAppearancePanel: read COMPIZ_CONFIG_PROFILE value to choose the
    right settings path (LP: #1598770)

  [ Trent Lloyd ]
  * This patch fixes a crash when changing the default browser handler
    (LP: #1304388)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Tue, 05 Jul 2016 23:40:29 +0000

Changed in unity-control-center (Ubuntu):
status: Confirmed → Fix Released
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-control-center - 15.04.0+16.04.20160705-0ubuntu1

---------------
unity-control-center (15.04.0+16.04.20160705-0ubuntu1) xenial; urgency=medium

  [ Trent Lloyd ]
  * Fix crash when application supports no mime-type (LP: #1304388)

  [ Marco Trevisan (Treviño) ]
  * CcAppearancePanel: read COMPIZ_CONFIG_PROFILE value to choose the
    right settings path (LP: #1598770)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Tue, 05 Jul 2016 14:48:55 +0000

Changed in unity-control-center (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for unity-control-center 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.

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.