Xpra: Ticket #2525: xpra client GUI throws: assertion 'GDK_IS_DISPLAY (display)' failed

"\Xpra-Python3-x86_64_4.0-r24581\xpra_cmd"
2019-12-26 16:31:35,218 created named pipe '\\.\pipe\Xpra\Main'
2019-12-26 16:31:36,694 serving html content from '\Xpra-Python3-x86_64_4.0-r24581\www'
2019-12-26 16:31:37,997 GStreamer version 1.16.1 for Python 3.8.0 64-bit
(Xpra_cmd.exe:8556): Gdk-WARNING **: 16:31:38.504: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-26 16:31:38,510 xpra is ready.
2019-12-26 16:31:38,510 xpra GTK3 shadow version 4.0-r24581 64-bit
2019-12-26 16:31:38,512  running with pid 8556 on Microsoft Windows 10
2019-12-26 16:31:38,512  on display 'Default' of size 1600x900
(Xpra_cmd.exe:8556): Gdk-CRITICAL **: 16:31:45.431: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x000000006C205E91. Access violation - attempting to read data at address 0x0000000000000020

Unfortunately, due to the size of the executable (and to my very slow line), I cannot update client to the latest version easily. If you think you have fixed it, I can try after January.

Merry Christmas, and a happy new year!



Thu, 26 Dec 2019 15:04:03 GMT - stdedos:

Replicate with:

I opened the window, tried to play a little bit with the buttons. Then, I clicked on "Shadow", and a little later I closed it via the tray icon


Thu, 26 Dec 2019 18:03:34 GMT - Antoine Martin: owner changed

Please try something more recent and if the crash still occurs, please run with --debug=all and post the end of the log output. (a few thousand lines)


Thu, 26 Dec 2019 20:53:06 GMT - stdedos: owner changed

Still happens

2019-12-26 22:46:55,779 created named pipe '\\.\pipe\Xpra\Main'
2019-12-26 22:46:56,983 serving html content from '\Xpra-Python3-x86_64_3.0.4-r24778\www'
2019-12-26 22:46:58,202 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:12392): Gdk-WARNING **: 22:46:58.468: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-26 22:46:58,471 xpra is ready.
2019-12-26 22:46:58,472 xpra GTK3 shadow version 3.0.4-r24778 64-bit
2019-12-26 22:46:58,473  running with pid 12392 on Microsoft Windows 10
2019-12-26 22:46:58,474  on display 'Default' of size 1600x900
(Xpra_cmd.exe:12392): Gdk-CRITICAL **: 22:47:05.567: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x0000000004A25E91. Access violation - attempting to read data at address 0x0000000000000020

However, I cannot run with debug info:

Xpra-Python3-x86_64_3.0.4-r24778\xpra_cmd" --debug=all
xpra: need a mode

Thu, 26 Dec 2019 20:55:36 GMT - Antoine Martin: owner changed

xpra: need a mode

Since you were running the shadow server, try:

xpra_cmd shadow --debug=all

Thu, 26 Dec 2019 21:27:32 GMT - stdedos: owner changed

