webrtc-native: Crash when using along other GDExtensions

Godot version

4.2.stable.arch_linux

Plugin version

1.0.3

System information

Manjaro Laptop, AMD 4800H APU

Issue description

Heya, this is a short in the dark since the underlying issue is not fully understood yet (and there are other candidates for this issue, I’m currently investigating and just wanted to see if someone else has a similiar issue).

So since one or two days ago I’ve had this issue where both my game instances (here: server and client) can’t establish a connection over webrtc but instead they silently crash (windows close, no error message). The only thing I get in the terminal is:

terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast

which could be anything (or rather anywhere) since there is no stack-trace.

Everything worked fine only ~48hours ago. Coincidentally, I did a system upgrade around the time it stopped working (pretty sure some package has some issues). The current manjaro update DOES have some issues (a lot of people reporting issues in their forums), but for me it’s been smooth sailing apart from this one Godot WebRTC problem.

Quick overview:

  • Worked before
  • Websocket connection works without issues (on server and on the client joining the lobby)
  • Once WebRTC comes into the mixing the game just closes

I am strongly suspecting an issue with a system package or something similiar, BUT every other single game or app is working fine. I’ve tried a bunch, no issues there. This is why I’m reaching out to check if someone else has similiar issues.

I’m using my own project (with two instances), but the provided minimal example show the same behaviour. I already tried redownloading the libs and replacing them in the project.

Other devices in my LAN work without issues (those are windows though). So I don’t think it’s some weird NAT issue or similiar.

Steps to reproduce

  • Run the minimal project.
  • Start a server (“listen”)
  • Try to connect

Minimal reproduction project

https://github.com/godotengine/godot-demo-projects/tree/master/networking/webrtc_signaling

Either with an external server or a local one (“in-game”). Doesn’t really matter.

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 32

Most upvoted comments

I’ve released v1.0.4, and updated the asset library entries (which will need some time to be approved).

Big thank you to everyone involved in this discussion, especially @Sch1nken for the amazing debugging effort, and @mihe for suggesting the final fix! 💙 🥳

Closing as fixed.

For me, but that is just a feeling, the “neither” corresponds to RTLD_LOCAL and RTLD_GLOBAL. So I think RTLD_LOCAL is already specified (even if other, non-related flags are set).

Again, later today I’ll try to build godot with different flags to see what happens.