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 protected]>
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


** Bug watch added: Red Hat Bugzilla #1193680
   https://bugzilla.redhat.com/show_bug.cgi?id=1193680

** Bug watch added: GNOME Bug Tracker #744695
   https://bugzilla.gnome.org/show_bug.cgi?id=744695

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity-control-center in Ubuntu.
https://bugs.launchpad.net/bugs/1304388

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

Status in unity-control-center package in Ubuntu:
  Confirmed

Bug description:
  Crash report and bug appeared straight after boot, cause unknown, though 
system went on to run normally after.
  Ubuntu 14.04 Beta 2

  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1304388/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to