xpra icon
Bug tracker and wiki

Opened 3 days ago

Closed 2 days ago

Last modified 2 days ago

#2876 closed defect (fixed)

Xpra Tray Error

Reported by: Mark Harkin Owned by: Mark Harkin
Priority: major Milestone: 4.1
Component: client Version: 3.0.x
Keywords: Cc:

Description

Built from trunk on Windows and getting the following error when launching xpra:

2020-09-16 09:02:12,662 Error: cannot register focus and power callbacks:
2020-09-16 09:02:12,662  argument 11: <class 'OverflowError'>: int too long to convert
Exception in thread keyboard-listener:
Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:/msys64/mingw64/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/gui.py", line 1107, in init_keyboard_listener
2020-09-16 09:02:12,728 make_clipboardmenuitem()
    keyboard_hook_id = SetWindowsHookExA(win32con.WH_KEYBOARD_LL, pointer, GetModuleHandleA(None), 0)
ctypes.ArgumentError: argument 3: <class 'OverflowError'>: int too long to convert
2020-09-16 09:02:12,799 make_instance([<class 'xpra.platform.win32.win32_tray.Win32Tray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>], (gtk3.client, 0, <Gtk.Menu object at 0x0000000005cdffc0 (GtkMenu at 0x0000000004ef9450)>, 'Xpra', 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x0000000007dd9c10>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x0000000007dd9a60>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x0000000007dd9af0>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x0000000007dd9b80>))
Traceback (most recent call last):
  File "C:\git\Xpra\trunk\src/xpra/util.py", line 199, in make_instance
    v = c(*args)
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_tray.py", line 32, in __init__
    self.tray_widget = win32NotifyIcon(self.app_id, self.tooltip, self.move_cb, self.click_cb, self.exit_cb, icon_filename)
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 243, in __init__
    self.create_tray_window()
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 250, in create_tray_window
    self.create_window()
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 256, in create_window
    self.hwnd = CreateWindowExA(0, NIclassAtom, window_name, style,
ctypes.ArgumentError: argument 11: <class 'OverflowError'>: int too long to convert
2020-09-16 09:02:12,855 Error: cannot instantiate <class 'xpra.platform.win32.win32_tray.Win32Tray'>:
2020-09-16 09:02:12,857  with arguments (gtk3.client, 0, <Gtk.Menu object at 0x0000000005cdffc0 (GtkMenu at 0x0000000004ef9450)>, 'Xpra', 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x0000000007dd9c10>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x0000000007dd9a60>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x0000000007dd9af0>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x0000000007dd9b80>)

I can see work has been done on this file already with "int too long to convert" but not sure how to fix.

Change History (8)

comment:1 Changed 3 days ago by Antoine Martin

Owner: changed from Antoine Martin to Mark Harkin

How strange that you are the first one to hit this issue.

We have to define SetWindowsHookExA so it doesn't choke on large ints: r27471 (similar to #2857)

Please confirm if this works for you so that I can backport it.

comment:2 in reply to:  1 Changed 3 days ago by Mark Harkin

Replying to Antoine Martin:

Please confirm if this works for you so that I can backport it.

It looks like the issue is still there after r27471.

comment:3 Changed 3 days ago by Antoine Martin

It looks like the issue is still there after r27471.

The error on SetWindowsHookExA or the one on CreateWindowExA or both?

comment:4 in reply to:  3 Changed 3 days ago by Mark Harkin

Replying to Antoine Martin:

It looks like the issue is still there after r27471.

The error on SetWindowsHookExA or the one on CreateWindowExA or both?

Sorry read the error too quickly, no exception for SetWindowsHookExA now only CreateWindowExA

2020-09-16 11:23:52,890 Error: cannot register focus and power callbacks:
2020-09-16 11:23:52,897  argument 11: <class 'OverflowError'>: int too long to convert
2020-09-16 11:23:52,938 make_clipboardmenuitem()
2020-09-16 11:23:52,971 make_instance([<class 'xpra.platform.win32.win32_tray.Win32Tray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>], (gtk3.client, 0, <Gtk.Menu object at 0x0000000008062880 (GtkMenu at 0x0000000004d52050)>, 'Xpra', 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x0000000008067280>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x00000000080670d0>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x0000000008067160>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x00000000080671f0>))
Traceback (most recent call last):
  File "C:\git\Xpra\trunk\src/xpra/util.py", line 199, in make_instance
    v = c(*args)
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_tray.py", line 32, in __init__
    self.tray_widget = win32NotifyIcon(self.app_id, self.tooltip, self.move_cb, self.click_cb, self.exit_cb, icon_filename)
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 243, in __init__
    self.create_tray_window()
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 250, in create_tray_window
    self.create_window()
  File "C:\git\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 256, in create_window
    self.hwnd = CreateWindowExA(0, NIclassAtom, window_name, style,
ctypes.ArgumentError: argument 11: <class 'OverflowError'>: int too long to convert
2020-09-16 11:23:53,015 Error: cannot instantiate <class 'xpra.platform.win32.win32_tray.Win32Tray'>:
2020-09-16 11:23:53,017  with arguments (gtk3.client, 0, <Gtk.Menu object at 0x0000000008062880 (GtkMenu at 0x0000000004d52050)>, 'Xpra', 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x0000000008067280>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x00000000080670d0>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x0000000008067160>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x00000000080671f0>)

comment:5 Changed 3 days ago by Antoine Martin

Sorry read the error too quickly, no exception for SetWindowsHookExA now only CreateWindowExA

Try r27474.

comment:6 in reply to:  5 Changed 2 days ago by Mark Harkin

Replying to Antoine Martin:

Sorry read the error too quickly, no exception for SetWindowsHookExA now only CreateWindowExA

Try r27474.

Looks like it's working, thanks.

But onto a new error:

2020-09-16 13:25:08,026 Error in prompt challenge handler:
2020-09-16 13:25:08,031  name 'gtk' is not defined

I'll raise another ticket for it though if I can't figure it out.

comment:7 Changed 2 days ago by Antoine Martin

Resolution: fixed
Status: newclosed

I'll raise another ticket for it though if I can't figure it out.

Please do.

comment:8 Changed 2 days ago by Mark Harkin

Ignore the gtk error, it was due to custom code I was trying on the handler gui.

Note: See TracTickets for help on using tickets.