Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-display-properties closes dialog upon clicking "apply" #106

Closed
balwierz opened this issue May 30, 2014 · 7 comments
Closed

mate-display-properties closes dialog upon clicking "apply" #106

balwierz opened this issue May 30, 2014 · 7 comments

Comments

@balwierz
Copy link

It is a standard assumption that "OK" button applies settings and closes a dialog box, but "Apply" only applies the settings without closing a dialog.

In mate-display-properties "Apply" closes the dialog box.
It is wrong for two reasons:

  1. it breaks the aforementioned convention
  2. users often play with resolution settings, turn displays on and off and reorganize them until they achieve what looks best for them. It is hard to imaging anyone preferring to launch mate-display-properties several times during this process.

Solution:

  • Change the behavior of "Apply" to not to close the window.
  • [optional] Add "OK" button which does what "Apply" currently does.
@infirit
Copy link
Contributor

infirit commented May 30, 2014

I suspect that is actually crashing 😉. Run it from a terminal and check if you see a segfault, if so do post a gdb backtrace.

@balwierz
Copy link
Author

Yes, you are right. It is crashing. I was fooled by a subsequent window asking whether to keep or restore the configuration (I thought it was still mate-display-properties).
Backtrace here:

(gdb) r
Starting program: /usr/bin/mate-display-properties 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffecc58700 (LWP 25915)]
[New Thread 0x7fffe7fff700 (LWP 25916)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000006aa0b0 in ?? ()
(gdb) backtrace 
#0  0x00000000006aa0b0 in ?? ()
#1  0x00007ffff70fb313 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#2  0x00007ffff70fc8f6 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#3  0x00007ffff70fc99e in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#4  0x00007ffff609eb84 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff609edc8 in ?? () from /usr/lib/libglib-2.0.so.0
#6  0x00007ffff609f08a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#7  0x00007ffff740cc72 in gtk_dialog_run () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00000000004067d3 in main ()

@karllinden
Copy link

I can confirm this bug. It is reproducible on git master.

Here is a more detailed backtrace:

GNU gdb (Gentoo 7.8 vanilla) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mate-display-properties...Reading symbols from /usr/lib64/debug//usr/bin/mate-display-properties.debug...done.
done.
(gdb) run
Starting program: /usr/bin/mate-display-properties 
Got object file from memory but can't read symbols: File truncated.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x2aaaac030700 (LWP 29597)]
[New Thread 0x2aaaac231700 (LWP 29598)]

Program received signal SIGSEGV, Segmentation fault.
0x0000003fadc5b611 in gdk_event_apply_filters (filters=0x7, 
    event=<optimized out>, xevent=<optimized out>)
    at /usr/src/debug/x11-libs/gtk+-2.24.24/gtk+-2.24.24/gdk/x11/gdkevents-x11.c:356
356       result = filter->function (xevent, event, filter->data);
(gdb) backtrace full
#0  0x0000003fadc5b611 in gdk_event_apply_filters (filters=0x7, 
    event=<optimized out>, xevent=<optimized out>)
    at /usr/src/debug/x11-libs/gtk+-2.24.24/gtk+-2.24.24/gdk/x11/gdkevents-x11.c:356
        filter = 0x72f100
        result = (unknown: 7532800)
#1  gdk_event_translate (display=0x640020, event=0x8152c0, 
    xevent=0x7fffffffd880, return_exposes=6650400, return_exposes@entry=0)
    at /usr/src/debug/x11-libs/gtk+-2.24.24/gtk+-2.24.24/gdk/x11/gdkevents-x11.c:1052
        return_val = -10112
