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

GTK3: applets crashing on transparent panel if switching compositor off #369

Closed
raveit65 opened this Issue Nov 11, 2015 · 68 comments

Comments

Projects
None yet
5 participants
@raveit65
Copy link
Member

raveit65 commented Nov 11, 2015

Steps to reproduce:
Choose a transparency panel bg color.
Switch marcos compositor off
Most applets are crashing and you was ask to reload them.

@raveit65 raveit65 added the confirmed label Nov 11, 2015

@raveit65 raveit65 added this to the Gtk+3 milestone Nov 11, 2015

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Dec 24, 2015

Confirmed. Only with stickynotes though, and it took me a lot of tries to trigger it.

Dammit. It fails exactly at the same place as in that bug with moving transparency slider too fast...
And X function that fails is properly wrapped in push/pop, so it should never crash there. I've moved push/pop closer to that function call but it didn't help at all.

(gdb) bt full
#0  0x00007f4acd09f88b in g_logv (breakpoint=1) at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmessages.c:324
        domain = 0x0
        data = 0x0
        depth = 1
        log_func = 0x7f4acd09f050 <g_log_default_handler>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = <optimized out>
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x1ae9610 "The program 'stickynotes-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 5358 error_cod"...
        msg_alloc = 0x1ae9610 "The program 'stickynotes-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 5358 error_cod"...
        i = 2
#1  0x00007f4acd09f88b in g_logv (log_domain=0x7f4ace77482e "Gdk", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7fff195aeae0)
    at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmessages.c:1081
        domain = 0x0
        data = 0x0
        depth = 1
        log_func = 0x7f4acd09f050 <g_log_default_handler>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = <optimized out>
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x1ae9610 "The program 'stickynotes-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 5358 error_cod"...
        msg_alloc = 0x1ae9610 "The program 'stickynotes-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 5358 error_cod"...
        i = 2
#2  0x00007f4acd09f9ff in g_log (log_domain=log_domain@entry=0x7f4ace77482e "Gdk", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f4ace79185f "%s") at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmessages.c:1119
        args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fff195aebc0, reg_save_area = 0x7fff195aeb00}}
#3  0x00007f4ace742d18 in _gdk_x11_display_error_event (display=display@entry=0x1979020 [GdkX11Display], error=error@entry=0x7fff195aeca0)
    at /build/gtk+3.0-SLiI62/gtk+3.0-3.18.6/./gdk/x11/gdkdisplay-x11.c:2640
        buf = "BadPixmap (invalid Pixmap parameter)", '\000' <repeats 27 times>
        msg = <optimized out>
        display_x11 = 0x1979020 [GdkX11Display]
        tmp_list = <optimized out>
        ignore = 0
#4  0x00007f4ace74df69 in gdk_x_error (xdisplay=0x1966400, error=0x7fff195aeca0) at /build/gtk+3.0-SLiI62/gtk+3.0-3.18.6/./gdk/x11/gdkmain-x11.c:303
        error_display = 0x1979020 [GdkX11Display]
        manager = <optimized out>
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator': 
        displays = 0x1a43650
        error = 0x7fff195aeca0
        xdisplay = 0x1966400
#5  0x00007f4acc99646d in _XError (dpy=dpy@entry=0x1966400, rep=rep@entry=0x1db5fd0) at ../../src/XlibInt.c:1429
        rtn_val = <optimized out>
        event = 
            {type = 0, xany = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828}, xkey = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, root = 15434928969611464448, subwindow = 140733618777336, time = 26637904, x = 5360, y = 0, x_root = 425---Type <return> to continue, or q <return> to quit---
