"gnome-control-center display" crashes if no RANDR extension

Bug #979959 reported by Stéphane Gourichon
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Invalid
Medium
TJ

Bug Description

The problem can be reproduced at will by clicking on display settings icon, but also by typing this :

gnome-control-center display

A window appears, complains "Could not get screen information" "RANDR extension is not present".

$ LC_ALL=C gnome-control-center display

(gnome-control-center:13078): Gtk-WARNING **: GtkTable does not have a property called expand

(gnome-control-center:13078): Gtk-WARNING **: GtkTable does not have a property called fill

(gnome-control-center:13078): Gtk-WARNING **: GtkTable does not have a property called position

(gnome-control-center:13078): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(gnome-control-center:13078): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Erreur de segmentation (core dumped)

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: gnome-control-center 1:3.4.0-0ubuntu6
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu2
Architecture: amd64
Date: Thu Apr 12 16:41:38 2012
ExecutablePath: /usr/bin/gnome-control-center
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120410)
ProcCmdline: gnome-control-center --overview
ProcEnviron:
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x7fb28dcb7c07 <gtk_widget_size_allocate+23>: mov 0x18(%rdi),%rbp
 PC (0x7fb28dcb7c07) ok
 source "0x18(%rdi)" (0x00000018) not located in a known VMA region (needed readable region)!
 destination "%rbp" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gnome-control-center
StacktraceTop:
 gtk_widget_size_allocate () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
 ?? () from /usr/lib/libgnome-control-center.so.1
 g_cclosure_marshal_VOID__BOXEDv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: gnome-control-center crashed with SIGSEGV in gtk_widget_size_allocate()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
usr_lib_gnome-control-center:
 activity-log-manager-control-center 0.9.4-0ubuntu3
 deja-dup 22.0-0ubuntu2
 gnome-bluetooth 3.2.2-0ubuntu5
 indicator-datetime 0.3.94-0ubuntu1

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

"No RANDR extension" was the result of clicking "nvidia-settings" (installed automatically by Ubuntu installer) to use external monitor as "separate X screen" with "xinerama", no need to open a terminal to get into this.

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

StacktraceTop:
 gtk_widget_size_allocate (widget=0x0, allocation=0x7fff56391130) at /build/buildd/gtk+3.0-3.4.0/./gtk/gtkwidget.c:4872
 ?? () from /tmp/tmpLg5uJs/usr/lib/libgnome-control-center.so.1
 g_cclosure_marshal_VOID__BOXEDv (closure=0x7fb2903e1d30, return_value=<optimized out>, instance=0x7fb290845120, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x7fb2903e1da0) at /build/buildd/glib2.0-2.32.0/./gobject/gmarshal.c:1160
 _g_closure_invoke_va (closure=0x7fb2903e1d30, return_value=0x0, instance=0x7fb290845120, args=0x7fff56391468, n_params=1, param_types=<optimized out>) at /build/buildd/glib2.0-2.32.0/./gobject/gclosure.c:840
 g_signal_emit_valist (instance=0x7fb290845120, signal_id=<optimized out>, detail=0, var_args=<optimized out>) at /build/buildd/glib2.0-2.32.0/./gobject/gsignal.c:3207

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 gnome-control-center (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
visibility: private → public
Revision history for this message
TJ (tj) wrote :

The message "RANDR extension is not present" originates from the package "gnome-desktop3"

libgnome-desktop/gnome-rr.c::gnome_rr_screen_initable_init()

if (XRRQueryExtension (dpy, &event_base, &ignore))
{
...
}
else
{
   g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_NO_RANDR_EXTENSION,
                   _("RANDR extension is not present"));

  return false;
}

Revision history for this message
TJ (tj) wrote :

libgnome-desktop/gnome-rr.c::gnome_rr_screen_new() says:

 * Returns: a unique #GnomeRRScreen instance, specific to the @screen, or NULL
 * if this could not be created, for instance if the driver does not support
 * Xrandr 1.2. Each #GdkScreen thus has a single instance of #GnomeRRScreen.

therefore in gnome-control-center panels/display/cc-diaply-panel.c::cc_display_panel_constructor() the following code is incorrect:

  self->priv->screen = gnome_rr_screen_new (gdk_screen_get_default (), &error);
  g_signal_connect (self->priv->screen, "changed", G_CALLBACK (on_screen_changed), self);
  if (!self->priv->screen)
    {
      error_message (NULL, _("Could not get screen information"), error->message);
      g_error_free (error);

if the call to gnome_rr_screen_new() returns NULL, as it will if no RANDR is available, the subsequent setup of the signal:

g_signal_connect (self->priv->screen, "changed", G_CALLBACK (on_screen_changed), self);

is done with self->priv->screen == NULL

So when that signal fires it passes a NULL screen pointer to on_screen_changed(). Passing the NULL pointer doesn't matter since it isn't used in the call-back, but self->priv->screen is used:

on_screen_changed (GnomeRRScreen *scr,
                   gpointer data)
{
  GnomeRRConfig *current;
  CcDisplayPanel *self = data;

  current = gnome_rr_config_new_current (self->priv->screen, NULL);
  gnome_rr_config_ensure_primary (current);

So current will be NULL after calling gnome_rr_config_new_current()

TJ (tj)
Changed in gnome-control-center (Ubuntu):
status: New → In Progress
assignee: nobody → TJ (tj)
Revision history for this message
TJ (tj) wrote :

I've uploaded the potential fix to my PPA for Precise. Please test and report back.

https://launchpad.net/~tj/+archive/bugfixes

Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug hasn't seen any activity in years and there has been no recent similar reports, the code also changed quite a lot since and it's likely the issue doesn't exist anymore. Closing, feel free to open a new report if you still get problems in recent Ubuntu versions

Changed in gnome-control-center (Ubuntu):
status: In Progress → Invalid
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Makes sense. Besides, I've been using XFCE for a long time now, so have not had any visibility whether this bug still occurs with Gnome.

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.