Both parent and child nodes should implement a function to be supplied as import functions:
func import_function(a):
print("Import function %s" % a)
The callback export function calls import_function. Before freeing $Child, both import functions should be successfully called. After freeing $Child, the program crashes.
Possible solution is to use a WeakRef to ensure the import function target is still valid.
Godot v4.2.2
Godot Wasm v0.3.6
Using import.wasm test Wasm module
Freeing the target of an import function before said import function is called results in a crash.
Both parent and child nodes should implement a function to be supplied as import functions:
The
callback
export function callsimport_function
. Before freeing$Child
, both import functions should be successfully called. After freeing$Child
, the program crashes.Possible solution is to use a WeakRef to ensure the import function target is still valid.
Godot v4.2.2 Godot Wasm v0.3.6 Using import.wasm test Wasm module