#2  0x0000003fadc5cc26 in _gdk_events_queue (display=display@entry=0x640020)
    at /usr/src/debug/x11-libs/gtk+-2.24.24/gtk+-2.24.24/gdk/x11/gdkevents-x11.c:2336
        node = 0x7805a0
        event = 0x8152c0
        xevent = {type = 88, xany = {type = 88, serial = 3288, send_event = 0, 
            display = 0x62ec00, window = 483}, xkey = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, window = 483, 
            root = 483, subwindow = 6950864, time = 18019, x = 65535, y = 1, 
            x_root = 3600, y_root = 1080, state = 953, keycode = 286, 
            same_screen = 1}, xbutton = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, root = 483, 
            subwindow = 6950864, time = 18019, x = 65535, y = 1, 
            x_root = 3600, y_root = 1080, state = 953, button = 286, 
            same_screen = 1}, xmotion = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, root = 483, 
            subwindow = 6950864, time = 18019, x = 65535, y = 1, 
            x_root = 3600, y_root = 1080, state = 953, is_hint = 30 '\036', 
            same_screen = 1}, xcrossing = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, root = 483, 
            subwindow = 6950864, time = 18019, x = 65535, y = 1, 
            x_root = 3600, y_root = 1080, mode = 953, detail = 286, 
            same_screen = 1, focus = 0, state = 0}, xfocus = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, window = 483, 
            mode = 483, detail = 0}, xexpose = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, x = 483, y = 0, 
            width = 6950864, height = 0, count = 18019}, xgraphicsexpose = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            drawable = 483, x = 483, y = 0, width = 6950864, height = 0, 
            count = 18019, major_code = 0, minor_code = 65535}, xnoexpose = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            drawable = 483, major_code = 483, minor_code = 0}, xvisibility = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            window = 483, state = 483}, xcreatewindow = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, parent = 483, 
            window = 483, x = 6950864, y = 0, width = 18019, height = 0, 
            border_width = 65535, override_redirect = 1}, xdestroywindow = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            event = 483, window = 483}, xunmap = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, event = 483, window = 483, 
            from_configure = 6950864}, xmap = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, event = 483, window = 483, 
            override_redirect = 6950864}, xmaprequest = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, parent = 483, 
            window = 483}, xreparent = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, event = 483, window = 483, 
            parent = 6950864, x = 18019, y = 0, override_redirect = 65535}, 
          xconfigure = {type = 88, serial = 3288, send_event = 0, 
            display = 0x62ec00, event = 483, window = 483, x = 6950864, y = 0, 
            width = 18019, height = 0, border_width = 65535, 
            above = 4638564683280, override_redirect = 953}, xgravity = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            event = 483, window = 483, x = 6950864, y = 0}, xresizerequest = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            window = 483, width = 483, height = 0}, xconfigurerequest = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            parent = 483, window = 483, x = 6950864, y = 0, width = 18019, 
            height = 0, border_width = 65535, above = 4638564683280, 
            detail = 953, value_mask = 1}, xcirculate = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, event = 483, 
            window = 483, place = 6950864}, xcirculaterequest = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, parent = 483, 
            window = 483, place = 6950864}, xproperty = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, window = 483, 
            atom = 483, time = 6950864, state = 18019}, xselectionclear = {
            type = 88, serial = 3288, send_event = 0, display = 0x62ec00, 
            window = 483, selection = 483, time = 6950864}, 
          xselectionrequest = {type = 88, serial = 3288, send_event = 0, 
            display = 0x62ec00, owner = 483, requestor = 483, 
            selection = 6950864, target = 18019, property = 4295032831, 
            time = 4638564683280}, xselection = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, requestor = 483, 
            selection = 483, target = 6950864, property = 18019, 
            time = 4295032831}, xcolormap = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, colormap = 483, 
            new = 6950864, state = 0}, xclient = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, 
            message_type = 483, format = 6950864, data = {
              b = "cF\000\000\000\000\000\000ÿÿ\000\000\001\000\000\000\020\016\000", s = {18019, 0, 0, 0, -1, 0, 1, 0, 3600, 0}, l = {18019, 4295032831, 
                4638564683280, 1228360647609, 1}}}, xmapping = {type = 88, 
---Type <return> to continue, or q <return> to quit---
            serial = 3288, send_event = 0, display = 0x62ec00, window = 483, 
            request = 483, first_keycode = 0, count = 6950864}, xerror = {
            type = 88, display = 0xcd8, resourceid = 0, serial = 6482944, 
            error_code = 227 'ã', request_code = 1 '\001', 
            minor_code = 0 '\000'}, xkeymap = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, window = 483, 
            key_vector = "ã\001\000\000\000\000\000\000Ð\017j\000\000\000\000\000cF\000\000\000\000\000\000ÿÿ\000\000\001\000\000"}, xgeneric = {type = 88, 
            serial = 3288, send_event = 0, display = 0x62ec00, 
            extension = 483, evtype = 0}, xcookie = {type = 88, serial = 3288, 
            send_event = 0, display = 0x62ec00, extension = 483, evtype = 0, 
            cookie = 483, data = 0x6a0fd0}, pad = {227633266776, 3288, 0, 
            6482944, 483, 483, 6950864, 18019, 4295032831, 4638564683280, 
            1228360647609, 1, 0, 0, 0, 0, 81, 7840272, 7900368, 0, 0, 0, 33, 
            7899232}}
        xdisplay = 0x62ec00
#3  0x0000003fadc5ccde in gdk_event_dispatch (source=<optimized out>, 
    callback=<optimized out>, user_data=<optimized out>)
    at /usr/src/debug/x11-libs/gtk+-2.24.24/gtk+-2.24.24/gdk/x11/gdkevents-x11.c:2397
        display = 0x640020
        event = <optimized out>
