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

Clicking "Online Docs" freezes the editor #51691

Closed
sosasees opened this issue Aug 15, 2021 · 7 comments
Closed

Clicking "Online Docs" freezes the editor #51691

sosasees opened this issue Aug 15, 2021 · 7 comments

Comments

@sosasees
Copy link

sosasees commented Aug 15, 2021

Godot version

3.3.2.stable.official

System information

Debian 10.10.0, amd64, Openbox Window Manager

Issue description

When I click the "Online Docs" button,
the online documentation Does open in my default web browser,
but before that happens, the Godot Editor freezes so that I have to kill the process
and then Restart the editor to continue working.

The expected behavior was that the online documentation opened
Without the Godot Editor freezing.

Steps to reproduce

  1. Open a script in the internal script editor
  2. Look on the toolbar above the script
  3. Press the "Online Docs" button in the toolbar.
    online-docs-button
  4. Reproduced: The Editor freezes before the webpage opens

Minimal reproduction project

The most minimal reproduction project is any Empty Godot Project.
This issue can be reproduced in Any Godot Project.

@anderlli0053
Copy link

It too occurs on Linux Mint 20.2 Cinnamon, kernel version 5.4.0-81-generic, CPU: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx × 4, and those 2 GPUs:

NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] / Advanced Micro Devices, Inc. [AMD/ATI] Picasso

@Calinou
Copy link
Member

Calinou commented Aug 16, 2021

I can't reproduce this on Fedora 34 KDE on 3.x 5ac3a85 and master 1057a10. I get this warning message in the terminal when clicking the button, but the URL opens normally in the default browser:

kf.coreaddons: Trying to attach UI delegate: KIO::JobUiDelegate(0x55add646c6b0) to job KJob(0x55add647a5f0) but this delegate is already attached to a different job KIO::OpenUrlJob(0x55add64628e0)

@rsubtil
Copy link
Contributor

rsubtil commented Aug 30, 2021

Godot hangs because with #43053 it now blocks until the command has finished running.

With #44514, this can be reverted to the old behavior without the zombie process issue, thanks to this:

// The new process
// Create a new session-ID so parent won't wait for it.
// This ensures the process won't go zombie at the end.
setsid();

But with create_process, it can no longer check for the error code, which was introduced to prevent trying all other options when the requested file doesn't even exist:

// Agnostic
ok = execute("xdg-open", args, nullptr, &err_code);
if (ok == OK && !err_code) {
return OK;
} else if (err_code == 2) {
return ERR_FILE_NOT_FOUND;
}

So, what would be the best way to solve this? Have two shell_open's, one blocking and one async? Or maybe have shell_open detect the URL prefix, and work async when dealing with web links (http://), and blocking when dealing with local files (file://)?

@akien-mga
Copy link
Member

CC @Faless

@akien-mga
Copy link
Member

Is this no longer valid/reproducible?

@sosasees
Copy link
Author

sosasees commented Jun 30, 2022

it's long fixed, at least for me.
i just forgot to close the issue until now.

@akien-mga akien-mga added this to the 4.0 milestone Jun 30, 2022
@anderlli0053
Copy link

Since my last comment in August '21, this has been solved for me on the same forementioned setup.

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

5 participants