-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Script reference is broken when script is moved in FileSystem dock #101615
Comments
Investigated a bit and something weird is going on. The bug only happens if both the scene and its script are open. During the filesystem dock move, a scene reload is requested, which ends up asking the script editor to edit the script. When iterating over the already opened scripts in the script editor, the following check for whether the script is already open weirdly fails: godot/editor/plugins/script_editor_plugin.cpp Line 2564 in 0726d3c
Try setting a breakpoint here and then moving the file, the debugger shows 2 different objects with different pointer addresses and refcounts. The |
Investigated some more and I think that PR should be reverted. It is difficult to pin down, but it seems that, by sometimes avoiding registration in One of the reasons for duplication seems to be this getting skipped when moving (because the script is not in the godot/editor/filesystem_dock.cpp Lines 1560 to 1577 in 1586c56
The |
This reverts commit fd5fc9f. This caused significant regressions which are worse than the bug that godotengine#96499 aimed to address. - Reverts godotengine#96499. - Reopens godotengine#95909. - Supersedes godotengine#102063. - Fixes godotengine#99006. - Fixes godotengine#101615.
This reverts commit fd5fc9f. This caused significant regressions which are worse than the bug that godotengine#96499 aimed to address. - Reverts godotengine#96499. - Reopens godotengine#95909. - Supersedes godotengine#102063. - Fixes godotengine#99006. - Fixes godotengine#101615.
This reverts commit fd5fc9f. This caused significant regressions which are worse than the bug that godotengine#96499 aimed to address. - Reverts godotengine#96499. - Reopens godotengine#95909. - Supersedes godotengine#102063. - Fixes godotengine#99006. - Fixes godotengine#101615.
This reverts commit fd5fc9f. This caused significant regressions which are worse than the bug that godotengine#96499 aimed to address. - Reverts godotengine#96499. - Reopens godotengine#95909. - Supersedes godotengine#102063. - Fixes godotengine#99006. - Fixes godotengine#101615.
This reverts commit fd5fc9f. This caused significant regressions which are worse than the bug that godotengine#96499 aimed to address. - Reverts godotengine#96499. - Reopens godotengine#95909. - Supersedes godotengine#102063. - Fixes godotengine#99006. - Fixes godotengine#101615.
This reverts commit fd5fc9f. This caused significant regressions which are worse than the bug that godotengine#96499 aimed to address. - Reverts godotengine#96499. - Reopens godotengine#95909. - Supersedes godotengine#102063. - Fixes godotengine#99006. - Fixes godotengine#101615.
Tested versions
4.4 beta1
Didn't test other versions, but probably a regression.
System information
W10
Issue description
When you have a script opened and then you move it to another directory, the script reference in the editor is broken. The internal path does not update, so re-focusing editor causes errors about missing file and trying to save the file will have no effect.
Steps to reproduce
Alternatively:
3. Unfocus and focus the editor
4. Error in output
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: