After working for some hours, I got a segfault when closing geany 1.23 (built on Apr 20 2013 with GTK 2.24.8, GLib 2.30.3).
I reported the bug at geany, but I was told it was a bug comming from the spellchecker.
Many thanks for your help,
I'm not completely sure what happened.
Maybe the callback for checking text while typing was still active and tried to access the document which was already released while Geany was about to quit.
I committed a fix for this scenario in cecaa3ff1ce1fe7a3fdcd0af979c88c68520ef4c.