You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash after unzooming a single terminal inside a tab #835
To Reproduce
Open Terminator. Open a tab. Zoom the single terminal in it (Ctrl+Shift+X), then unzoom it.
Desktop: (pretty sure it's not relevant)
OS or Linux Distribution: Linux Mint
Version: 21
Display Technology: X11
Describe the bug
Terminator crashes when unzooming a single terminal inside a tab. When there are 2 or more terminals, the issue doesn't occur. I did a git bisect, and found that the commit introducing the bug is 11639159, pushed for PR #810. The problems seems to be here:
#notify plugins of tab-changedbg("emit tab-change for tabpos: %s "%tabpos)
term_widget.emit('tab-change', tabpos)
self.set_current_page(tabpos)
widget.grab_focus()
in Notebook.newtab. The problem disappears when term_widget.emit('tab-change', tabpos) is removed.
When it doesn't crash, I see an extremely large number of new tabs, all containing the same terminal. Maybe it gets confused by the fact there is only one terminal..?
Let me also look into this, this PR seems to be mine. I have figured out the reason for the the trigger, where zoomed terminal calls def tab_change(self, widget, num=None, ignore = None): to unzoom which in turn creates a newtab everytime in a loop. I wanted to reused tab-change event and not add another one. I have two solutions in mind let me get a patch for this.
Terminator::find_terminal_by_uuid: checking: urn:uuid:9c5467f0-a14b-406b-9c11-c814058f4451 (<terminal.Terminal object at 0x7fc5de3c5f00 (terminatorlib+terminal+Terminal at 0x2dc3db0)>) (/home/user/dev/terminator/terminatorlib/terminator.py:187)
Traceback (most recent call last):
File "/home/user/dev/terminator/terminatorlib/notebook.py", line 519, in do_deferred_on_tab_switch
self.on_tab_switch(*self.pending_on_tab_switch_args)
File "/home/user/dev/terminator/terminatorlib/notebook.py", line 527, in on_tab_switch
term = self.terminator.find_terminal_by_uuid(tabs_last_active_term.urn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/dev/terminator/terminatorlib/terminator.py", line 189, in find_terminal_by_uuid
if terminal.get_toplevel().is_child_notebook():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Notebook' object has no attribute 'is_child_notebook'
Then on restore (unzoom) it goes into repeat spiral.
Notebook::newtab: creating TabLabel with text: user@kali: ~/dev/terminator (/home/user/dev/terminator/terminatorlib/notebook.py:316)
Notebook::newtab: inserting page at position: 1 (/home/user/dev/terminator/terminatorlib/notebook.py:323)
(terminator:20321): Gtk-WARNING **: 00:47:59.080: Can't set a parent on widget which has a parent
ConfigBase::get_item: detachable_tabs found in globals: True (/home/user/dev/terminator/terminatorlib/config.py:790)
Terminator::find_terminal_by_uuid: searching self.terminals for: urn:uuid:ac750de6-4d46-43f9-bc35-5999788a85e0 (/home/user/dev/terminator/terminatorlib/terminator.py:185)
Terminator::find_terminal_by_uuid: checking: urn:uuid:9c5467f0-a14b-406b-9c11-c814058f4451 (<terminal.Terminal object at 0x7fc5de3c5f00 (terminatorlib+terminal+Terminal at 0x2dc3db0)>) (/home/user/dev/terminator/terminatorlib/terminator.py:187)
@Vulcalien thanks for finding this bug on time, else It would have been difficult. In addition thanks to you I was able to implement the code in a simpler way.
Activity
vssdeo commentedon Oct 17, 2023
Let me also look into this, this PR seems to be mine. I have figured out the reason for the the trigger, where zoomed terminal calls def tab_change(self, widget, num=None, ignore = None): to unzoom which in turn creates a newtab everytime in a loop. I wanted to reused tab-change event and not add another one. I have two solutions in mind let me get a patch for this.
Then on restore (unzoom) it goes into repeat spiral.
[bug 835] 835-crash-after-unzooming-a-single-terminal-inside-a-tab gn…
[bug 846] 846-mouseless-keyboard-url-open-fails-to-extract-text-and-c…
[bug 835] 835-crash-after-unzooming-a-single-terminal-inside-a-tab gn…
[bug 846] 846-mouseless-keyboard-url-open-fails-to-extract-text-and-c…
vssdeo commentedon Oct 24, 2023
Removed the tab-change emit code. New pull request has a decoupled plugin code using focus-in event.
Merge pull request #849 from vssdeo/835-crash-after-unzooming-a-singl…
Vulcalien commentedon Feb 18, 2024
I can gladly state that it's fixed now!
vssdeo commentedon Feb 19, 2024
@Vulcalien thanks for finding this bug on time, else It would have been difficult. In addition thanks to you I was able to implement the code in a simpler way.
Vulcalien commentedon Feb 19, 2024
That's great, glad to be helpful!