Xpra: Ticket #1612: --dpi: client fails with "local variable 'xdpi' referenced before assignment"

system: debian stretch with winswitch stable repository bug in xpra 2.1, currently xpra v2.1-r16525 not a bug in 2.0.3

Hello! With option --dpi xpra 2.1 client fails with

error preparing connection: local variable 'xdpi' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/xpra/client/client_base.py", line 317, in send_hello
    hello.update(self.make_hello())
  File "/usr/lib/python2.7/dist-packages/xpra/client/gtk2/client.py", line 287, in make_hello
    capabilities = GTKXpraClient.make_hello(self)
  File "/usr/lib/python2.7/dist-packages/xpra/client/gtk_base/gtk_client_base.py", line 418, in make_hello
    capabilities = UIXpraClient.make_hello(self)
  File "/usr/lib/python2.7/dist-packages/xpra/client/ui_client_base.py", line 1424, in make_hello
    self._last_screen_settings = (root_w, root_h, sss, ndesktops, desktop_names, u_root_w, u_root_h, xdpi, ydpi)
UnboundLocalError: local variable 'xdpi' referenced before assignment

I provide --dpi to server and client, if that matters. The server starts up fine, the client crashes with above message. (I did not test providing --dpi to only one of server or client.) The error does not happen in xpra 2.0.3.



Thu, 03 Aug 2017 09:51:24 GMT - Antoine Martin: status changed; resolution set

See #1605


Thu, 03 Aug 2017 11:02:50 GMT - mviereck:

Thanks! Sorry for double-ticket, I could not find #1605 in active tickets (searching for "dpi"), probably because it is already closed.

The correct fix is in r16546. Backport to older branches in r16547.

r16547 is currently not present in winswitch repo for debian stretch, likely you will provide it, soon.


Thu, 03 Aug 2017 11:18:14 GMT - Antoine Martin:

This will be included in 2.1.1 release, due in the next few days.


Sat, 23 Jan 2021 05:29:06 GMT - migration script:

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