Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.37k stars 577 forks source link

empty panel name => guake fails to start #2195

Open d3im opened 10 months ago

d3im commented 10 months ago

Describe the bug

Just accidentally renamed tab to "rust" then tried to reset it and set it to empty string "". After guake restart it failed. Tried in another terminal to get error output:

[WARN] ===================================================================
[WARN] Unable to load the library libutempter !
[WARN] Some feature might not work:
[WARN]  - 'exit' command might freeze the terminal instead of closing the tab
[WARN]  - the 'wall' command is known to work badly
[WARN] Error: libutempter.so.0:
[WARN] ===================================================================²
Loading Gnome schema from: /usr/share/glib-2.0/schemas
Language previously loaded from: /usr/lib/python3.11/site-packages/guake/po
Guake Terminal 3.9.0
VTE 0.72.2
Gtk 3.24.38
created fresh notebook for workspace 0
Spawning new terminal at /home/user
current workspace is 0
can't bind show-focus key
Spawning new terminal at /home/user
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 173, in activate_name_owner
    return self.get_name_owner(bus_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 348, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/guake/main.py", line 473, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 237, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 178, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 273, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/guake", line 8, in <module>
    sys.exit(exec_main())
             ^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/guake/main.py", line 648, in exec_main
    if not main():
           ^^^^^^
  File "/usr/lib/python3.11/site-packages/guake/main.py", line 489, in main
    instance = Guake()
               ^^^^^^^
  File "/usr/lib/python3.11/site-packages/guake/guake_app.py", line 269, in __init__
    self.restore_tabs(suppress_notify=True)
  File "/usr/lib/python3.11/site-packages/guake/guake_app.py", line 1483, in restore_tabs
    box, page_num, term = nb.new_page_with_focus(
                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/guake/notebook.py", line 418, in new_page_with_focus
    self.rename_page(page_num, self.guake.compute_tab_title(terminal), False)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/guake/guake_app.py", line 1127, in compute_tab_title
    guake_yml = self.load_cwd_guake_yaml(vte)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/guake/guake_app.py", line 1111, in load_cwd_guake_yaml
    cwd = Path(vte.get_current_directory())
               ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_current_directory'

digged deeper and in session.js

"label": "",
"custom_label_set": true

setting label to anything except empty string solved problem.

Expected behavior

guake should run even if label is emtpy or don't allow to empty it

Actual behavior

guake fails to start

To Reproduce

set panel label to empty