webrtcbin setRemoteDescription() critical gstreamer error "g_object_unref: assertion 'G_IS_OBJECT (object)' failed" results in no video being sent
So I've recently been experimenting with webrtcbin and had essentially a working demo running on Ubuntu 18.04 and the provided gstreamer binaries from apt that seemed to have been pegged at the 1.14 release. I could see the bits being sent from chrome and the bits received on the server. I then tried to start digging around in the stream stats and realized this feature is a little under-cooked. I decided to upgrade my box to 20.04 and try the 1.16 release. I immediately started running into an issue during ice negotiation where gstreamer would log a critical error about midway through the candidates being generated:
(gst1-java-core:606116): GLib-GObject-CRITICAL **: 19:29:10.756: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Ice negotiation does finish but a video stream never arrives and the video pad never added. I can see the stream setup in chrome://webrtc-internals but no data is being sent through.
As you can see I'm using the java bindings. Whats even more odd is that I initialize with the gstreamer version set to 1.14 and still get the issue (though perhaps this versioning is only a 'min' version with the java bindings and 1.16 ends up being used). I've tried this in a 'sendrecv' and 'sendonly' pattern as I've built a fairly robust wrapper around the webrtcbin and it seems to happen either way. If I comment out 'setRemoteDescription()' thus disabling ice candidates from being created the critical error goes away, though obviously no media is ever sent.
My pattern is that on the client running in Chrome I generate an offer to send audio and video and immediately start sending candidates behind that offer having being sent (trickle pattern). Continuing to feed these into webrtcbin doesn't seem to cause the critical error to arise. It's only after I have done setRemoteDescription() and the ice candidates for the server start to be generated that I see the critical error above.
I found this commit that I suspect might have something to do with this https://github.com/GStreamer/gst-plugins-bad/commit/d0b2bde5befa523b94afd94357c21785a9b3563f.
Do you guys have any ideas what might be happening here? I'd like to start contributing to the project but this whole world is pretty new to me still. I've struggled with getting