GLibSharp / GtkSharp

.Net bindings for gtk+3 and above
Other
27 stars 21 forks source link

Objects inheriting from objects that inherit from GLib.Opaque are unrefing their handle twice. #54

Closed ylatuya closed 3 years ago

ylatuya commented 3 years ago

This issue has been detected in the GStreamer bindings https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/issues/58

The generator is inserting finalizers without checking if the base class for this object has one already. In objects with the following hierarchy Gst.Message -> Gst.MiniObject -> GLib.Opaque the same finalizer is inserted for both Gst.Message and Gst.MiniObject.

When the GC kicks in, both finalizers are called ending with a double unref.