xpra icon
Bug tracker and wiki

Opened 4 weeks ago

Closed 3 weeks ago

#2462 closed defect (fixed)

up resuming, client window not on the focused workspace is black.

Reported by: Jiang Owned by: Antoine Martin
Priority: critical Milestone: 4.0
Component: client Version: 3.0.x
Keywords: Cc:

Description (last modified by Antoine Martin)

This bug is apparently introduced when fixing ticket #2436 (r24062).

I have four virtual workspaces on my ubuntu client (18.04 64 bit). The xpra server serves two windows to the client, a firefox window, which I put on workspace 1 on the client, and a chrome window, which I put on workspace 4. I start the xpra on the client from a terminal window located on workspace 4. So when it starts up, I am on workspace 4, and chrome shows up fine. When I go to workspace 1, the firefox window is black. I can return it by typing ctrl-L to focus on the address bar (which I cannot see, and type in any address and load a webpage. Then the whole window will reappaear.

The bug seems to lie on the client xpra, because it doesn't matter which version the server run.

In face, all I need to do to "fix" it is to copy the version of the file

/usr/lib/python3/dist-packages/xpra/client/client_window_base.py

before fix r24062, and the client window appears fine. But of course, that may be only because all the client windows appear on workspace 4, regardless where it originally was, which is exactly what r24062 tried to fix.

Change History (4)

comment:1 Changed 4 weeks ago by Antoine Martin

Description: modified (diff)
Priority: majorcritical
Status: newassigned

I can reproduce a problem: starting with two xterms, one on each workspace, and then connecting from a command line running on workspace 2. The xterm on workspace 2 shows up black.

comment:2 Changed 3 weeks ago by Antoine Martin

Interesting, happens with both python2 / gtk2 builds and python3 / gtk3 clients. But only with python3 servers.
Launching the client with XPRA_SET_WORKSPACE=0 "fixes" the problem in the same way as reverting r24062: disabling workspace support.

-d workspace log:

  • with python3 server:
    do_get_workspace _NET_CURRENT_DESKTOP=0 on window 0x1e5
    init_window(..) workspace=unset, current workspace=0
    workspace from client properties {b'screen': 0, b'encoding.transparency': False, b'encoding.bit-depth': 24, b'encoding.send-window-size': True, b'encoding.scrolling': True, b'encodings.rgb_formats': (b'YUV420P', b'YUV422P', b'YUV444P', b'GBRP', b'BGRA', b'BGRX', b'RGBA', b'RGBX', b'RGB', b'BGR'), b'encoding.full_csc_modes': {b'mpeg1': (b'YUV420P',), b'mpeg2': (b'YUV420P',), b'mpeg4': (b'YUV420P',), b'h264': (b'ARGB', b'BGRA', b'BGRX', b'GBRP', b'RGB', b'XRGB', b'YUV420P', b'YUV422P', b'YUV444P'), b'h265': (b'BGRX', b'GBRP', b'RGB', b'XRGB', b'YUV420P', b'YUV422P', b'YUV444P'), b'vp9': (b'YUV420P', b'YUV444P'), b'vp8': (b'YUV420P',), b'webp': (b'BGRA', b'BGRX', b'RGBA', b'RGBX')}}: None
    do_get_workspace _NET_WM_DESKTOP=0 on window 0x200005e
    process_map_event() wid=1, workspace=0, screen=0, been_mapped=False
    workspace from client properties {b'screen': 0, b'workspace': 65535}: 65535
    move_to_workspace(UNSET) unchanged
    do_get_workspace _NET_WM_DESKTOP=0 on window 0x200005e
    configure event: changed workspace from unset to 0
    workspace from client properties {b'workspace': 0}: 0
    move_to_workspace(0) current=UNSET
    setting _NET_WM_DESKTOP=0 on window 0x600022
    _NET_WM_DESKTOP=0 for window 0x600022
    set_workspace(0)
    do_get_workspace _NET_CURRENT_DESKTOP=0 on window 0x1e5
    do_get_workspace _NET_WM_DESKTOP=0 on window 0x200005e
    set_workspace(0) realized=True
     current workspace=0, detected=0, desktop workspace=0, ndesktops=4
    window workspace unchanged: 0
    workspace from client properties {}: None
    
  • with a python2 server:
    do_get_workspace _NET_CURRENT_DESKTOP=0 on window 0x1e5
    init_window(..) workspace=unset, current workspace=0
    set_workspace(1)
    workspace=1 will be set when the window is mapped
    workspace from client properties {'screen': 0, 'encoding.transparency': False, 'encoding.bit-depth': 24, 'encoding.send-window-size': True, 'encoding.scrolling': True, 'encodings.rgb_formats': ('YUV420P', 'YUV422P', 'YUV444P', 'GBRP', 'BGRA', 'BGRX', 'RGBA', 'RGBX', 'RGB', 'BGR'), 'encoding.full_csc_modes': {'mpeg1': ('YUV420P',), 'mpeg2': ('YUV420P',), 'mpeg4': ('YUV420P',), 'h264': ('ARGB', 'BGRA', 'BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'), 'h265': ('BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'), 'vp9': ('YUV420P', 'YUV444P'), 'vp8': ('YUV420P',), 'webp': ('BGRA', 'BGRX', 'RGBA', 'RGBX')}}: None
    do_get_workspace _NET_WM_DESKTOP=0 on window 0x200005e
    process_map_event() wid=1, workspace=0, screen=0, been_mapped=False
    set_workspace(1)
    do_get_workspace _NET_CURRENT_DESKTOP=0 on window 0x1e5
    do_get_workspace _NET_WM_DESKTOP=0 on window 0x200005e
    set_workspace(1) realized=True
     current workspace=unset, detected=0, desktop workspace=0, ndesktops=4
    do_set_workspace: gdkwindow: 0x200005e, mapped=True, visible=True
    map event: been_mapped=True, changed workspace from unset to 1
    workspace from client properties {'screen': 0, 'workspace': 1}: 1
    move_to_workspace(1) unchanged
    do_get_workspace _NET_WM_DESKTOP=1 on window 0x200005e
    do_get_workspace _NET_CURRENT_DESKTOP=0 on window 0x1e5
    do_workspace_changed(<gtk.gdk.Event at 0x7ff378acdbe8: GDK_PROPERTY_NOTIFY atom=_NET_WM_DESKTOP>) (window, desktop): from (1, 0) to (1, 0)
    do_get_workspace _NET_WM_DESKTOP=1 on window 0x200005e
    

During startup, the server prints workspace probing twice:

2019-10-24 22:05:09,841 _NET_WM_DESKTOP=0 for window 0x600022
2019-10-24 22:05:10,227 _NET_WM_DESKTOP=UNSET for window 0xa00022

Are we scrubbing it?

comment:3 Changed 3 weeks ago by Antoine Martin

Logging at the packet level with:

XPRA_LOG_PACKETS="*,-logging,-server-settings,-set-keyboard-sync-enabled,-damage-sequence,-ping,-ping_echo,-clipboard-token,-info-request,-sound-control,-sound-data,-info-response,-cursor,-set_deflate,-window-icon,-info-response"

With python3 server:

2019-10-25 19:56:00,257 ['new-window', 1, 137, 260, 499, 316, {b'xid': b'0x600022', b'client-machine': b'localhost.localdomain', b'pid': 10816, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'window-type': (b'NORMAL',), b'workspace': 0, b'size-constraints': {b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1, b'minimum-size': (25, 17)}, b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src'}, {b'screen': 0}]
2019-10-25 19:56:00,258 ['new-window', 2, 0, 64, 499, 316, {b'xid': b'0xa00022', b'client-machine': b'localhost.localdomain', b'pid': 11502, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'window-type': (b'NORMAL',), b'workspace': 1, b'size-constraints': {b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1, b'minimum-size': (25, 17)}, b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src'}, {b'screen': 0}]
2019-10-25 19:56:00,258 ['startup-complete']

With python2:

2019-10-25 19:57:19,806 ['new-window', 1, 0, 64, 499, 316, {b'size-constraints': {b'minimum-size': (25, 17), b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1}, b'window-type': (b'NORMAL',), b'xid': b'0x600022', b'workspace': 0, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'client-machine': b'localhost.localdomain', b'pid': 10816}, {}]
2019-10-25 19:57:19,806 ['new-window', 2, 45, 109, 499, 316, {b'size-constraints': {b'minimum-size': (25, 17), b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1}, b'window-type': (b'NORMAL',), b'xid': b'0xa00022', b'workspace': 1, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'client-machine': b'localhost.localdomain', b'pid': 11502}, {}]
2019-10-25 19:57:19,806 ['startup-complete']

Showed that the python3 server is sending the screen attribute back to the client, which is causing the problem.
r24265 fixes this.

What's strange is that the GTK3 clients no longer honour the "screen" setting, which was deprecated in GTK, yet they still fail.. so this must be triggering another bug.

comment:4 Changed 3 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

The real fix is in r24277.
The workspace and screen stuff just made it easier to hit: the handling of this extra metadata made us try to refresh the windows quickly after they're shown and a bug in the av-sync timer caused the screen update to get lost.

Note: See TracTickets for help on using tickets.