Comment 21 for bug 120569

Revision history for this message
Philipp Kern (pkern) wrote :

The problem is how this function is called. The GtkTextView is instanciated temporarely and is destroyed after the construction of the GtkSpell object, which triggers a destruction of the relevant parts needed by set_language. I personally would consider the call method wrong, but well.

A solution is to bump the refcnt of the textview in the GtkExtra python module (found in gnome-python-extras) by adding it to the type struct, and bumping the count in new_attach and get_from_textview. Also I think that one needs to introduce a destructor to decrease the refcnt of the textview. I tried this and the relevant part worked fine, but there was a crash in Python's GC instead.