Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-24 Thread Thomas Martitz
Am 24.10.2013 05:59, schrieb Matthew Brush:Don't try to make special conditions that say your contributions must not be discussed/reviewed, thats rude, its like saying you think you are better than the other contributors on this list. I said it specifically to avoid getting into deep design

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-24 Thread Matthew Brush
On 13-10-24 12:23 AM, Thomas Martitz wrote: Am 24.10.2013 04:09, schrieb Matthew Brush: On 13-10-23 11:36 AM, Thomas Martitz wrote: [snip] Regarding that pattern we discussed previously and used in this AutoClose code for attaching data to a document, I'd be interested whether you or anyone

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-24 Thread Thomas Martitz
Am 24.10.2013 16:25, schrieb Matthew Brush: I agree with that. I also agree with your general idea of per-document data lists. However, I'm not seeing the point of the new code you added because each doc has already a ScintillaObject, which is a GObject. I would suggest that the

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Matthew Brush
On 13-10-23 05:29 AM, n@sk0 wrote: Before read : Keep in mind that i am *not* C/C++ native developer, and all message below can be just rant. After little testing and debugging, i found that : In on_editor_notify() function, user_data is not a valid pointer : on_editor_notify(GObject *obj, gint

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Frank Lanitz
On Wed, 23 Oct 2013 07:53:16 -0700 Matthew Brush mbr...@codebrainz.ca wrote: The final problem is that, as Lex mentioned, it's not checking `DOC_VALID()` (or doc-is_valid) but just that data-doc != NULL, so if any document that was ever activated is closed, this is going to explode when the

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Pavel Roschin
(for reasons I never understood, Geany recycles documents, so it's entirely possible to have a document pointer that is neither NULL nor valid) Didn't expect that. I'll fix my plugins for such kind of mistakes. -- Best regards, Pavel Roschin aka RPG

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Thomas Martitz
Am 23.10.2013 16:53, schrieb Matthew Brush: On 13-10-23 05:29 AM, n@sk0 wrote: Before read : Keep in mind that i am *not* C/C++ native developer, and all message below can be just rant. After little testing and debugging, i found that : In on_editor_notify() function, user_data is not a valid

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Lex Trotman
On 24 October 2013 13:09, Matthew Brush mbr...@codebrainz.ca wrote: On 13-10-23 11:36 AM, Thomas Martitz wrote: [snip] Regarding that pattern we discussed previously and used in this AutoClose code for attaching data to a document, I'd be interested whether you or anyone thinks this

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Lex Trotman
[...] I said it specifically to avoid getting into deep design discussions or code reviews, I just want a general +1 or -1 whether anyone thinks the general concept is useful and whether it's worth looking at implementing something similar. If not one else really cares, it's not worth getting

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Matthew Brush
On 13-10-23 09:13 PM, Lex Trotman wrote: [...] I said it specifically to avoid getting into deep design discussions or code reviews, I just want a general +1 or -1 whether anyone thinks the general concept is useful and whether it's worth looking at implementing something similar. If not one

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Matthew Brush
On 13-10-23 08:39 PM, Lex Trotman wrote: On 24 October 2013 13:09, Matthew Brush mbr...@codebrainz.ca wrote: On 13-10-23 11:36 AM, Thomas Martitz wrote: [snip] Regarding that pattern we discussed previously and used in this AutoClose code for attaching data to a document, I'd be

Re: [Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

2013-10-23 Thread Lex Trotman
[...] But it seems a pity to have to duplicate the glib interface for each structure that offers the facility, can we just return the GData and let the plugins use the normal g_datalist functions? [...] To summarise the answer to the question Matthew gave on IRC, no, we don't have to