[Github-comments] [geany/geany] segfault responding to editor-notify when dragging a file onto Geany when only "untitled" is open (Issue #2998)

elextr notifications at xxxxx
Sat Nov 13 06:21:54 UTC 2021


No, its not fixable AFAICT (well not easily).  

All signal callbacks connected to the same signal get passed the same parameters, so in this case the same pointer is passed to both.  If a pointer in the parameters is invalidated by the first callback, the second will get a bad pointer, thats how it works.  

Unfortunately removing the silly empty untitled is an intended function of the file open code.

Personally I'd be happy to see that untitled removed from the code, but some people are offended by the empty space if no files are open, that arguments been had, so its staying.

If the parameter to the callback was not a pointer to the object but was a pointer to the pointer to the object then it can be nulled if the object is invalidated, but that would break all Geany and plugins code that used the notify signal.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2998#issuecomment-967790785
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211112/e6d3752e/attachment.htm>


More information about the Github-comments mailing list