You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing a virtual method that has a GodotString as a parameter, you need to do std::mem::forget() on that parameter, otherwise godot will crash.
Example of implementing ScriptLanguageExtensionVirtual::validate_path:
// additional validation on file-paths, return empty string for no errorfnvalidate_path(&self,path:GodotString) -> GodotString{println!("extension validate_path");
std::mem::forget(path);GodotString::from("")}
im here also adding a custom patch to gdextension where i just add in the return types for virtual methods (because of #190). it's fairly fragile and has some issues atm. but shouldn't interfere with this issue at hand, might clean that patch up at some point and upstream it.
The text was updated successfully, but these errors were encountered:
When implementing a virtual method that has a
GodotString
as a parameter, you need to dostd::mem::forget()
on that parameter, otherwise godot will crash.Example of implementing
ScriptLanguageExtensionVirtual::validate_path
:im here also adding a custom patch to gdextension where i just add in the return types for virtual methods (because of #190). it's fairly fragile and has some issues atm. but shouldn't interfere with this issue at hand, might clean that patch up at some point and upstream it.
The text was updated successfully, but these errors were encountered: