Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload Godot Crash when using UtilityFunctions::print("something") in class destructor #1194

Closed
mohsenph69 opened this issue Jul 28, 2023 · 4 comments
Labels

Comments

@mohsenph69
Copy link

Godot version

4.1

godot-cpp version

4.1

System information

Linux manjaro

Issue description

I spend hours to find why my Terrain plugin crash when reloading the scene
And Finally I found that

Every time you output something to console with UtilityFunctions::print in class destructor, when you reload the scene it will crash
It will work in other situation, Only crash when Reloading the current project

Steps to reproduce

Create a GDExtension lib, and create a class which inherit from Node3D

In the destructor of your class out put something with UtilityFunctions::print

Go to project / reload current project

Project will not reload and it will crash

But off-course you can Run that again and it will work

Minimal reproduction project

"N/A"

@Zylann
Copy link
Collaborator

Zylann commented Jul 29, 2023

Might not be specific to extensions, see also godotengine/godot#79506

@mohsenph69
Copy link
Author

Yeah you are right it could be from Godot itself

@dsnopek
Copy link
Collaborator

dsnopek commented Jul 31, 2023

Yeah, UtilityFunctions::print() in godot-cpp just forwards to Godot's VariantUtilityFunctions::print() function. I don't think this is a godot-cpp bug.

@akien-mga
Copy link
Member

Probably fixed by godotengine/godot#80161.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants