Currently our .gir/.typelib files for gobject-introspection are generated from the .h files. While this works ok it has some problems like lack of ownership specification so for example getting the data source of a frame transfers the full ownership to the caller when that's not true in usual usage. This leds to crashes when -for example- seed frees this wrongly "fully owned" return values. The solution would be to add proper annotations to our gtk-doc comments in .cpp files, however this does not solve the whole thing because g-ir-scanner can't read cpp files according to Colin Walters. We are stuck until they make a cpp parser for g-ir-scanner. Anyway, the bug is still there on our side but the solution to it is useless unless g-i-s is fixed.
g-i now reads cpp files, and I added annotations everywhere, so closing this bug.