389376, y_root = 32767, state = 425389584, keycode = 32767, same_screen = -882460031}, xbutton = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, root = 15434928969611464448, subwindow = 140733618777336, time = 26637904, x = 5360, y = 0, x_root = 425389376, y_root = 32767, state = 425389584, button = 32767, same_screen = -882460031}, xmotion = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, root = 15434928969611464448, subwindow = 140733618777336, time = 26637904, x = 5360, y = 0, x_root = 425389376, y_root = 32767, state = 425389584, is_hint = -1 '\377', same_screen = -882460031}, xcrossing = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, root = 15434928969611464448, subwindow = 140733618777336, time = 26637904, x = 5360, y = 0, x_root = 425389376, y_root = 32767, mode = 425389584, detail = 32767, same_screen = -882460031, focus = 32586, state = 425389336}, xfocus = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, mode = -1089220864, detail = -701242850}, xexpose = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, x = -1089220864, y = -701242850, width = 425389304, height = 32767, count = 26637904}, xgraphicsexpose = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, drawable = 13828, x = -1089220864, y = -701242850, width = 425389304, height = 32767, count = 26637904, major_code = 0, minor_code = 5360}, xnoexpose = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, drawable = 13828, major_code = -1089220864, minor_code = -701242850}, xvisibility = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, state = -1089220864}, xcreatewindow = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, parent = 13828, window = 15434928969611464448, x = 425389304, y = 32767, width = 26637904, height = 0, border_width = 5360, override_redirect = 0}, xdestroywindow = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448}, xunmap = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448, from_configure = 425389304}, xmap = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448, override_redirect = 425389304}, xmaprequest = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, parent = 13828, window = 15434928969611464448}, xreparent = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448, parent = 140733618777336, x = 26637904, y = 0, override_redirect = 5360}, xconfigure = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448, x = 425389304, y = 32767, width = 26637904, height = 0, border_width = 5360, above = 140733618777408, override_redirect = 425389584}, xgravity = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448, x = 425389304, y = 32767}, xresizerequest = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, width = -1089220864, height = -701242850}, xconfigurerequest = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, parent = 13828, window = 15434928969611464448, x = 425389304, y = 32767, width = 26637904, height = 0, border_width = 5360, above = 140733618777408, detail = 425389584, value_mask = 139959216814721}, xcirculate = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, event = 13828, window = 15434928969611464448, place = 425389304}, xcirculaterequest = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, parent = 13828, window = 15434928969611464448, place = 425389304}, xproperty = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, atom = 15434928969611464448, time = 140733618777336, state = 26637904}, xselectionclear = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, selection = 15434928969611464448, time = 140733618777336}, xselectionrequest = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, owner = 13828, requestor = 15434928969611464448, selection = 140733618777336, target = 26637904, property = 5360, time = 140733618777408}, xselection = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, requestor = 13828, selection = 15434928969611464448, target = 140733618777336, property = 26637904, time = 5360}, xcolormap = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, colormap = 15434928969611464448, new = 425389304, state = 32767}, xclient = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, message_type = 15434928969611464448, format = 425389304, data = {b = "Pv\226\001\000\000\000\000\360\024\000\000\000\000\000\000@\355Z\031", s = {30288, 406, 0, 0, 5360, 0, 0, 0, -4800, 6490}, l = {26637904, 5360, 140733618777408, 140733618777616, 139959216814721}}}, xmapping = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, request = -1089220864, first_keycode = -701242850, count = 425389304}, xerror = {type = 0, display = 0x1966400, resourceid = 58721408, serial = 5358, error_code = 4 '\004', request_code = 54 '6', minor_code = 0 '\000'}, xkeymap = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, window = 13828, key_vector = "\000\317\023\277\036\342\063\326\370\354Z\031\377\177\000\000Pv\226\001\000\000\000\000\360\024\000\000\000\000\000"}, xgeneric = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, extension = 13828, evtype = 0}, xcookie = {type = 0, serial = 26633216, send_event = 58721408, display = 0x14ee, extension = 13828, evtype = 0, cookie = 3205746432, data = 0x7fff195aecf8}, pad = {140733193388032, 26633216, 58721408, 5358, 13828, -3011815104098087168, 140733618777336, 26637904, 5360, 140733618777408, 140733618777616, 139959216814721, 140733618777368, 139959216815045, 24, 0, 5360, 140733618777408, 0, 0, 1, -1, 0, 0}}
        async = <optimized out>
        next = <optimized out>
#6  0x00007f4acc9933a7 in handle_error (dpy=0x1966400, err=0x1db5fd0, in_XReply=<optimized out>) at ../../src/xcb_io.c:213
        ext = <optimized out>
        ret_code = 0
#7  0x00007f4acc993465 in handle_response (dpy=dpy@entry=0x1966400, response=0x1db5fd0, in_XReply=in_XReply@entry=1) at ../../src/xcb_io.c:325
        async = <optimized out>
        next = <optimized out>
#8  0x00007f4acc994420 in _XReply (dpy=dpy@entry=0x1966400, rep=rep@entry=0x7fff195aee80, extra=extra@entry=0, discard=discard@entry=1)
    at ../../src/xcb_io.c:627
        event = <optimized out>
---Type <return> to continue, or q <return> to quit---
        req = 0x1cc93c0
        response = 0x0
        error = 0x0
        c = 0x1967650
        reply = <optimized out>
        current = 0x1cc93c0
        __PRETTY_FUNCTION__ = "_XReply"
#9  0x00007f4acc978cfe in XGetGeometry (dpy=0x1966400, d=d@entry=31480713, root=root@entry=0x7fff195aef50, x=x@entry=0x7fff195aef38, y=y@entry=0x7fff195aef3c, width=width@entry=0x7fff195aef40, height=0x7fff195aef44, borderWidth=0x7fff195aef48, depth=0x7fff195aef4c) at ../../src/GetGeom.c:47
        rep = 
          {type = 64 '@', depth = 203 '\313', sequenceNumber = 425, length = 0, root = 28040752, x = 0, y = 0, width = 45168, height = 408, borderWidth = 0, pad1 = 0, pad2 = 31480713, pad3 = 0}
        req = <optimized out>
#10 0x00007f4acf98384b in mate_panel_applet_get_background (xid=31480713, visual=0x198b070 [GdkX11Visual], display=0x1979020 [GdkX11Display])
    at mate-panel-applet.c:1386
        window = 30184385
        y = 32586
        border = 3446521218
        depth = 32586
        result = 0
        x = -854774928
        width = 3446521213
        height = 32586
        surface = <optimized out>
        window = 0x1db65c0 [GdkX11Window]
        width = <optimized out>
        height = <optimized out>
        cr = <optimized out>
        pattern = <optimized out>
        pixmap_id = 31480713
        x = 1112
        y = 0
        retval = PANEL_NO_BACKGROUND
        elements = <optimized out>
#11 0x00007f4acf98384b in mate_panel_applet_get_background (y=0, x=1112, xid=31480713, applet=<optimized out>) at mate-panel-applet.c:1440
        surface = <optimized out>
        window = 0x1db65c0 [GdkX11Window]
        width = <optimized out>
        height = <optimized out>
        cr = <optimized out>
        pattern = <optimized out>
        pixmap_id = 31480713
        x = 1112
        y = 0
        retval = PANEL_NO_BACKGROUND
        elements = <optimized out>
#12 0x00007f4acf98384b in mate_panel_applet_get_background (pattern=0x7fff195aefa8, color=<optimized out>, applet=<optimized out>)
    at mate-panel-applet.c:1583
        pixmap_id = 31480713
        x = 1112
        y = 0
        retval = PANEL_NO_BACKGROUND
---Type <return> to continue, or q <return> to quit---
        elements = <optimized out>
#13 0x00007f4acf98384b in mate_panel_applet_get_background (applet=<optimized out>, color=<optimized out>, pattern=0x7fff195aefa8)
    at mate-panel-applet.c:1635
#14 0x00007f4acf983a0d in mate_panel_applet_handle_background (applet=applet@entry=0x19d21c0 [MatePanelApplet]) at mate-panel-applet.c:1704
        type = <optimized out>
        color = {red = 0, green = 0, blue = 0, alpha = 0}
        pattern = 0x0
        __func__ = "mate_panel_applet_handle_background"
#15 0x00007f4acf983dc6 in mate_panel_applet_set_background_string (applet=0x19d21c0 [MatePanelApplet], background=0x7f4ab8006618 "pixmap:31480713,1112,0")
    at mate-panel-applet.c:1654
        background = 0x7f4ab8006618 "pixmap:31480713,1112,0"
        applet = 0x19d21c0 [MatePanelApplet]
#16 0x00007f4acf983f65 in set_property_cb (connection=<optimized out>, sender=<optimized out>, object_path=object_path@entry=0x7f4ab80071c0 "/org/mate/panel/applet/StickyNotesApplet/0", interface_name=interface_name@entry=0x1a58d60 "org.mate.panel.applet.Applet", property_name=property_name@entry=0x7f4ab800660d "Background", value=value@entry=0x1b13840, error=0x7fff195af078, user_data=0x19d21c0) at mate-panel-applet.c:2344
        applet = 0x19d21c0 [MatePanelApplet]
#17 0x00007f4acd681ee8 in invoke_set_property_in_idle_cb (_data=0x7f4ab80070f0) at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./gio/gdbusconnection.c:4169
        error = 0x0
        reply = <optimized out>
        value = 0x1b13840
        __func__ = "invoke_set_property_in_idle_cb"
#18 0x00007f4acd098e9a in g_main_context_dispatch (context=0x197b4f0) at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmain.c:3154
        dispatch = 0x7f4acd095950 <g_idle_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x7f4ab80070f0
        callback = 0x7f4acd681e40 <invoke_set_property_in_idle_cb>
        cb_funcs = <optimized out>
        cb_data = 0x7f4ab8004310
        need_destroy = <optimized out>
        source = 0x7f4ab800de00
        current = 0x19b3f50
        i = 0
#19 0x00007f4acd098e9a in g_main_context_dispatch (context=context@entry=0x197b4f0) at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmain.c:3769
#20 0x00007f4acd099240 in g_main_context_iterate (context=0x197b4f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmain.c:3840
        max_priority = 0
        timeout = 0
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 2
        fds = 0x19cbfa0
#21 0x00007f4acd099562 in g_main_loop_run (loop=0x19cbf60) at /build/glib2.0-ocmJ1Y/glib2.0-2.46.2/./glib/gmain.c:4034
        __func__ = "g_main_loop_run"
#22 0x00007f4acebcedb5 in gtk_main () at /build/gtk+3.0-SLiI62/gtk+3.0-3.18.6/./gtk/gtkmain.c:1241
        loop = 0x19cbf60
#23 0x00007f4acf984723 in mate_panel_applet_factory_main (factory_id=factory_id@entry=0x40b2eb "StickyNotesAppletFactory", out_process=out_process@entry=1, applet_type=27088432, callback=callback@entry=0x409c30 <stickynotes_applet_factory>, user_data=user_data@entry=0x0) at mate-panel-applet.c:2508
        factory = 0x19a3000 [MatePanelAppletFactory]
        closure = 0x19ca590
        __func__ = "mate_panel_applet_factory_main"
#24 0x00000000004059de in main (argc=1, argv=0x7fff195af348) at stickynotes_applet.c:91
---Type <return> to continue, or q <return> to quit---
        context = 0x1954770
        error = 0x0
        retval = <optimized out>
(gdb) 
@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Dec 24, 2015

Well, i see that mostly with wnck applets, but clock applet is a candidate too.
Maybe it's related to missing ports GdkColor --> GRGBAColor in mate-panel, mate-applets and marco. I see there left overs all over the code and GRGBAColor handles transparancy.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Dec 24, 2015

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Dec 24, 2015

That one is under #if !GTK_CHECK_VERSION (3, 0, 0)...

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Dec 24, 2015

@dnk @City-busz @lukefromdc by any chance, do you guys know why gdk_error_trap_push might fail (not protecting us from crashes on X errors)?

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Dec 25, 2015

I don't know enough about gdk to answer that one. Still trying to find out why the cpufreq-applet turns transparent with and only with a system background when changing governors, seems to be an issue with the panel itself but not sure.

@dnk

This comment has been minimized.

Copy link
Member

dnk commented Dec 25, 2015

@monsta take a look on #385

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Dec 25, 2015

Thanks dnk,
this is much better now but wnck applets do crash if you switch the compositor fast on/off several times.
But not everytime.

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Dec 25, 2015

I just tested this too, never noticed this applet issue but found it usually (but not
quite always) fixed the user background rendering issue. From time to time as I
was testing packages a user selected background would still go transparent, but
it always came up correctly on a panel restart. Perhaps this is now the same bug
as the one that makes the cpuyfreq-applet turn transparent on changing governors?

On 12/25/2015 at 2:29 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

Thanks dnk,
this is much better now but wnck applets do crash if you switch
the compositor fast on/off.
But not everytime.


Reply to this email directly or view it on GitHub:
#369 (comment)
167259464

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Dec 25, 2015

Btw, if i switch between compiz and marco via fusion-icon, applets always crashes.
And not only wnck applets. I use new compiz-0.8.10 with gtk-decorator (gtk3).
https://github.com/raveit65/compiz/releases
And yes, i think all this issues with transparent background have the same cause.

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Dec 25, 2015

In fact, I just found that my "user-backgrounds" branch can get the same transparency
isssue as the DNK x-error handler branch. Since the latter works on the cause rather than
the symptom in the case of user set panel backgrounds not rendered on restart, that should
probably be the fix merged unless something else is wrong with it.

On 12/25/2015 at 3:21 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

Btw, if i switch between compiz and marco via fusion-icon, applets
always crashes.
And not only wnck applets. I use new compiz-0.8.10 with gtk-
decorator (gtk3).
https://github.com/raveit65/compiz/releases
And yes, i think all this issues with transparent background have
the same cause.


Reply to this email directly or view it on GitHub:
#369 (comment)
167261132

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Dec 26, 2015

I found that the xfixes branch didn't stop the panel from turning transparent on a new
login with a user set background, so I combined it with my own branch, giving a
branch that shows the panel properly at login:

https://github.com/lukefromdc/mate-panel/tree/Xfix_user-bgfix-combined

On 12/25/2015 at 3:21 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

Btw, if i switch between compiz and marco via fusion-icon, applets
always crashes.
And not only wnck applets. I use new compiz-0.8.10 with gtk-
decorator (gtk3).
https://github.com/raveit65/compiz/releases
And yes, i think all this issues with transparent background have
the same cause.


Reply to this email directly or view it on GitHub:
#369 (comment)
167261132

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Dec 28, 2015

Ok, i could change config of fedora's bugreporting tool, and i have stackstraces from applets crash
clock-applet:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-clock-applet
cpu-freq:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-m-a-cpufreq
na-tray:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-n-a-tray
wnck-applets (here windows-list):
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-wnck-window-list
They crash with cairo and several places at mate-panel-applet.c
here from window-list.