#4  0x0000003fa984ba64 in g_main_dispatch (context=0x64eab0)
    at /usr/src/debug/dev-libs/glib-2.40.0-r1/glib-2.40.0/glib/gmain.c:3064
        dispatch = 0x3fadc5ccc0 <gdk_event_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x0
        callback = 0x0
        cb_funcs = <optimized out>
        cb_data = <optimized out>
        need_destroy = <optimized out>
        source = 0x64e9c0
        current = 0x6866b0
        i = 0
#5  g_main_context_dispatch (context=context@entry=0x64eab0)
    at /usr/src/debug/dev-libs/glib-2.40.0-r1/glib-2.40.0/glib/gmain.c:3663
No locals.
#6  0x0000003fa984bd45 in g_main_context_iterate (context=0x64eab0, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /usr/src/debug/dev-libs/glib-2.40.0-r1/glib-2.40.0/glib/gmain.c:3734
        max_priority = 0
        timeout = 0
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 3
        fds = 0x7bf050
#7  0x0000003fa984c0d2 in g_main_loop_run (loop=0x853a90)
    at /usr/src/debug/dev-libs/glib-2.40.0-r1/glib-2.40.0/glib/gmain.c:3928
        __FUNCTION__ = "g_main_loop_run"
#8  0x0000003fac8baef3 in IA__gtk_dialog_run (dialog=0x66f0f0)
    at /usr/src/debug/x11-libs/gtk+-2.24.24/gtk+-2.24.24/gtk/gtkdialog.c:1094
        ri = {dialog = 0x0, response_id = -1, loop = 0x853a90, destroyed = 0}
        was_modal = 0
        response_handler = 253
        unmap_handler = 254
        destroy_handler = 256
        delete_handler = 255
        __FUNCTION__ = "IA__gtk_dialog_run"
#9  0x000000000040687b in run_application (app=0x650200)
    at xrandr-capplet.c:2526
        builder = <optimized out>
        align = <optimized out>
        error = 0x0
#10 main (argc=1, argv=0x7fffffffdc88) at xrandr-capplet.c:2573
        app = 0x650200
(gdb) continue
Continuing.
[Thread 0x2aaaac030700 (LWP 29597) exited]
[Thread 0x2aaaaaae2a40 (LWP 29581) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) quit

@nachanon
Copy link

Also reproducible on MATE 1.8.1, Debian Wheezy 32-bit.

I still keep the core dump too.

MATE: MATE 1.8.1 (from Debian backports repository)
System: Debian GNU/Linux 7.0 "Wheezy" i386
Display Adapter: Intel i915 (xorg-video-intel driver)
Machine: Samsung NP370R4V-S01TH Laptop

@nachanon
Copy link

mate-display-properties will crash even when it didn't change the resolution itself,
but other program (like xrandr or arandr) did. And it shows a very similar backtrace.

(I used xrandr -s 1024x768 to change resolution)

To reproduce (in general):

  • Open one terminal window, run mate-display-properties.
  • Open another terminal window, change screen resolution with xrandr command.
  • mate-display-properties will crash. (Shows "Segmentation fault" on the first terminal window)

MATE: MATE 1.8.1 (from Debian backports repository)
System: Debian GNU/Linux 7.0 "Wheezy" i386
Display Adapter: Intel i915 (xorg-video-intel driver)
Machine: Samsung NP370R4V-S01TH Laptop

@nachanon
Copy link

nachanon commented Nov 3, 2014

There's another thing on this issue:
If you run mate-display-properties and click "Apply" without changing anything, it will not crash.

However,

If you used xrandr to change resolution first, mate-display-properties will still crash:

  • Use xrandr to change screen to other resolution.
  • Run mate-display-properties, and click "Apply" without changing anything.
  • mate-display-properties will crash.

Compare and contrast:

  • Run mate-display-properties to change screen to other resolution (crashes as usual).
  • Run mate-display-properties again, and click "Apply" without changing anything.
  • mate-display-properties will not crash. (Screenshot)

I've compared xrandr --verbose result of each corresponding step in these two scenario, and found no difference.

So there might something funny going on in mate-display-properties, maybe it's not about XRandR event handler, but about a code that stores current screen resolution in to the configuration file.

MATE: MATE 1.8.1 (from Debian backports repository)
System: Debian GNU/Linux 7.0 "Wheezy" i386
Display Adapter: Intel i915 (xorg-video-intel driver)
Machine: Samsung NP370R4V-S01TH Laptop

@stefano-k
Copy link
Collaborator

Duplicate of #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants