Dear all,

I am currently trying to create a custom lexer for a language called NESTML.
I followed the instructions on the hacking section of the manual and managed to compile a local geany with the new lexer.

However, I am encountering a Segfault problem when using this local geany: when I directly open a file, geany crashes immediately with a segmentation fault message.
However, if I use Document > define filetype > NESTML on an empty page, I am able to write a file and the new lexer seems to work like a charm. Following this, opening an existing .nestml file becomes possible and the lexer still works on this file. Yet, when I close geany, I again get the segmentation fault.
At some point (not always)s messages also appeared, saying: (geany:10608): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

The detailed of my implementation is on my fork of geany, on GitHub.
I am working on an Ubuntu-based Linux Mint with Glib2 and Gtk2, and the latest master for geany; the compilation was done using:

    (make distclean &&) ./autogen.sh --disable-html-docs --prefix=/home/me/.local && make && make install

and the output of autoconf is attached.

Could someone tell me where the problem comes from?
I first thought I forgot to tell geany something about the lexer, but since the crash occurs for any filetype, I'm no longer sure this is the problem.
An since my knowledge in C++ development is limited, I don't know how I could build geany in debug mode to track the problem...

Any help appreciated!

Best regards,

Tanguy