#18 0x00007fd39c01ea79 in _cairo_default_context_fill (abstract_cr=<optimized out>) at cairo-default-context.c:1055
        cr = <optimized out>
        status = <optimized out>
#19 0x00007fd39c017bd5 in cairo_fill (cr=<optimized out>) at cairo.c:2205
        status = <optimized out>
#20 0x00007fd39ddf79a6 in mate_panel_applet_get_background (y=0, x=38, xid=<optimized out>, applet=<optimized out>) at mate-panel-applet.c:1491
        surface = 0x17cb800
        window = <optimized out>
        width = 946
        height = 24
        cr = 0x1954800
        pattern = <optimized out>
        pixmap_id = <optimized out>
        x = 38
        y = 0
        retval = PANEL_NO_BACKGROUND
        elements = <optimized out>
#21 0x00007fd39ddf79a6 in mate_panel_applet_get_background (pattern=0x7ffd67ca8eb8, color=<optimized out>, applet=<optimized out>) at mate-panel-applet.c:1593
        pixmap_id = <optimized out>
        x = 38
        y = 0
        retval = PANEL_NO_BACKGROUND
        elements = <optimized out>
#22 0x00007fd39ddf79a6 in mate_panel_applet_get_background (applet=<optimized out>, color=<optimized out>, pattern=0x7ffd67ca8eb8) at mate-panel-applet.c:1645
#23 0x00007fd39ddf7a5d in mate_panel_applet_handle_background (applet=applet@entry=0x1566500 [MatePanelApplet]) at mate-panel-applet.c:1714
        type = <optimized out>
        color = {red = 0, green = 0, blue = 0, alpha = 0}
        pattern = 0x0
        __func__ = "mate_panel_applet_handle_background"
#24 0x00007fd39ddf7e16 in mate_panel_applet_set_background_string (applet=0x1566500 [MatePanelApplet], background=0x7fd37c0066c8 "pixmap:25242734,38,0") at mate-panel-applet.c:1664
        background = 0x7fd37c0066c8 "pixmap:25242734,38,0"
        applet = 0x1566500 [MatePanelApplet]
#25 0x00007fd39ddf7fb5 in set_property_cb (connection=<optimized out>, sender=<optimized out>, object_path=object_path@entry=0x7fd37c00f240 "/org/mate/panel/applet/WindowListApplet/1", interface_name=interface_name@entry=0x15ef7d0 "org.mate.panel.applet.Applet", property_name=property_name@entry=0x7fd37c0066bd "Background", value=value@entry=0x17c7560, error=0x7ffd67ca8f88, user_data=0x1566500) at mate-panel-applet.c:2355
        applet = 0x1566500 [MatePanelApplet]
#26 0x00007fd39bb21318 in invoke_set_property_in_idle_cb (_data=0x7fd37c00f280) at gdbusconnection.c:4221
        error = 0x0
        reply = <optimized out>
        value = 0x17c7560
        __func__ = "invoke_set_property_in_idle_cb"
#27 0x00007fd39b50ea8a in g_main_context_dispatch (context=0x1528fb0) at gmain.c:3122
        dispatch = 0x7fd39b50b530 <g_idle_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x7fd37c00f280
        callback = 0x7fd39bb21270 <invoke_set_property_in_idle_cb>
        cb_funcs = 0x7fd39b7fd8a0 <g_source_callback_funcs>
        cb_data = 0x7fd37c008e60
        need_destroy = <optimized out>
        source = 0x7fd37c008ee0
        current = 0x1508a90
        i = 0
#28 0x00007fd39b50ea8a in g_main_context_dispatch (context=context@entry=0x1528fb0) at gmain.c:3737
#29 0x00007fd39b50ee20 in g_main_context_iterate (context=0x1528fb0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808
        max_priority = 0
        timeout = 0
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 3
        fds = 0x155bf90
#30 0x00007fd39b50f142 in g_main_loop_run (loop=0x155bf50) at gmain.c:4002
        __func__ = "g_main_loop_run"
#31 0x00007fd39d0755a5 in gtk_main () at gtkmain.c:1219
        loop = 0x155bf50
#32 0x00007fd39ddf8793 in mate_panel_applet_factory_main (factory_id=factory_id@entry=0x409c4c "WnckletFactory", out_process=out_process@entry=1, applet_type=22339824, callback=callback@entry=0x405400 <wncklet_factory>, user_data=user_data@entry=0x0) at mate-panel-applet.c:2519
        factory = 0x1512c80 [MatePanelAppletFactory]
        closure = 0x154e200
        __func__ = "mate_panel_applet_factory_main"