2019-12-26 23:24:30,188 poll() procinfo list: []
2019-12-26 23:24:30,748 clean_quit(False)
2019-12-26 23:24:30,750 cleanup_tray() tray_widget=Tray(0:Xpra Shadow Server)
2019-12-26 23:24:30,753 Win32Tray.cleanup() tray_widget=win32NotifyIcon(0x0)
2019-12-26 23:24:30,755 win32NotifyIcon.close()
2019-12-26 23:24:30,756 destroy() hwnd=0x4a068e, exit callback=<bound method GTKShadowServerBase.tray_exit_callback of <xpra.platform.win32.shadow_server.ShadowServer object at 0x0000000004f7f700>>
2019-12-26 23:24:30,757 make_nid(..)=<xpra.platform.win32.win32_NotifyIcon.NOTIFYICONDATA object at 0x00000000119380c0> tooltip='Xpra Shadow Server', app_id=0, actual flags=GUID
2019-12-26 23:24:30,758 delete_tray_window(..) calling Shell_NotifyIconW(NIM_DELETE, <xpra.platform.win32.win32_NotifyIcon.NOTIFYICONDATA object at 0x00000000119380c0>)
2019-12-26 23:24:30,781 Win32Tray.cleanup() ended
2019-12-26 23:24:30,783 cleanup() stopping 0 tcp proxy clients: []
2019-12-26 23:24:30,784 cleanup will disconnect: []
2019-12-26 23:24:30,784 add_work_item(<bound method ServerCore.mdns_cleanup of <xpra.platform.win32.shadow_server.ShadowServer object at 0x0000000004f7f700>>) worker=Worker_Thread(items=0, exit=False)
2019-12-26 23:24:30,785 cleanup_protocols([], server shutdown, False)
2019-12-26 23:24:30,785 Worker_Thread.run() calling <bound method ServerCore.mdns_cleanup of <xpra.platform.win32.shadow_server.ShadowServer object at 0x0000000004f7f700>> (queue size=0)
2019-12-26 23:24:30,786 wait_for_threaded_init() <Thread(Thread-2, stopped 14516)>.is_alive()=False
2019-12-26 23:24:30,788 keys still pressed: LBUTTON, RETURN, SHIFT, HOME, LWIN, LSHIFT, LCONTROL, RCONTROL, 240, 243, ATTN, ZOOM
2019-12-26 23:24:30,788 poll() procinfo list: []
2019-12-26 23:24:30,789 poll() procinfo list: []
2019-12-26 23:24:30,790 VideoHelper.cleanup() cleanup modules=[<module 'xpra.codecs.enc_x264.encoder' from 'C:\\Users\\user.win\\Documents\\xpra-clients\\Xpra-Python3-x86_64_3.0.4-r24778\\lib\\xpra\\codecs\\enc_x264\\encoder-cpython-38.dll'>, <module 'xpra.codecs.vpx.encoder' from 'C:\\Users\\user.win\\Documents\\xpra-clients\\Xpra-Python3-x86_64_3.0.4-r24778\\lib\\xpra\\codecs\\vpx\\encoder-cpython-38.dll'>, <module 'xpra.codecs.enc_ffmpeg.encoder' from 'C:\\Users\\user.win\\Documents\\xpra-clients\\Xpra-Python3-x86_64_3.0.4-r24778\\lib\\xpra\\codecs\\enc_ffmpeg\\encoder-cpython-38.dll'>, <module 'xpra.codecs.csc_swscale.colorspace_converter' from 'C:\\Users\\user.win\\Documents\\xpra-clients\\Xpra-Python3-x86_64_3.0.4-r24778\\lib\\xpra\\codecs\\csc_swscale\\colorspace_converter-cpython-38.dll'>, <module 'xpra.codecs.csc_libyuv.colorspace_converter' from 'C:\\Users\\user.win\\Documents\\xpra-clients\\Xpra-Python3-x86_64_3.0.4-r24778\\lib\\xpra\\codecs\\csc_libyuv\\colorspace_converter-cpython-38.dll'>]
2019-12-26 23:24:30,790 enc_x264.cleanup_module()
2019-12-26 23:24:30,796 vpx.encoder.cleanup_module()
2019-12-26 23:24:30,797 enc_ffmpeg.cleanup_module()
2019-12-26 23:24:30,797 csc_swscale.cleanup_module()
2019-12-26 23:24:30,798 csc_libyuv.cleanup_module()
2019-12-26 23:24:30,799 cleanup_protocols([], server shutdown, True)
2019-12-26 23:24:30,800 cleanup_sockets() calling <bound method NamedPipeListener.stop of NamedPipeListener(\\.\pipe\Xpra\Main)> for named-pipe \\.\pipe\Xpra\Main
2019-12-26 23:24:30,800 NamedPipeListener(\\.\pipe\Xpra\Main).stop()
2019-12-26 23:24:30,801 stop_dbus_server() dbus_pid=0
2019-12-26 23:24:30,802 stop_worker(False) worker=Worker_Thread(items=0, exit=False)
2019-12-26 23:24:30,802 Worker_Thread.stop(False) <queue.Queue object at 0x000000000683b700> items in work queue
2019-12-26 23:24:30,803 Worker_Thread.run() found end of queue marker
2019-12-26 23:24:30,803 clean_quit(..) quit timers scheduled
2019-12-26 23:24:30,803 Worker_Thread.run() ended (queue size=0)
2019-12-26 23:24:30,807 found 3 frames:
2019-12-26 23:24:30,808 0: 0x3808 <frame at 0x0000000004532240, file 'E:\\Xpra\\tags\\v3.0.x\\src/xpra/platform/win32/namedpipes/listener.py', line 150, code do_run>:
2019-12-26 23:24:30,809   File "C:/msys64/mingw64/lib/python3.8/threading.py", line 890, in _bootstrap
2019-12-26 23:24:30,810   File "C:/msys64/mingw64/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2019-12-26 23:24:30,811   File "E:\Xpra\tags\v3.0.x\src/xpra/platform/win32/namedpipes/listener.py", line 106, in run
2019-12-26 23:24:30,811   File "E:\Xpra\tags\v3.0.x\src/xpra/platform/win32/namedpipes/listener.py", line 150, in do_run2019-12-26 23:24:30,812 1: 0x38c4 <frame at 0x00000000119221e0, file 'C:/msys64/mingw64/lib/python3.8/logging/__init__.py', line 899, code acquire>:
2019-12-26 23:24:30,813   File "C:/msys64/mingw64/lib/python3.8/threading.py", line 894, in _bootstrap
2019-12-26 23:24:30,814   File "C:/msys64/mingw64/lib/python3.8/threading.py", line 942, in _bootstrap_inner
2019-12-26 23:24:30,814   File "E:\Xpra\tags\v3.0.x\src/xpra/server/background_worker.py", line 65, in run
2019-12-26 23:24:30,815   File "E:\Xpra\tags\v3.0.x\src/xpra/log.py", line 403, in debug
2019-12-26 23:24:30,819   File "E:\Xpra\tags\v3.0.x\src/xpra/log.py", line 396, in log
2019-12-26 23:24:30,821   File "E:\Xpra\tags\v3.0.x\src/xpra/log.py", line 135, in standard_logging
2019-12-26 23:24:30,822   File "C:/msys64/mingw64/lib/python3.8/logging/__init__.py", line 1500, in log
2019-12-26 23:24:30,822   File "C:/msys64/mingw64/lib/python3.8/logging/__init__.py", line 1577, in _log
2019-12-26 23:24:30,823   File "C:/msys64/mingw64/lib/python3.8/logging/__init__.py", line 1587, in handle
2019-12-26 23:24:30,824   File "C:/msys64/mingw64/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
2019-12-26 23:24:30,824   File "C:/msys64/mingw64/lib/python3.8/logging/__init__.py", line 953, in handle
2019-12-26 23:24:30,825   File "C:/msys64/mingw64/lib/python3.8/logging/__init__.py", line 899, in acquire
2019-12-26 23:24:30,826 2: 0x34ac <frame at 0x0000000011a39cf0, file 'E:\\Xpra\\tags\\v3.0.x\\src/xpra/util.py', line 539, code dump_all_frames>:
2019-12-26 23:24:30,827   File "C:/msys64/mingw64/lib/python3.8/site-packages\cx_Freeze/initscripts/__startup__.py", line 40, in run
2019-12-26 23:24:30,830   File "C:/msys64/mingw64/lib/python3.8/site-packages\cx_Freeze/initscripts/Console.py", line 23, in run
2019-12-26 23:24:30,831   File "scripts/xpra", line 26, in <module>
2019-12-26 23:24:30,831   File "E:\Xpra\tags\v3.0.x\src/xpra/scripts/main.py", line 117, in main
2019-12-26 23:24:30,831   File "E:\Xpra\tags\v3.0.x\src/xpra/scripts/main.py", line 440, in run_mode
2019-12-26 23:24:30,832   File "E:\Xpra\tags\v3.0.x\src/xpra/scripts/server.py", line 340, in run_server
2019-12-26 23:24:30,833   File "E:\Xpra\tags\v3.0.x\src/xpra/scripts/server.py", line 863, in do_run_server
2019-12-26 23:24:30,834   File "E:\Xpra\tags\v3.0.x\src/xpra/server/server_core.py", line 424, in run
2019-12-26 23:24:30,834   File "E:\Xpra\tags\v3.0.x\src/xpra/server/gtk_server_base.py", line 118, in do_run
2019-12-26 23:24:30,835   File "C:/msys64/mingw64/lib/python3.8/site-packages/gi/overrides/Gtk.py", line 1630, in main
2019-12-26 23:24:30,836   File "E:\Xpra\tags\v3.0.x\src/xpra/server/server_core.py", line 386, in clean_quit
2019-12-26 23:24:30,836   File "E:\Xpra\tags\v3.0.x\src/xpra/util.py", line 539, in dump_all_frames
(xpra_cmd:8536): Gdk-CRITICAL **: 23:24:30.841: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x0000000004A15E91. Access violation - attempting to read data at address 0x0000000000000020

Note also that there is input sanitization error here: do_run2019-12-26 23:24:30,812 1:


Fri, 27 Dec 2019 12:20:28 GMT - Antoine Martin: owner changed

That's odd. I don't see any problems here, no matter how I exit the shadow server. (control-c, "xpra stop" or from the system tray)

Can you please try:

set XPRA_CLOSE_GTK_DISPLAY=0
Xpra_cmd shadow ...

The latest beta builds of both 3.0.5-RC and 4.0-beta add more debug logging to this suspicious method call: r24798. This will be shown with -d gtk, -d server and obviously also with -d all. Ubuntu shadow servers had a similar crash before: #2328.


Sat, 28 Dec 2019 17:19:31 GMT - stdedos: owner changed

The original error does not happen in r24803:

> set XPRA_CLOSE_GTK_DISPLAY=0
> Xpra-Python3-x86_64_4.0-r24803\xpra_cmd" shadow -d gtk
2019-12-28 18:11:13,300 created named pipe '\\.\pipe\Xpra\Main'
2019-12-28 18:11:13,885 GTKServerBase.__init__()
2019-12-28 18:11:14,471 serving html content from 'Xpra-Python3-x86_64_4.0-r24803\www'
2019-12-28 18:11:15,318 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(xpra_cmd:13012): Gdk-WARNING **: 18:11:15.747: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-28 18:11:15,751 do_run() calling <function main at 0x00000000055d3280>
2019-12-28 18:11:15,758 xpra is ready.
2019-12-28 18:11:15,764 xpra GTK3 shadow version 4.0-r24803 64-bit
2019-12-28 18:11:15,774  running with pid 13012 on Microsoft Windows 10
2019-12-28 18:11:15,783  on display 'Default' of size 1600x900
2019-12-28 18:11:20,187 close_gtk_display() safe_close=True, close=False, gdk_mod=<module 'gtk.gdk'>
2019-12-28 18:11:20,193 close_gtk_display() safe_close=True, close=False, gdk_mod=<module 'gtk.gdk'>
2019-12-28 18:11:20,438 do_quit: calling gtk_main_quit_really
2019-12-28 18:11:20,444 do_quit: gtk_main_quit_really done
2019-12-28 18:11:20,449 do_quit: calling gtk_main_quit_really
2019-12-28 18:11:20,454 do_quit: gtk_main_quit_really done
2019-12-28 18:11:20,460 do_run() end of gtk.main()
>

r24802 3.0.4 does not exhibit such issue either:

# Main thread
> Xpra-Python3-x86_64_3.0.5-r24802\Xpra_cmd.exe shadow -d gtk
2019-12-28 18:56:31,713 created named pipe '\\.\pipe\Xpra\Main'
2019-12-28 18:56:32,449 GTKServerBase.__init__()
2019-12-28 18:56:33,089 serving html content from 'Xpra-Python3-x86_64_3.0.5-r24802\www'
2019-12-28 18:56:33,859 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:1816): Gdk-WARNING **: 18:56:34.141: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-28 18:56:34,144 do_run() calling <function main at 0x00000000053fd1f0>
2019-12-28 18:56:34,148 xpra is ready.
2019-12-28 18:56:34,150 xpra GTK3 shadow version 3.0.5-r24802 64-bit
2019-12-28 18:56:34,152  running with pid 1816 on Microsoft Windows 10
2019-12-28 18:56:34,154  on display 'Default' of size 1600x900
2019-12-28 18:56:47,962 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 18:56:48,058 Handshake complete; enabling connection
2019-12-28 18:56:48,183 Python3/GObject client version 3.0.5-r24802 64-bit
2019-12-28 18:56:48,185  connected from 'localhost' as 'user.win'
2019-12-28 18:56:49,273 Shutting down in response to client request
2019-12-28 18:56:49,278 Disconnecting client \\.\pipe\Xpra\Main:
2019-12-28 18:56:49,280  server shutdown
2019-12-28 18:56:49,296 xpra client 1 disconnected.
2019-12-28 18:56:49,355 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 18:56:49,810 Disconnecting client \\.\pipe\Xpra\Main:
2019-12-28 18:56:49,815  server shutdown
2019-12-28 18:56:49,824 close_gtk_display() safe_close=True, close=False, gdk_mod=<module 'gtk.gdk'>
2019-12-28 18:56:49,838 close_gtk_display() safe_close=True, close=False, gdk_mod=<module 'gtk.gdk'>
2019-12-28 18:56:50,079 do_quit: calling gtk_main_quit_really
2019-12-28 18:56:50,084 do_quit: gtk_main_quit_really done
2019-12-28 18:56:50,093 do_quit: calling gtk_main_quit_really
2019-12-28 18:56:50,096 do_quit: gtk_main_quit_really done
2019-12-28 18:56:50,104 do_run() end of gtk.main()
>
# Side thread:
>Xpra-Python3-x86_64_3.0.5-r24802\Xpra_cmd.exe stop
server requested disconnect:
 server shutdown
xpra at Main has exited.
>

Neither does r24778 via xpra stop:

>Xpra-Python3-x86_64_3.0.4-r24778\xpra_cmd shadow -d gtk
2019-12-28 19:01:10,703 created named pipe '\\.\pipe\Xpra\Main'
2019-12-28 19:01:11,314 GTKServerBase.__init__()
2019-12-28 19:01:11,865 serving html content from '\Xpra-Python3-x86_64_3.0.4-r24778\www'
2019-12-28 19:01:12,691 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(xpra_cmd:9292): Gdk-WARNING **: 19:01:12.974: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-28 19:01:12,978 do_run() calling <function main at 0x0000000005b3e0d0>
2019-12-28 19:01:12,981 xpra is ready.
2019-12-28 19:01:12,984 xpra GTK3 shadow version 3.0.4-r24778 64-bit
2019-12-28 19:01:12,987  running with pid 9292 on Microsoft Windows 10
2019-12-28 19:01:12,988  on display 'Default' of size 1600x900
(xpra_cmd:9292): Gdk-CRITICAL **: 19:01:15.129: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x0000000004875E91. Access violation - attempting to read data at address 0x0000000000000020
>Xpra-Python3-x86_64_3.0.4-r24778\xpra_cmd shadow -d gtk
2019-12-28 19:12:11,920 created named pipe '\\.\pipe\Xpra\Main'
2019-12-28 19:12:12,612 GTKServerBase.__init__()
2019-12-28 19:12:13,170 serving html content from 'Xpra-Python3-x86_64_3.0.4-r24778\www'
2019-12-28 19:12:14,077 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(xpra_cmd:11140): Gdk-WARNING **: 19:12:14.375: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-28 19:12:14,378 do_run() calling <function main at 0x0000000005b7e0d0>
2019-12-28 19:12:14,382 xpra is ready.
2019-12-28 19:12:14,383 xpra GTK3 shadow version 3.0.4-r24778 64-bit
2019-12-28 19:12:14,385  running with pid 11140 on Microsoft Windows 10
2019-12-28 19:12:14,387  on display 'Default' of size 1600x900
2019-12-28 19:12:18,049 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 19:12:18,110 Handshake complete; enabling connection
2019-12-28 19:12:18,144 Python3/GObject client version 3.0.5-r24802 64-bit
2019-12-28 19:12:18,147  connected from 'localhost' as 'user.win'
2019-12-28 19:12:19,241 Shutting down in response to client request
2019-12-28 19:12:19,254 Disconnecting client \\.\pipe\Xpra\Main:
2019-12-28 19:12:19,256  server shutdown
2019-12-28 19:12:19,266 xpra client 1 disconnected.
2019-12-28 19:12:19,324 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 19:12:19,816 Disconnecting client \\.\pipe\Xpra\Main:
2019-12-28 19:12:19,821  server shutdown
2019-12-28 19:12:20,083 do_quit: calling gtk_main_quit_really
2019-12-28 19:12:20,088 do_quit: gtk_main_quit_really done
2019-12-28 19:12:20,097 do_quit: calling gtk_main_quit_really
2019-12-28 19:12:20,100 do_quit: gtk_main_quit_really done
2019-12-28 19:12:20,108 do_run() end of gtk.main()
>

Is this some kind of Heisenbug?


However:

I cannot stop the display with xpra stop

# Side thread
> "Xpra-Python3-x86_64_4.0-r24803\xpra_cmd" list
Found the following xpra sessions:
Xpra:
        LIVE session at Main
> "Xpra-Python3-x86_64_4.0-r24803\xpra_cmd" stop
Error: read connection namedpipe://Xpra\Main/ reset
Error: write connection namedpipe://Xpra\Main/ reset
 type object 'super' has no attribute 'untilConcludes': 0
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 637, in _io_thread_loop
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 716, in _read
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 94, in read
  File "E:\Xpra\trunk\src/xpra/net/bytestreams.py", line 185, in _read
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 91, in untilConcludes
OSError: type object 'super' has no attribute 'untilConcludes': 0
 type object 'super' has no attribute 'untilConcludes': 0
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 637, in _io_thread_loop
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 664, in _write
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 680, in write_items
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 699, in write_buffers
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 710, in con_write
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 121, in write
  File "E:\Xpra\trunk\src/xpra/net/bytestreams.py", line 178, in _write
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 91, in untilConcludes
OSError: type object 'super' has no attribute 'untilConcludes': 0
>
# Main thread:
> "Xpra-Python3-x86_64_4.0-r24803\xpra_cmd" shadow -d gtk
2019-12-28 18:12:34,160 created named pipe '\\.\pipe\Xpra\Main'
2019-12-28 18:12:34,907 GTKServerBase.__init__()
2019-12-28 18:12:35,543 serving html content from 'Xpra-Python3-x86_64_4.0-r24803\www'
2019-12-28 18:12:36,475 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(xpra_cmd:5452): Gdk-WARNING **: 18:12:36.951: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-28 18:12:36,956 do_run() calling <function main at 0x00000000055b3280>
2019-12-28 18:12:36,963 xpra is ready.
2019-12-28 18:12:36,973 xpra GTK3 shadow version 4.0-r24803 64-bit
2019-12-28 18:12:36,983  running with pid 5452 on Microsoft Windows 10
2019-12-28 18:12:36,988  on display 'Default' of size 1600x900
2019-12-28 18:12:59,027 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 18:12:59,031 Error: read connection \\.\pipe\Xpra\Main reset
2019-12-28 18:12:59,032  type object 'super' has no attribute 'untilConcludes': 0
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 637, in _io_thread_loop
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 716, in _read
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 94, in read
  File "E:\Xpra\trunk\src/xpra/net/bytestreams.py", line 185, in _read
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 91, in untilConcludes
OSError: type object 'super' has no attribute 'untilConcludes': 0
2019-12-28 18:13:49,443 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 18:13:49,446 Error: read connection \\.\pipe\Xpra\Main reset
2019-12-28 18:13:49,447  type object 'super' has no attribute 'untilConcludes': 0
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 637, in _io_thread_loop
  File "E:\Xpra\trunk\src/xpra/net/protocol.py", line 716, in _read
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 94, in read
  File "E:\Xpra\trunk\src/xpra/net/bytestreams.py", line 185, in _read
  File "E:\Xpra\trunk\src/xpra/platform/win32/namedpipes/connection.py", line 91, in untilConcludes
OSError: type object 'super' has no attribute 'untilConcludes': 0
######################################## Right-click, exit: ########################################
2019-12-28 18:15:30,669 close_gtk_display() safe_close=True, close=False, gdk_mod=<module 'gtk.gdk'>
2019-12-28 18:15:30,677 close_gtk_display() safe_close=True, close=False, gdk_mod=<module 'gtk.gdk'>
2019-12-28 18:15:30,924 do_quit: calling gtk_main_quit_really
2019-12-28 18:15:30,929 do_quit: gtk_main_quit_really done
2019-12-28 18:15:30,934 do_quit: calling gtk_main_quit_really
2019-12-28 18:15:30,936 do_quit: gtk_main_quit_really done
2019-12-28 18:15:30,945 do_run() end of gtk.main()
>

I also had a random crash with xpra stop:

Xpra-Python3-x86_64_3.0.5-r24802\Xpra_cmd.exe shadow -d gtk
2019-12-28 19:06:06,965 created named pipe '\\.\pipe\Xpra\Main'
2019-12-28 19:06:07,733 GTKServerBase.__init__()
2019-12-28 19:06:08,317 serving html content from 'Xpra-Python3-x86_64_3.0.5-r24802\www'
2019-12-28 19:06:09,083 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:3112): Gdk-WARNING **: 19:06:09.344: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-28 19:06:09,349 do_run() calling <function main at 0x0000000005b5d1f0>
2019-12-28 19:06:09,353 xpra is ready.
2019-12-28 19:06:09,355 xpra GTK3 shadow version 3.0.5-r24802 64-bit
2019-12-28 19:06:09,358  running with pid 3112 on Microsoft Windows 10
2019-12-28 19:06:09,359  on display 'Default' of size 1600x900
2019-12-28 19:06:11,668 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 19:06:11,730 Handshake complete; enabling connection
2019-12-28 19:06:11,756 Python3/GObject client version 3.0.5-r24802 64-bit
2019-12-28 19:06:11,759  connected from 'localhost' as 'user.win'
2019-12-28 19:06:12,845 Shutting down in response to client request
2019-12-28 19:06:12,851 Disconnecting client \\.\pipe\Xpra\Main:
2019-12-28 19:06:12,854  server shutdown
2019-12-28 19:06:12,870 xpra client 1 disconnected.
2019-12-28 19:06:12,931 New named-pipe connection received on \\.\pipe\Xpra\Main
2019-12-28 19:06:13,379 Disconnecting client \\.\pipe\Xpra\Main:
2019-12-28 19:06:13,380  server shutdown
2019-12-28 19:06:13,384 close_gtk_display() safe_close=True, close=True, gdk_mod=<module 'gtk.gdk'>
2019-12-28 19:06:13,385 close_gtk_display() displays=[<__gi__.GdkWin32Display object at 0x000000000fa6b900 (GdkWin32Display at 0x0000000003c02000)>]
2019-12-28 19:06:13,386 close_gtk_display() closing <__gi__.GdkWin32Display object at 0x000000000fa6b900 (GdkWin32Display at 0x0000000003c02000)>
(Xpra_cmd.exe:3112): Gtk-ERROR **: 19:06:13.391: Can't create a GtkStyleContext without a display connection
Exception code=0x80000003 flags=0x0 at 0x00007FFEF327C302

Sun, 29 Dec 2019 09:42:42 GMT - Antoine Martin: owner changed

The original error does not happen in r24803:

That's after setting set XPRA_CLOSE_GTK_DISPLAY=0. Does it still happen without it? (ie: set XPRA_CLOSE_GTK_DISPLAY=1)

r24802 3.0.4 does not exhibit such issue either:

Did you leave the environment variable set?

I cannot stop the display with xpra stop

That was a syntax error in trunk, fixed in r24823. (FYI: you can still use xpra stop by connecting to the server's TCP socket instead of the default named pipe)

I also had a random crash with xpra stop:

This one definitely did not have XPRA_CLOSE_GTK_DISPLAY=0.


Sun, 29 Dec 2019 10:42:20 GMT - stdedos: owner changed

Replying to Antoine Martin:

The original error does not happen in r24803:

That's after setting set XPRA_CLOSE_GTK_DISPLAY=0. Does it still happen without it? (ie: set XPRA_CLOSE_GTK_DISPLAY=1)

Yes, it does

%HOME%> cd Xpra-Python3-x86_64_4.0-r24803
Xpra-Python3-x86_64_4.0-r24803>Xpra_cmd.exe shadow
2019-12-29 12:33:39,721 created named pipe '\\.\pipe\Xpra\Main'
2019-12-29 12:33:41,679 serving html content from 'Xpra-Python3-x86_64_4.0-r24803\www'
2019-12-29 12:33:42,526 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:1132): Gdk-WARNING **: 12:33:43.096: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-29 12:33:43,101 xpra is ready.
2019-12-29 12:33:43,102 xpra GTK3 shadow version 4.0-r24803 64-bit
2019-12-29 12:33:43,103  running with pid 1132 on Microsoft Windows 10
2019-12-29 12:33:43,104  on display 'Default' of size 1600x900
(Xpra_cmd.exe:1132): Gdk-CRITICAL **: 12:33:45.321: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x000000006C205E91. Access violation - attempting to read data at address 0x0000000000000020
Xpra-Python3-x86_64_4.0-r24803>"Xpra-Python3-x86_64_4.0-r24803\xpra_cmd"
Xpra-Python3-x86_64_4.0-r24803>
Xpra-Python3-x86_64_4.0-r24803>set XPRA_CLOSE_GTK_DISPLAY=1
Xpra-Python3-x86_64_4.0-r24803>Xpra_cmd.exe shadow
2019-12-29 12:34:05,918 created named pipe '\\.\pipe\Xpra\Main'
2019-12-29 12:34:07,265 serving html content from 'Xpra-Python3-x86_64_4.0-r24803\www'
2019-12-29 12:34:08,069 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:10800): Gdk-WARNING **: 12:34:08.443: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-29 12:34:08,449 xpra is ready.
2019-12-29 12:34:08,450 xpra GTK3 shadow version 4.0-r24803 64-bit
2019-12-29 12:34:08,452  running with pid 10800 on Microsoft Windows 10
2019-12-29 12:34:08,454  on display 'Default' of size 1600x900
(Xpra_cmd.exe:10800): Gdk-CRITICAL **: 12:34:21.885: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x000000006C205E91. Access violation - attempting to read data at address 0x0000000000000020
Xpra-Python3-x86_64_4.0-r24803>set XPRA_CLOSE_GTK_DISPLAY=0
Xpra-Python3-x86_64_4.0-r24803>Xpra_cmd.exe shadow
2019-12-29 12:34:34,311 created named pipe '\\.\pipe\Xpra\Main'
2019-12-29 12:34:35,773 serving html content from 'Xpra-Python3-x86_64_4.0-r24803\www'
2019-12-29 12:34:36,570 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:7564): Gdk-WARNING **: 12:34:36.959: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-29 12:34:36,966 xpra is ready.
2019-12-29 12:34:36,967 xpra GTK3 shadow version 4.0-r24803 64-bit
2019-12-29 12:34:36,969  running with pid 7564 on Microsoft Windows 10
2019-12-29 12:34:36,970  on display 'Default' of size 1600x900
Xpra-Python3-x86_64_4.0-r24803>

