Description
This only occurs in my codebase and not the editor hotreload example that works fine, but I am getting linux_reload_workaround.rs:95 hot reloading should only be set once: true
panics whenever I compile my code in my project. This has been going on for the past 8 months or so, but since August my temp solution of deleting the .godot folder no longer worked to fix editor hotreloading for that Godot Editor session. On Windows this hasn't been an issue, its only an issue for my Arch Linux system.
I linked my codebase in the discord thread discusing this issue https://discord.com/channels/723850269347283004/1375167369894432789/1375207827848564818 where there is also details regarding stacktraces and replacing linux_reload_workaround.rs with print statements. This is a Godot 4.4.1 stable project. To replicate, be on Linux, compile project before opening, open project and add a comment anywhere in the code base, and then compile again. End result is a panic in your console and the editor will no longer reloads your code.
This is the same error but with print statements add to the linux reload workaround script:
> thread_atexit
> is_hot_reload_enabled
> thread_atexit
> is_hot_reload_enabled
[Rust] Deinit level Editor
[Rust] Deinit level Scene
[Rust] Deinit level Servers
[Rust] Deinit level Core
> thread_atexit
> is_hot_reload_enabled
> default_set_hot_reload
> enable_hot_reload
[print_error] [panic /home/aj/Documents/projects/blubble/gdext/godot-ffi/src/linux_reload_workaround.rs:71] hot reloading should only be set once: true
(backtrace disabled, run application with `RUST_BACKTRACE=1` environment variable)
ERROR: GDExtension initialization function 'gdext_rust_init' returned an error.
Extended backtrace
[panic backtrace]
0: godot_core::private::set_gdext_hook::{{closure}}
at /home/aj/Documents/projects/blubble/gdext/godot-core/src/private.rs:280:44
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/alloc/src/boxed.rs:1980:9
2: std::panicking::rust_panic_with_hook
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/std/src/panicking.rs:841:13
3: std::panicking::begin_panic_handler::{{closure}}
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/std/src/panicking.rs:699:13
4: std::sys::backtrace::__rust_end_short_backtrace
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/std/src/sys/backtrace.rs:168:18
5: __rustc::rust_begin_unwind
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/std/src/panicking.rs:697:5
6: core::panicking::panic_nounwind_fmt::runtime
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/core/src/panicking.rs:117:22
7: core::panicking::panic_nounwind_fmt
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/core/src/intrinsics/mod.rs:3193:9
8: core::panicking::panic_nounwind
at /rustc/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/library/core/src/panicking.rs:218:5
9: core::hint::unreachable_unchecked::precondition_check
at /home/aj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ub_checks.rs:68:21
10: core::hint::unreachable_unchecked
at /home/aj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ub_checks.rs:75:17
11: godot_ffi::toolbox::manual_init_cell::ManualInitCell<T>::set
at /home/aj/Documents/projects/blubble/gdext/godot-ffi/src/toolbox.rs:471:26
12: godot_ffi::initialize
at /home/aj/Documents/projects/blubble/gdext/godot-ffi/src/lib.rs:200:9
13: godot_core::init::__gdext_load_library::{{closure}}
at /home/aj/Documents/projects/blubble/gdext/godot-core/src/init/mod.rs:45:13
14: core::ops::function::FnOnce::call_once
at /home/aj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
15: std::panicking::try::do_call
at /home/aj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:589:40
16: __rust_try
17: std::panicking::try
at /home/aj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:552:19
18: std::panic::catch_unwind
at /home/aj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:359:14
19: godot_core::init::__gdext_load_library
at /home/aj/Documents/projects/blubble/gdext/godot-core/src/init/mod.rs:82:22
20: gdext_rust_init
at /home/aj/Documents/projects/blubble/rust/blubble-core/src/lib.rs:48:1
21: <unknown>
22: <unknown>
23: <unknown>
24: <unknown>
25: <unknown>
26: <unknown>
27: <unknown>
28: <unknown>
29: <unknown>
30: <unknown>
31: __libc_start_main
32: <unknown>
thread caused non-unwinding panic. aborting.