close_tab_at() deleted the terminal, whose destructor called gtk_widget_destroy(vte_box_). GTK synchronously triggered the page-removed signal, invoking on_tab_close() which also tried to delete the same terminal.
Fix
Removed the page-removed signal handler entirely. Tab close is now handled explicitly without signal callbacks:
voidSshClientWindow::close_tab_at(intidx){// Find and disconnect first, THEN remove page
SshTerminal*found=nullptr;for(autoit=terminals_.begin();it!=terminals_.end();++it){if((*it)->widget()==page){found=*it;terminals_.erase(it);break;}}if(found){found->disconnect();deletefound;}gtk_notebook_remove_page(GTK_NOTEBOOK(notebook_),idx);}
## Bug
`close_tab_at()` deleted the terminal, whose destructor called `gtk_widget_destroy(vte_box_)`. GTK synchronously triggered the page-removed signal, invoking `on_tab_close()` which also tried to delete the same terminal.
## Fix
Removed the `page-removed` signal handler entirely. Tab close is now handled explicitly without signal callbacks:
```cpp
void SshClientWindow::close_tab_at(int idx) {
// Find and disconnect first, THEN remove page
SshTerminal* found = nullptr;
for (auto it = terminals_.begin(); it != terminals_.end(); ++it) {
if ((*it)->widget() == page) {
found = *it;
terminals_.erase(it);
break;
}
}
if (found) { found->disconnect(); delete found; }
gtk_notebook_remove_page(GTK_NOTEBOOK(notebook_), idx);
}
```
**Status:** Fixed in commit 4a2b2ea
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bug
close_tab_at()deleted the terminal, whose destructor calledgtk_widget_destroy(vte_box_). GTK synchronously triggered the page-removed signal, invokingon_tab_close()which also tried to delete the same terminal.Fix
Removed the
page-removedsignal handler entirely. Tab close is now handled explicitly without signal callbacks:Status: Fixed in commit
4a2b2ea