#33 0x00000000004052de in main (argc=1, argv=0x7ffd67ca9258) at wncklet.c:143
        context = 0x14e5660
        error = 0x0
        retval = <optimized out>

Hope this helps to track down the issue.

@muktupavels

This comment has been minimized.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 2, 2016

@albertsmuktupavels
Unfortunately patching cairo-1.14.2 (f22) with your https://bugs.freedesktop.org/attachment.cgi?id=118325
does not help in our case.

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jan 2, 2016

Does stack-traces look same with patched cairo? With assertion - ((*&(&surface->ref_count)->ref_count) > 0)?

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 3, 2016

Stacktraces are looking differrent now, all references to cairo are gone.
And i see the crashes only in a VM (f22).
I want to say it carefully, it seems that the crashes are gone on baremetal with f22 (nvidia graphic + nonfree driver) with patched cairo version.
Stackstraces VM with patched cairo:
clock-applet:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-clock-new
na-tray-applet:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-na-tray-new
show-desktop-applet:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-ShowDesktop-new
windowslist-applet:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-WindowList-new
workspace-switcher-applet:
https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/applet-crashes/backtrace-workspaceswitcher-new
Excerpt workspace-switcher:

Thread 1 (Thread 0x7f4e60ac0980 (LWP 2737)):
#0  0x00007f4e5dddcd3b in g_logv (breakpoint=1) at gmessages.c:315
        domain = 0x0
        data = 0x0
        depth = 1
        log_func = 0x7f4e5dddc500 <g_log_default_handler>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = <optimized out>
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x1905e00 "The program 'wnck-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 142407 error_code 4 r"...
        msg_alloc = 0x1905e00 "The program 'wnck-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 142407 error_code 4 r"...
        i = 2
#1  0x00007f4e5dddcd3b in g_logv (log_domain=0x7f4e5f4ecace "Gdk", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7ffe2822f9b0) at gmessages.c:1041
        domain = 0x0
        data = 0x0
        depth = 1
        log_func = 0x7f4e5dddc500 <g_log_default_handler>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = <optimized out>
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x1905e00 "The program 'wnck-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 142407 error_code 4 r"...
        msg_alloc = 0x1905e00 "The program 'wnck-applet' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadPixmap (invalid Pixmap parameter)'.\n  (Details: serial 142407 error_code 4 r"...
        i = 2
#2  0x00007f4e5dddceaf in g_log (log_domain=log_domain@entry=0x7f4e5f4ecace "Gdk", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f4e5f5093ac "%s") at gmessages.c:1079
        args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffe2822fa90, reg_save_area = 0x7ffe2822f9d0}}
#3  0x00007f4e5f4bcc7a in _gdk_x11_display_error_event (display=display@entry=0x1625050 [GdkX11Display], error=error@entry=0x7ffe2822fb60) at gdkdisplay-x11.c:2593
        buf = "BadPixmap (invalid Pixmap parameter)", '\000' <repeats 27 times>
        msg = <optimized out>
        display_x11 = 0x1625050 [GdkX11Display]
        tmp_list = <optimized out>
        ignore = 0
#4  0x00007f4e5f4c7cc9 in gdk_x_error (xdisplay=0x1614ba0, error=0x7ffe2822fb60) at gdkmain-x11.c:303
        error_display = 0x1625050 [GdkX11Display]
        manager = <optimized out>
        displays = 0x160a6b0
        error = 0x7ffe2822fb60
        xdisplay = 0x1614ba0
#5  0x00007f4e5d6d03fd in _XError (dpy=dpy@entry=0x1614ba0, rep=rep@entry=0x194a500) at XlibInt.c:1429
        rtn_val = <optimized out>

cut

It looks like that we have 2 issues here, one with cairo and "The program 'wnck-applet' received an X Window System error'.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 3, 2016

@lukefromdc
Can you please confirm that patching cairo fix the issue on a baremetal installation?
My current mate-panel version include latest merged fixes from you.

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Jan 3, 2016

I don't know anything about the cairo issue in question and am running cairo from
Debian packages. I did however set a transparent user-set panel background with
current mate-desktop/master mate-panel, switch WM to marco, and toggle the
compositor on and off repeatedly. Of all my applets, most of the time nothing
crashed. About 1 time in 4 the trash would crash, and maybe half that often or
less the hardware sensors indicator would crash.

I have these applets installed:
button menu, show desktop ,11 program launchers, window list,force quit,
workspace switcher,hardware sensors monitor,cpufreq-applet, na-tray,clock trash,
shut down

Occasional applet crashes are a very old GNOME 2 issue, hell my sister's laptop
with Ubuntu Lucid used to do this,

On 1/3/2016 at 5:37 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

