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

Qutting the running project also quits the editor #73013

Closed
Coder2195Text opened this issue Feb 10, 2023 · 6 comments
Closed

Qutting the running project also quits the editor #73013

Coder2195Text opened this issue Feb 10, 2023 · 6 comments

Comments

@Coder2195Text
Copy link

Coder2195Text commented Feb 10, 2023

Godot version

v4.0rc1

System information

Ubuntu 22.04 Running on Vulkan Mesa Intel® UHD Graphics 620 (WHL GT2)

Issue description

I do not know how to describe in words, so watch the video

As for the end part when I say "Godot has crashed" it didn't crash, its the quit game button quit the editor along with it

Screencast.from.02-09-2023.08.49.24.PM.webm

Steps to reproduce

Use the minial reproduction project below.

Extract it.

DONT OPEN THE PROJECT JUST YET IN GODOT.

Run cargo build in the root directory of the extracted project

After finish, open the project in Godot.

If there are no scenes open, open scenes/Scene1.tscn

Your screen should look like this, a result of the scenes/Scene1.tscn redirecting to scenes/Scene2.tscn

Now this issue is focused upon the quitting of the glitch creates, so press the button

image

Your editor should quit

Minimal reproduction project

minimal.zip

@Calinou Calinou changed the title Game overlay in editor Qutting the running project also quits the editor Feb 10, 2023
@Calinou
Copy link
Member

Calinou commented Feb 10, 2023

@Coder2195Text Please upload a minimal reproduction project to make this easier to troubleshoot.

Can you reproduce this on 3.5.1 using the same code?

@akien-mga
Copy link
Member

Sounds like your game's main scene has a @tool script which creates an overlay, and quitting it quits the editor.

@Coder2195Text
Copy link
Author

Coder2195Text commented Feb 10, 2023

minimal.zip

Use the minial reproduction project above.

Extract it.

DONT OPEN THE PROJECT JUST YET IN GODOT.

Run cargo build in the root directory of the extracted project

After finish, open the project in Godot.

If there are no scenes open, open scenes/Scene1.tscn

Your screen should look like this, a result of the scenes/Scene1.tscn redirecting to scenes/Scene2.tscn

Now this issue is focused upon this vulnerability to quitting, in which I happened to find out through issue #73064 creates, so press the button to experience the quitting part.

image

Your editor should quit

@bluenote10
Copy link
Contributor

bluenote10 commented Feb 11, 2023

Sounds like your game's main scene has a @tool script which creates an overlay, and quitting it quits the editor.

@akien-mga The example uses gdextension, where unfortunately everything has tool semantics now. I'm frequently crashing the editor as a result of this as well. The example just does a get_tree().quit(0) which apparently, when executed from a gdextension, terminates the entire scene tree of the editor.

This is basically another manifestation of #54999 and the more I think about it, the more I believe that gdextension nodes should not run in the editor by default, and opt-in to "tool semantics" only if necessary.

@Coder2195Text As an ugly work-around probably can litter your code checks on is_editor_hint to manually opt-out from executing "dangerous code" in the editor 😕

@Coder2195Text
Copy link
Author

Sounds like your game's main scene has a @tool script which creates an overlay, and quitting it quits the editor.

@akien-mga The example uses gdextension, where unfortunately everything has tool semantics now. I'm constantly crashing the editor as a result of this as well. The example just does a get_tree().quit(0) which apparently, when executed from a gdextension, terminates the entire scene tree of the editor.

This is basically another manifestation of #54999 and the more I think about it, the more I believe that gdextension nodes should not run in the editor by default, and opt-in to "tool semantics" only if necessary.

@Coder2195Text As an ugly work-around probably can litter your code checks on is_editor_hint to manually opt-out from executing "dangerous code" in the editor confused

I already found it all out, I opened a separate issue for the overlay thingy (issue #73064)

And this issue is one of the glitches that come of the overlay

@Calinou
Copy link
Member

Calinou commented Feb 11, 2023

Duplicate of #54999 (same cause).

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants