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

Thomas Martitz thomas.martitz at xxxxx
Wed Oct 23 12:36:20 UTC 2013

Am 23.10.2013 14:29, schrieb n at sk0:
> 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 scn, SCNotification *nt, gpointer
> {
>     AutocloseUserData *data = user_data;
>     ...
> }
> After I playing for a while with this and reading demoplugin.c source, i
found that in the autoclose.c, PluginCallback[] (line:829) is missing
the definition for "editor-notify" event,so i added it, recompile plugin
and now all seems to work correctly.
> P.S.: I add the patch file as attachment to this mail, becouse for now i
do not have any expiriance in commiting patches on GitHub, but tonight i
will fix this big mistake :)

That's not right. on_editor_notify() is the signal handler for
"sci-notify". "editor-notify" is not involved.

However, the Geany code that emits "editor-notify" is a "sci-notify"
handler itself. Race condition perhaps?

Best regards.

More information about the Devel mailing list