@lukefromdc
Can you please confirm that patching cairo fix the issue on a
baremetal installation?


Reply to this email directly or view it on GitHub:
#369 (comment)
168548687

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 3, 2016

I've patched cairo with this patch from @albertsmuktupavels https://bugs.freedesktop.org/attachment.cgi?id=118325
This solved the issue on barematel here, but not in a VM, here we have a second prob (see my stackstraces)

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Jan 3, 2016

This raises another issue: what if the patch to cairo doesn't make it upstream?

On 1/3/2016 at 5:52 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

I've patched cairo with this patch from @albertsmuktupavels
https://bugs.freedesktop.org/attachment.cgi?id=118325
This solved the issue on barematel here, but not in a VM, here we
have a second prob (see my stakstrace)


Reply to this email directly or view it on GitHub:
#369 (comment)
168549456

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 3, 2016

If someone confirm that, than i will go in discussion with upstream

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Jan 3, 2016

If you can point me to a tarball for cairo with the patch, I can try building it
for a test. Can only run bare metal, never done a VM.

On 1/3/2016 at 5:56 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

If someone confirm that, than i will go in discussion with upstream


Reply to this email directly or view it on GitHub:
#369 (comment)
168549631

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 3, 2016

I don't know which cairo release your distro use. But tarballs are here:
http://cairographics.org/releases/
In unpacked tarball do 'patch -p1 < name-of-the-patch.patch'

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Jan 3, 2016

I've got Debian's libcairo2 version 1.14.4-1, which has not changed since October.

Got the tarball on the way, unfortunately this is burning 34 MB on a wireless connection.

On 1/3/2016 at 6:13 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

I don't which cairo release your distro use. But tarballs are here:
http://cairographics.org/releases/
In unpackged tarball do 'patch -p1 < name-of-the-patch.patch


Reply to this email directly or view it on GitHub:
#369 (comment)
168550519

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Jan 4, 2016

Tested this patch:

https://bugs.freedesktop.org/attachment.cgi?id=118325

seemed to make no difference here when applied to cairo 1.14.6.
This is a one-line change to a single file, was this the only patch?

On 1/3/2016 at 6:13 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

I don't which cairo release your distro use. But tarballs are here:
http://cairographics.org/releases/
In unpackged tarball do 'patch -p1 < name-of-the-patch.patch


Reply to this email directly or view it on GitHub:
#369 (comment)
168550519

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jan 4, 2016

Yes, this is the only one for cairo, but maybe a system restart is needed to reload cairo.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 22, 2016

I know. I'd like to send patches to Debian and Ubuntu maintainers, but I'm not sure when I'll have the time for it...

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 28, 2016

Ok... I'll wait for libwnck 3.20 to get into Debian Testing first as we apparently need Alberts' fix too:
https://git.gnome.org/browse/libwnck/commit/?id=700771086205be0bf36861265abdd3bc027dd866

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 29, 2016

Well, that sucks... I have libwnck 3.20 now, and I've patched cairo 1.14 with the fix... and still get the crashes. I can reproduce it with these steps:

  1. Open panel properties dialog and choose the color background with some transparency.
  2. Open mate-window-properties and turn compositor on and off several times quickly.
  3. If applets still won't crash, switch back to panel properties, move transparency slider a few times, then switch to mate-window-properties and repeat step 2.

Usually it takes me a couple of tries to get some applet to crash.

One of the backtraces: http://pastebin.com/RZtLDUyB

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

Does not happen here on bare metal, only in VMs with low performance.
We need to do the same as @albertsmuktupavels did for libwnck for our applets.

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jun 29, 2016

Was that stacktrace created with set env GDK_SYCNHRONIZE 1?

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

Btw. the reproducer from cairo report is very useful for debuging.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

@albertsmuktupavels
offtopic on
Is it save to use libwnck-3.18.1 for < 3.20 because it has all the css name commits?
I'm maintaining now libwnck3 in fedora.
offtopic off

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jun 29, 2016

You can not use libwnck 3.18 or 3.20 with < GTK+ 3.20 only if it was built with GTK+ 3.20. CSS names are under ifdefs right now. :) libwnck must be built with GTK+ 3.20 to get css names...

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

You can not use libwnck 3.18 or 3.20 with < GTK+ 3.20 only if it was built with GTK+ 3.20. CSS names are under ifdefs right now. :) libwnck must be built with GTK+ 3.20 to get css names...

Thanks for info, didn't know that you use ifdefs for libwnck-3.18.1
So, it is save to use it for f23 with gtk+-3.18.x.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 29, 2016

@albertsmuktupavels: no... Should I set that variable before attaching gdb to the process?

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jun 29, 2016

