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

win32 python3 client scaling crash #2162

Closed
totaam opened this issue Feb 21, 2019 · 10 comments
Closed

win32 python3 client scaling crash #2162

totaam opened this issue Feb 21, 2019 · 10 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Feb 21, 2019

Issue migrated from trac ticket # 2162

component: platforms | priority: critical | resolution: fixed

2019-02-21 14:49:20: @totaam created the issue


$ ./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).

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 04:45:06: antoine commented


The maximize button does weird things.
That may have been fixed in r22112 for #2214.

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 04:48:36: @totaam changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 04:48:36: @totaam changed owner from antoine to totaamwin32

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 04:48:36: @totaam commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 05:01:02: @totaam uploaded file reinit-toggle.patch (1.6 KiB)

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

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 05:17:41: @totaam uploaded file resize-not-reinit.patch (1.3 KiB)

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

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 05:23:40: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 13:52:02: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 13:52:02: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2019

2019-03-19 13:52:02: antoine commented


Patch merged in r22129.

I am no longer able to reproduce the resizing loop.

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

No branches or pull requests

1 participant