2018-09-21 03:17:01 |
Andrew Meadows |
description |
Bug 1267195 was fixed with revision 1734 in the GTK3 branch. This caused a regression when the .replace('-','_') method call was removed.
In terminatorlib/ipc.py, line 26, the effected code changed from:
DISPLAY = hex(hash(Gdk.get_display())).replace('-', '_')
to:
DISPLAY = hex(hash(Gdk.get_display().partition('.')[0]))
Python's built-in hash function returns a signed integer. The built-in hex function returns a signed hex value, not a hex representation of the unsigned value. D-Bus does not allow the '-' character in bus names. This means that half of the possible hash values for the display name will now cause terminator to crash on startup with a D-Bus error.
When ipc.py line 26 is changed to:
DISPLAY = hex(hash(Gdk.get_display().partition('.')[0])).replace('-', '_').replace('-', '_')
it appears to fix the original bug without causing the regression. |
Bug 1267195 was fixed with revision 1734 in the GTK3 branch. This caused a regression when the .replace('-','_') method call was removed.
In terminatorlib/ipc.py, line 26, the effected code changed from:
DISPLAY = hex(hash(Gdk.get_display())).replace('-', '_')
to:
DISPLAY = hex(hash(Gdk.get_display().partition('.')[0]))
Python's built-in hash function returns a signed integer. The built-in hex function returns a signed hex value, not a hex representation of the unsigned value. D-Bus does not allow the '-' character in bus names. This means that half of the possible hash values for the display name will now cause terminator to crash on startup with a D-Bus error.
When ipc.py line 26 is changed to:
DISPLAY = hex(hash(Gdk.get_display().partition('.')[0])).replace('-', '_')
it appears to fix the original bug without causing the regression. |
|