xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 5 months ago

Last modified 5 months ago

#2162 closed defect (fixed)

win32 python3 client scaling crash

Reported by: totaamwin32 Owned by: totaamwin32
Priority: critical Milestone: 2.5
Component: platforms Version: 2.4.x
Keywords: Cc:

Description

$ ./Xpra_cmd.exe attach tcp://192.168.1.4:10000 --desktop-scaling=0.3 --no-clipboard

Then using the tray menu, change the desktop scaling to 150%.
(looks like the value must trigger the scaling clipping code)

The debug log output shows:

2019-02-21 15:26:35,249 scaling_changed(gtk3.client,) updating selected tray menu item

followed by the segfault.

Connecting with a smaller scaling value times out.

The maximize button does weird things.

This only affects my virtualbox VM (without opengl).

Attachments (2)

reinit-toggle.patch (1.6 KB) - added by totaamwin32 5 months ago.
adds env vars to be able to skip window re-init
resize-not-reinit.patch (1.3 KB) - added by totaamwin32 5 months ago.
proposed fix: don't re-init, use a resize

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 months ago by Antoine Martin

The maximize button does weird things.

That may have been fixed in r22112 for #2214.

comment:2 Changed 5 months ago by totaamwin32

Owner: changed from Antoine Martin to totaamwin32
Status: newassigned

Running with full debug, the last few lines are:

2019-03-19 05:43:49,441 init_window(..) workspace=unset, current workspace=None
2019-03-19 05:43:49,441 set_alpha() has_alpha=False, <class 'xpra.client.gtk3.cairo_backing.CairoBacking'>.HAS_ALPHA=True, realized=False
2019-03-19 05:43:49,441 new_backing(500, 317) backing_class=<class 'xpra.client.gtk3.cairo_backing.CairoBacking'>
2019-03-19 05:43:49,441 make_new_backing(<class 'xpra.client.gtk3.cairo_backing.CairoBacking'>, 32767, 32767, 32767, 32767) effective backing class=<class 'xpra.client.gtk3.cairo_backing.CairoBacking'>, server alpha=False, window alpha=False
2019-03-19 05:43:49,441 get_server_full_csc_modes_for_rgb('BGRX', 'RGBX', 'BGR', 'RGB')
2019-03-19 05:43:49,441 get_client_full_csc_modes(('BGR', 'BGR', 'BGRX', 'BGRX', 'GBRP', 'RGB', 'RGB', 'RGBX', 'RGBX', 'XBGR', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P')) decoder encodings=dict_keys(['h264', 'vp8', 'h265', 'mpeg4', 'mpeg1', 'mpeg2', 'vp9'])
2019-03-19 05:43:49,441 found decoder dec_avcodec2 for  h264 with    ARGB mode
(..)
2019-03-19 05:43:49,442 setup_window() position=(26, 0), set_initial_position=False, OR=False, decorated=True
2019-03-19 05:43:49,442 get_window_frame_sizes()={'normal': (8, 8), 'fixed': (3, 3), 'minimum': (132, 38), 'menu-bar': 20, 'border': 1, 'caption': 22, 'offset': (8, 30), 'frame': (8, 8, 30, 8)}
2019-03-19 05:43:49,442 setup_window() window frame sizes={'normal': (8, 8), 'fixed': (3, 3), 'minimum': (132, 38), 'menu-bar': 20, 'border': 1, 'caption': 22, 'offset': (8, 30), 'frame': (8, 8, 30, 8)}
2019-03-19 05:43:49,442 setup_window() adjusted initial position=(18, 0)
2019-03-19 05:43:49,442 update_metadata({b'xid': b'0x800022', b'client-machine': b'desktop', b'pid': 1951, b'title': b'antoine@desktop:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'window-type': (b'NORMAL',), 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@desktop:~/projects/Xpra/trunk/src', b'iconic': False})
2019-03-19 05:43:49,442 set_metadata({b'xid': b'0x800022', b'client-machine': b'desktop', b'pid': 1951, b'title': b'antoine@desktop:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'window-type': (b'NORMAL',), 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@desktop:~/projects/Xpra/trunk/src', b'iconic': False})
2019-03-19 05:43:49,442 reset_icon() current icon=None
2019-03-19 05:43:49,442 reset_icon() current icon=None
2019-03-19 05:43:49,442 set_size_constraints({b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1, b'minimum-size': (25, 17)}, (32767, 32767))
2019-03-19 05:43:49,442 intpair(b'maximum-size')=None
2019-03-19 05:43:49,443 intpair(b'minimum-size')=(25, 17)
2019-03-19 05:43:49,443 intpair(b'base-size')=(19, 4)
2019-03-19 05:43:49,443 intpair(b'increment')=(6, 13)
2019-03-19 05:43:49,443 modified hints for max window size (32767, 32767): {b'min_width': 50, b'min_height': 34, b'base_width': 38, b'base_height': 8, b'width_inc': 12, b'height_inc': 26} (rw=5, rh=25) -> max=32762x32742
2019-03-19 05:43:49,443 calling: <bound method ClientWindow.apply_geometry_hints of ClientWindow(1)>({b'min_width': 50, b'min_height': 34, b'base_width': 38, b'base_height': 8, b'width_inc': 12, b'height_inc': 26})
2019-03-19 05:43:49,443 apply_geometry_hints({b'min_width': 50, b'min_height': 34, b'base_width': 38, b'base_height': 8, b'width_inc': 12, b'height_inc': 26}) geometry=<Gdk.Geometry object at 0x000000001f85d778 (void at 0x000000001c2ee4e0)>, hints=<flags GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC of type Gdk.WindowHints>
2019-03-19 05:43:49,443 set_window_type(['NORMAL']) hints=0
2019-03-19 05:43:49,443 make_new_window(..) window(1)=ClientWindow(1)
2019-03-19 05:43:49,444 on_realize(ClientWindow(1)) gdk window=<__gi__.GdkWin32Window object at 0x000000001f85eee8 (GdkWin32Window at 0x000000001c4f3b00)>
2019-03-19 05:43:49,444 add_window_hooks(ClientWindow(1)) WINDOW_HOOKS=True, GROUP_LEADER=True, UNDECORATED_STYLE=True, MAX_SIZE_HINT=False, GEOMETRY=True
2019-03-19 05:43:49,444 add_window_hooks(ClientWindow(1)) gdk window=<__gi__.GdkWin32Window object at 0x000000001f85eee8 (GdkWin32Window at 0x000000001c4f3b00)>, hwnd=0x1805a0
2019-03-19 05:43:49,444 win32 hooks: set_window_group=<built-in function set_window_group>
2019-03-19 05:43:49,444 hooked group leader override using <built-in function set_window_group>
2019-03-19 05:43:49,444 fixup_window_style() unchanged style BORDER, CAPTION, CLIPCHILDREN, CLIPSIBLINGS, DLGFRAME, MINIMIZEBOX, TABSTOP, TILED, THICKFRAME, SYSMENU (0x6cf0000) on window 0x1805a0
2019-03-19 05:43:49,444 fixup_window_style() ws_visible=False (was True), iconified=False, been_mapped=False
2019-03-19 05:43:49,444 Win32Hooks: window frame size is 8x8
2019-03-19 05:43:49,444 Win32Hooks: message_map={36: <bound method Win32Hooks.on_getminmaxinfo of <xpra.platform.win32.window_hooks.Win32Hooks object at 0x000000001f857400>>}
2019-03-19 05:43:49,444 add_window_hooks(ClientWindow(1)) added hooks for hwnd 0x1805a0: <xpra.platform.win32.window_hooks.Win32Hooks object at 0x000000001f857400>
2019-03-19 05:43:49,444 apply_maxsize_hints(ClientWindow(1), {b'min_width': 50, b'min_height': 34, b'base_width': 38, b'base_height': 8, b'width_inc': 12, b'height_inc': 26}) handle=0x1805a0
2019-03-19 05:43:49,444 apply_maxsize_hints(ClientWindow(1), {b'min_width': 50, b'min_height': 34, b'base_width': 38, b'base_height': 8, b'width_inc': 12, b'height_inc': 26}) found min: 50x34, max: 0x0
2019-03-19 05:43:49,444 window_state_updated(ClientWindow(1))
2019-03-19 05:43:49,445 fixup_window_style() unchanged style BORDER, CAPTION, CLIPCHILDREN, CLIPSIBLINGS, DLGFRAME, MINIMIZEBOX, TABSTOP, TILED, THICKFRAME, SYSMENU (0x6cf0000) on window 0x1805a0
2019-03-19 05:43:49,445 fixup_window_style() ws_visible=False (was True), iconified=False, been_mapped=False
2019-03-19 05:43:49,445 win32_propsys_set_group_leader(<__gi__.GdkWin32Window object at 0x000000001e582120 (GdkWin32Window at 0x000000000304e4b0)>)
2019-03-19 05:43:49,445 win32 hooks: get_window_handle(<__gi__.GdkWin32Window object at 0x000000001f85eee8 (GdkWin32Window at 0x000000001c4f3b00)>)=1574304, set_group(0xd05a6)
2019-03-19 05:43:49,445 propsys.set_window_group(1574304, 853414)
2019-03-19 05:43:49,445 propsys: SetAppID(1574304, b'853414')=2272736
2019-03-19 05:43:49,447 ClientWindow(1).set_icon(<GdkPixbuf.Pixbuf object at 0x000000001f866048 (GdkPixbuf at 0x000000001c1205a0)>)
2019-03-19 05:43:49,448 Automatic refresh for all windows
2019-03-19 05:43:49,448 reinit_window_icons()
2019-03-19 05:43:49,448 next_packet() packets in queues: priority=0, ordinary=1, mouse=False
2019-03-19 05:43:49,448 reset_icon() current icon=<PIL.Image.Image image mode=RGBA size=64x64 at 0x1D1737F0>
2019-03-19 05:43:49,449 ClientWindow(1).set_icon(<GdkPixbuf.Pixbuf object at 0x000000001f866558 (GdkPixbuf at 0x000000001c120600)>)
2019-03-19 05:43:49,452 reset_windows_cursors() resetting cursors for: (ClientWindow(1),)
2019-03-19 05:43:49,452 set_windows_cursor([ClientWindow(1)], args[0])
2019-03-19 05:43:49,452 scaling_changed(gtk3.client,) updating selected tray menu item
2019-03-19 05:43:49,497 sound output stopping

So the window, icon or cursor re-init could be to blame?

Last edited 5 months ago by Antoine Martin (previous) (diff)

Changed 5 months ago by totaamwin32

Attachment: reinit-toggle.patch added

adds env vars to be able to skip window re-init

Changed 5 months ago by totaamwin32

Attachment: resize-not-reinit.patch added

proposed fix: don't re-init, use a resize

comment:3 Changed 5 months ago by Antoine Martin

The patch above works, but may be partly to blame for a resizing loop that ends up shrinking the xterm to its minimum size...
It also seems to fix #2209.

Last edited 5 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 5 months ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Patch merged in r22129.

I am no longer able to reproduce the resizing loop.

Last edited 5 months ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.