After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654012 - gnome-control-center crashed with SIGSEGV in gnome_rr_screen_get_output_by_name()
gnome-control-center crashed with SIGSEGV in gnome_rr_screen_get_output_by_na...
Status: RESOLVED INCOMPLETE
Product: gnome-control-center
Classification: Core
Component: Display
3.0.x
Other Linux
: Normal critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-05 14:27 UTC by Pedro Villavicencio
Modified: 2011-08-25 04:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.91/3.0


Attachments
gnome-rr.c: use g_strcmp0() instead of strcmp() to prevent a potential crash (831 bytes, patch)
2011-07-05 15:17 UTC, Rui Matos
rejected Details | Review

Description Pedro Villavicencio 2011-07-05 14:27:04 UTC
this bug report has been filed here:

https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/805146

Backtrace:

".

Thread 1 (Thread 16971)

  • #0 __strcmp_ssse3
    at ../sysdeps/x86_64/multiarch/../strcmp.S line 214
  • #1 gnome_rr_screen_get_output_by_name
    at gnome-rr.c line 1573
  • #2 get_current_modes
    at xrandr-capplet.c line 308
  • #3 rebuild_resolution_combo
    at xrandr-capplet.c line 635
  • #4 rebuild_gui
    at xrandr-capplet.c line 689
  • #5 on_output_event
    at xrandr-capplet.c line 1618
  • #6 emit_input
    at scrollarea.c line 788
  • #7 process_event
    at scrollarea.c line 854
  • #8 foo_scroll_area_button_press
    at scrollarea.c line 901
  • #9 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkmarshalers.c line 85
  • #10 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #11 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3294
  • #12 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2997
  • #13 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #14 gtk_widget_event_internal
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 6104
  • #15 gtk_propagate_event
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkmain.c line 2610
  • #16 gtk_main_do_event
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkmain.c line 1880
  • #17 gdk_event_source_dispatch
    at /build/buildd/gtk+3.0-3.1.6/./gdk/x11/gdkeventsource.c line 360
  • #18 g_main_dispatch
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 2477
  • #19 g_main_context_dispatch
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 3050
  • #20 g_main_context_iterate
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 3128
  • #21 g_main_loop_run
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 3336
  • #22 gtk_main
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkmain.c line 1363
  • #23 g_application_run
    at /build/buildd/glib2.0-2.29.8/./gio/gapplication.c line 1326
  • #24 main
    at control-center.c line 180

Comment 1 Rui Matos 2011-07-05 15:16:51 UTC
I can't reproduce this. The code is wrong, I just can't figure *why*.

On the g-c-c side we are using gnome_rr_screen_get_output_by_name() without ever setting a name. On the libgnome-desktop side we have a name field in GnomeRROutputInfoPrivate but there's only the initialization to NULL and we don't even provide a way to set it. Giovanni, you last touched this code, do you know what's going on ?
Comment 2 Rui Matos 2011-07-05 15:17:05 UTC
Created attachment 191328 [details] [review]
gnome-rr.c: use g_strcmp0() instead of strcmp() to prevent a potential crash
Comment 3 Bastien Nocera 2011-07-05 15:19:06 UTC
That's most likely the wrong patch...
Comment 4 Giovanni Campagna 2011-07-05 17:09:11 UTC
(In reply to comment #1)
> I can't reproduce this. The code is wrong, I just can't figure *why*.
> 
> On the g-c-c side we are using gnome_rr_screen_get_output_by_name() without
> ever setting a name. On the libgnome-desktop side we have a name field in
> GnomeRROutputInfoPrivate but there's only the initialization to NULL and we
> don't even provide a way to set it. Giovanni, you last touched this code, do
> you know what's going on ?

GnomeRROutputInfo is not GnomeRROutput. The former is a configuration entry inside GnomeRRConfig, the latter is a wrapper aroung XRandR info.
GnomeRROutput->name is set at line 1463 of gnome-rr.c from XRandR data, and I didn't touch it.
Comment 5 Rui Matos 2011-07-05 19:54:02 UTC
(In reply to comment #3)
> That's most likely the wrong patch...

Was being lazy :-)

(In reply to comment #4)
> GnomeRROutputInfo is not GnomeRROutput. The former is a configuration entry
> inside GnomeRRConfig, the latter is a wrapper aroung XRandR info.
> GnomeRROutput->name is set at line 1463 of gnome-rr.c from XRandR data, and I
> didn't touch it.

Right, I think I've grokked it now. I don't see how XRRGetOutputInfo() can return us a NULL for name without crashing itself though.

It might be interesting to know if this is always reproducible for the reporter and if so, what's the output of 'xrandr' there.
Comment 6 Pedro Villavicencio 2011-07-05 20:08:37 UTC
I'm asking for that information on the downstream report.
Comment 7 Akhil Laddha 2011-08-25 04:48:06 UTC
I don't see any update in downstream bug.

Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!