This only seems to happen in the GopherClient. It's easiest to reproduce the crash when downloading a large file, and closing the tab before the download has completed.
I think this happens because when the BrowserTab is closed it deletes the client, but the client has still got it's signals connected. So when the GopherClient emits 'requestProgress', the deleted BrowserTab's on_requestProgress will be called, where it calls kristall::globals(), which seems to cause the crash.
This only seems to happen in the GopherClient. It's easiest to reproduce the crash when downloading a large file, and closing the tab before the download has completed.
I think this happens because when the BrowserTab is closed it deletes the client, but the client has still got it's signals connected. So when the GopherClient emits 'requestProgress', the deleted BrowserTab's
on_requestProgress
will be called, where it calls kristall::globals(), which seems to cause the crash.Fixed by calling
this->current_handler->cancelRequest();
in the BrowserTab destructor, which will cause clients to stop emitting 'requestProgress'.