r24802 3.0.4 does not exhibit such issue either:

Did you leave the environment variable set?

%HOME%>cd Xpra-Python3-x86_64_3.0.5-r24802
Xpra-Python3-x86_64_3.0.5-r24802>set XPRA_CLOSE_GTK_DISPLAY=1
Xpra-Python3-x86_64_3.0.5-r24802>Xpra_cmd.exe shadow
2019-12-29 12:36:55,375 created named pipe '\\.\pipe\Xpra\Main'
2019-12-29 12:36:57,412 serving html content from 'Xpra-Python3-x86_64_3.0.5-r24802\www'
2019-12-29 12:36:58,893 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:2476): Gdk-WARNING **: 12:36:59.501: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-29 12:36:59,518 xpra is ready.
2019-12-29 12:36:59,521 xpra GTK3 shadow version 3.0.5-r24802 64-bit
2019-12-29 12:36:59,524  running with pid 2476 on Microsoft Windows 10
2019-12-29 12:36:59,527  on display 'Default' of size 1600x900
(Xpra_cmd.exe:2476): Gdk-CRITICAL **: 12:37:03.839: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
Exception code=0xc0000005 flags=0x0 at 0x0000000004875E91. Access violation - attempting to read data at address 0x0000000000000020
Xpra-Python3-x86_64_3.0.5-r24802>set XPRA_CLOSE_GTK_DISPLAY=0
Xpra-Python3-x86_64_3.0.5-r24802>Xpra_cmd.exe shadow
2019-12-29 12:37:34,902 created named pipe '\\.\pipe\Xpra\Main'
2019-12-29 12:37:36,787 serving html content from 'Xpra-Python3-x86_64_3.0.5-r24802\www'
2019-12-29 12:37:38,188 GStreamer version 1.16.2 for Python 3.8.0 64-bit
(Xpra_cmd.exe:13300): Gdk-WARNING **: 12:37:38.568: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2019-12-29 12:37:38,644 xpra is ready.
2019-12-29 12:37:38,647 xpra GTK3 shadow version 3.0.5-r24802 64-bit
2019-12-29 12:37:38,652  running with pid 13300 on Microsoft Windows 10
2019-12-29 12:37:38,654  on display 'Default' of size 1600x900

I cannot stop the display with xpra stop

That was a syntax error in trunk, fixed in r24823. (FYI: you can still use xpra stop by connecting to the server's TCP socket instead of the default named pipe)

I also had a random crash with xpra stop:

This one definitely did not have XPRA_CLOSE_GTK_DISPLAY=0.

Yes, and I only managed to replicate it once :/ Maybe it was some timing issue. It looked different than the other issue, hence I hoped debug was going to be enough


Sun, 29 Dec 2019 11:35:49 GMT - Antoine Martin: status changed; resolution set

OK, so clearly we can't close the display on win32, r24826 makes that the default.

It looked different than the other issue, hence I hoped debug was going to be enough

Let's hope this was a fluke.. and open a new ticket if it happens again.


Sat, 23 Jan 2021 05:53:38 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2525