GLibSharp / GtkSharp

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

Error GLib-GObject:ERROR:../gobject/gobject.c:3049:toggle_refs_notify: assertion failed: (tstack.n_toggle_refs == 1) #48

Open alexisconia opened 4 years ago

alexisconia commented 4 years ago

I encountered an error when I tried to use gstreamer-sharp (and so gtk-sharp) on the latest version. If you create an AppSrc or AppSink object, app crashes with the following error:

GLib-GObject:ERROR:../gobject/gobject.c:3049:toggle_refs_notify: assertion failed: (tstack.n_toggle_refs == 1)

You can reproduce the error with the code below:

public static void Main(string[] args)
{
    Gst.Application.Init();
    AppSrc appsrc = new AppSrc("test");

    Console.ReadLine();
}

It seems that the problem comes from this commit: https://github.com/GLibSharp/GtkSharp/commit/2bb4d5c2440b917ef03ff2b38aca4afa9d93d065

palles77 commented 4 years ago

I can confirm that the fix is to revert prior to the changes in the commit: 2bb4d5c When I took the code from the repository before this commit the library worked.

tsaunier commented 4 years ago

@sdroege Any idea about that?

sdroege commented 4 years ago

Had no time to look yet, it's on my list. Probably not too hard to fix once someone debugged it.

rabindra-harlalka commented 4 years ago

Should be fixed by this MR - https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/merge_requests/24.