I would do this:

  • kill applet, dialog will popup, but do nothing
  • run gdb /path/to/applet
  • set env GDK_SYNCHRONIZE 1
  • run
  • then click reload applet
@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 29, 2016

Thanks, I didn't think of this trick 😄

So I first get these messages in gdb console:

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25168699,1061,0

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25168703,1061,0

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25168895,1061,0

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25169091,1061,0

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25169287,1061,0

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25169483,1061,0

** (notification-area-applet:1099): WARNING **: Failed to get pattern 25169679,1061,0

(notification-area-applet:1099): Gdk-ERROR **: The program 'notification-area-applet' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadPixmap (invalid Pixmap parameter)'.
  (Details: serial 3595 error_code 4 request_code 54 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Thread 1 "notification-ar" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff5012a6b in _g_log_abort (breakpoint=1) at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gmessages.c:325

And the backtrace: http://pastebin.com/tju6jGdt
So it looks mostly the same, but some cairo stuff is visible in the middle of it.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

@albertsmuktupavels
I do not see libwnck-3.18.1 release at https://download.gnome.org/sources/libwnck/3.18/

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

btw. i use 'export GDK_SYNCHRONIZE 1' before gdb
Not sure if it does make a different.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 29, 2016

He meant it should be set in gdb's own console - set env GDK_SYNCHRONIZE 1 should be executed there as is, right before you issue "run" command.

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jun 29, 2016

  1. set env that I wrote was to be used in gdb, but I think export GDK_SYNCHRONIZE=1 should work if it is set before executing/running applet and/or any other app.

  2. Maybe Trevinho did not upload it? Anyway, you can use 3.20.1 release, if dependency on GTK+ 3.16 is not problem. Only it must be rebuilt when GTK+ is upgraded to 3.20.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

  1. Maybe Trevinho did not upload it? Anyway, you can use 3.20.1 release, if dependency on GTK+ 3.16 is not problem. Only it must be rebuilt when GTK+ is upgraded to 3.20.

No, i can't mix versions in gnome stack for fedora 23, i will update to 3.18.0 for the moment.

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jun 29, 2016

Why you can not mix? It is just version number, it does not depend on GTK+ 3.20.x. Anyway, I am waiting response from Trevinho about 3.18.1 release.

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jun 29, 2016

I don't have any interested to disscus with gnome overloards why i don't follow their version scheme ;)

@muktupavels

This comment has been minimized.

Copy link
Contributor

muktupavels commented Jun 29, 2016

3.18.1 tag was added by mistake, so there is no 3.18.1 release...

@lukefromdc

This comment has been minimized.

Copy link
Member

lukefromdc commented Jun 29, 2016

Ok, that explains why I cannot test it. I've never once used a VM, everything
I do is on bare metal

On 6/29/2016 at 6:00 AM, "raveit65" notifications@github.com wrote:

Does not happen here on bare metal, only in VMs with low
performance.
We need to do the same as @albertsmuktupavels did for libwnck for
our applets.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#369 (comment)
229312654

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jun 30, 2016

I wonder what's wrong with Virtualbox then...

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Nov 25, 2016

So I've checked it on baremetal at last, it was with GTK+ 3.18.9, libwnck 3.14.1 and cairo 1.14.6. I only had to patch cairo to fix it. Didn't patch libwnck - but can't reproduce the crash anymore. Not sure why.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jul 5, 2017

The crash that I reproduced in #369 (comment) now happens in a different situation (but the backtrace is the same): #604.

Note that it's on baremetal, and the system is Ubuntu 17.04, where cairo is 1.14.8 and libwnck is 3.20.1. So everything seems to be patched.

I also confirm that the situation in Virtualbox is the same. I know it doesn't help much, but I reproduced it once more just to make sure I get the same backtrace (and it was so).

Anyone has any ideas...?

@raveit65

This comment has been minimized.

Copy link
Member Author

raveit65 commented Jul 12, 2017

Fixed with df36dca for me.

@raveit65 raveit65 closed this Jul 12, 2017

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jul 17, 2017

I've installed Mint 18.2 in a VM for other needs, and decided to test this there - was curious if the fix from df36dca works when cairo and libwnck are old and unpatched. Guess what, the fix works. I've built mate-panel from current git master, while other MATE components are at various 1.18.x versions, and the base is Ubuntu 16.04 (same as for other Mint 18.x releases). So, cairo is 1.14.6 and libwnck is 3.14.1.

Well, applets might show a number of messages "Failed to get pattern xxx" (it's visible in journalctl), but there are no crashes.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Jul 26, 2017

Finally found some time to test the fix in Mint 18.2 on baremetal - same result. This means I won't need to send the patch for cairo to Ubuntu, and also can close a few related bugs on Launchpad. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.