Patch sent to FreeBSD bugzilla by Hodong <hodong@nimfsoft.com>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250403
Could be a fix for issue #2457 You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2634
-- Commit Summary --
* Disconnect signal handler from vte before destroying the widget.
-- File Changes --
M src/vte.c (1)
-- Patch Links --
https://github.com/geany/geany/pull/2634.patch https://github.com/geany/geany/pull/2634.diff
This sounds fair enough, but I would think that what should really be done is free `vf` *after* destroying the VTE widget, as the callbacks use the `vf` global. However, it makes sense not to restart the child when destroying the widget, so the patch here seems also not bad.
@b4n is this safe to merge before 1.37, given its fixing a crash?
I'll do a little investigation and testing, but it seems safe enough yes.
This sounds fair enough, but I would think that what should really be done is free `vf` _after_ destroying the VTE widget, as the callbacks use the `vf` global.
I've not investigated the source code extensively myself (the patch I posted I'm doing on behalf of the original author).
With a little help I could investigate a better patch, but the indication you give suggest a more complicated approach I guess which would require bigger changes.
Actually I could also just move the vf freeing down, but I'm not having the issue at hand, so I can't test myself if that actually works.
Merged #2634 into master.
After investigating the code, I don't think this can cause any harm, and it can indeed very well fix the mentioned issue. I also have moved the `g_free(vf)` further down in 110b7c839b70c10cebed676434a5e4bef89b2dbc as if any callbacks is called in the destruction phase they would possibly use this freed pointer. Also, it should have zero side effect apart from releasing memory a little later.
@elextr and here we go with the two last-minute commits for making a point release afterward :grin:
github-comments@lists.geany.org