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 552051 - gnome-display-properties crashed with SIGSEGV in strcmp()
gnome-display-properties crashed with SIGSEGV in strcmp()
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Display
2.23.x
Other All
: Normal critical
: ---
Assigned To: Soren Sandmann Pedersen
Control-Center Maintainers
Depends on:
Blocks: randr-tracker
 
 
Reported: 2008-09-12 23:16 UTC by James Westby
Modified: 2009-02-26 02:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch to check for NULL output->name (660 bytes, patch)
2008-09-12 23:17 UTC, James Westby
none Details | Review

Description James Westby 2008-09-12 23:16:14 UTC
Steps to reproduce:
Originally reported at https://bugs.launchpad.net/bugs/269595

The display capplet can crash in on_screen_changed(), when output->name
is NULL.

Stack trace:
  • #0 strcmp
    from /lib/libc.so.6
  • #1 on_screen_changed
    at xrandr-capplet.c line 171
  • #2 screen_update
    at gnome-rr.c line 381
  • #3 screen_on_event
    at gnome-rr.c line 407
  • #4 gdk_event_translate
    at /build/buildd/gtk+2.0-2.14.1/gdk/x11/gdkevents-x11.c line 349
  • #5 _gdk_events_queue
    at /build/buildd/gtk+2.0-2.14.1/gdk/x11/gdkevents-x11.c line 2299
  • #6 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.14.1/gdk/x11/gdkevents-x11.c line 2359
  • #7 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.18.0/glib/gmain.c line 2142
  • #8 g_main_context_iterate
    at /build/buildd/glib2.0-2.18.0/glib/gmain.c line 2775
  • #9 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.18.0/glib/gmain.c line 2983
  • #10 IA__gtk_dialog_run
    at /build/buildd/gtk+2.0-2.14.1/gtk/gtkdialog.c line 1068
  • #11 main
    at xrandr-capplet.c line 1868

Other information:
Comment 1 James Westby 2008-09-12 23:17:58 UTC
Created attachment 118633 [details] [review]
Patch to check for NULL output->name

Hi,

This patch should prevent the crash. It may no lead to correct
results if it means none of the screen names match, but it seems
like that could be the case with the current code.

Thanks,

James
Comment 2 Soren Sandmann Pedersen 2008-09-13 11:31:44 UTC
Is this reproducable in some way? I don't think output->name should ever be NULL there unless there is memory corruption or something like that. Does the X server actually send a NULL name for the output? 

Ie., in output_initialize() is info->name actually NULL?
Comment 3 James Westby 2008-09-13 11:52:12 UTC
Hi,

I don't have a recipe to reproduce it. However, in
gnome-desktop there are many checks for output->name
being NULL, so I figured adding one more was the right
thing to do.

Thanks,

James
Comment 4 Federico Mena Quintero 2009-02-26 02:15:59 UTC
The patch doesn't apply anymore.  Marking as obsolete.