-
-
Notifications
You must be signed in to change notification settings - Fork 20.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
Index p_gutter = -1 is out of bounds
error when saving file in external editor
#81135
Comments
I can reproduce it on my personal project with Godot v4.2.dev (fcbd899b2) - Windows 10.0.22621 - GLES3 (Compatibility) - AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.21023.2010) - AMD Ryzen 9 6900HS with Radeon Graphics (16 Threads) |
can also reproduce on linux. using Godot v4.1.1.stable - Arch Linux #1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:40 +0000 - Vulkan (Compatibility) - Mesa Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i7-1260P (16 Threads) |
Closing open scripts in the Godot editor seems to work around the error (i.e. no error spam when editing scripts in an external editor). |
Still a bug. Is this being worked on? It's quite annoying. :P |
Still happens with v4.2.dev6.official [57a6813]
I found out that if the "Highlight Type Safe Lines" editor setting is turned off, this bug doesn't happen. This is the line mentioned in the error message (in master): Line 5884 in 51f81e1
The only suspicious calls to the function ( godot/editor/plugins/script_text_editor.cpp Lines 684 to 694 in 51f81e1
The default value of This is the only place where godot/editor/plugins/script_text_editor.cpp Lines 1213 to 1225 in 51f81e1
Either |
I'm getting a similar issue, but instead of "gutter" it's "line" update: I've found that this one specifically happens upon loading a project that has a plain .txt file in it. |
Confirming the issue on 4.2.1 stable too. Happens when I save in an external editor (VSCode) |
I cannot reproduce this bug anymore with v4.3.dev2.official. Edit: Oh yes, I can. |
Would be good to identify what fixed the bug in 4.3 so we could cherry-pick the fix to 4.2. I didn't manage to reproduce the bug in 4.2.1.stable myself to try to assess which dev snapshot first fixed the issue, but I'm not usually using VS Code as external editor so I might not have the appropriate configuration to trigger the bug. |
Idk, what you are about... I have this issue in v4.3.dev2.official [3524346]: And in v4.3.dev3.official [36e943b] Could we be looking at two bugs with the same sympton? This is how I reproduce: Have multiple scripts open in the Godot editor, open the project in Visual Studio Code (I have the extensions installed, addendum: both "C# Tools for Godot" and "godot-tools", I don't think that makes a difference), and I edit one script, one space added will do. |
I tested this again and yes, I can reproduce this after all. Now I used 4.3 dev3. I failed to reproduce the bug yesterday because I had set the |
@miv391 Thanks! That workaround works good. This was driving me crazy... 😁 |
Godot version
v4.2.dev3.official [013e8e3]
System information
Godot v4.2.dev3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.3640) - Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 Threads)
Issue description
You get these errors when saving file in external editor:
Steps to reproduce
Text Editor | Appearance | Highlight Type Safe Lines
setting must be on.My external editor is vscode version 1.18.1 with godot-tools version 1.3.1.
stages.gd
in vscodestages.gd
in vscodeSometimes the errors are displayed immediately after step 3, sometimes step 4 is needed.
Minimal reproduction project
I left some files in the
.godot
folder as I suspect that the editor layout might have something to do with the bug.g42_p_gutter.zip
The text was updated successfully, but these errors were encountered: