Skip to content

importing tracing-tracy into godot-rust project prevents the gdextension from being read by Godot correctly #1230

@bcolloran

Description

@bcolloran

I decided to dig into some funny behavior I was seeing when I tried to get Tracy running with my project discord question

I wanted to make sure it wasn't just due to the complexity of my project, so I cooked up a minimal reproduction repo here: https://github.com/bcolloran/godot_rust_tracing_tracy_bug

It turns out that just adding a use tracing_tracy::TracyLayer; in lib.rs will prevent the gdextension from working, causing the following error to show up in the Godot console:
ERROR: core/extension/gdextension_library_loader.cpp:233 - GDExtension initialization function 'gdext_rust_init' returned an error.

I was surprised that just adding the use statement could cause an error, so I thought I'd file an issue. I think both godot-rust and tracing-tracy are doing some sophisticated low level magic behind the scenes, but I thought that it might be worth looking in to how these crates might be bumping into each other in case there is some kind of state leakage or unsafe ...something-something... that might causing unexpected issues that could turn up elsewhere as well.

I thought I'd file the issue over here, because the tracing-tracy lib is small enough that someone who understands the inner workings of godot-rust might be able to scan over it and notice what could be causing the conflict:
https://github.com/nagisa/rust_tracy_client/blob/main/tracing-tracy/src/lib.rs

But it could well be a problem in that code, so I'm happy to file an issue with that repo if that would be preferable.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions