godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.77k stars 21.13k forks source link

Godot Editor does not automatically connect to VCS #98643

Open daveTheOldCoder opened 3 days ago

daveTheOldCoder commented 3 days ago

Tested versions

Reproducible in v4.4.dev3.official [f4af8201b] Reproducible in v4.4.dev3.mono.official [f4af8201b] Not reproducible in v4.3.stable.official [77dcf97d8]

System information

Godot v4.4.dev3.mono - Ubuntu 24.04.1 LTS 24.04 on Wayland - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) UHD Graphics 630 (CFL GT2) - Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 threads)

Issue description

Godot Git Plugin 3.1.1 https://github.com/godotengine/godot-git-plugin/commit/f6002fab42f904e6799c1574d04b7a9f825db49c

When I launch the Godot Editor, the Godot Git Plugin is not connected (Commit tab not present in right-hand-side dock), and I have to connect it with:

Project / Version Control / Version Control Settings... / Connect to VCS / On

Then the plugin works normally.

This is the content of the Output pane when the editor is launched:

Godot Engine v4.4.dev3.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started on port 6006 ---
--- GDScript language server started on port 6005 ---
  Cannot get class 'GitPlugin'.
  Received a nullptr VCS extension instance during construction.
export_plugin.gd/_enter_tree(), version='2024-10-29 10:51:10 -0400'

The project uses only GDScript. I'm using the mono edition only because I wanted to experiment with using C# in Godot. I could try the regular non-mono edition if you think that would be helpful in isolating the issue.

Steps to reproduce

(See above)

Minimal reproduction project (MRP)

I will attempt to provide an MRP if others cannot reproduce this issue.

AThousandShips commented 3 days ago

To clarify, you need to reactivate this every time you open the editor? Not just the first time in each project?

daveTheOldCoder commented 3 days ago

Yes, I need to do it every time I open the editor.

Update (see below): It happens every second time I open the editor.

daveTheOldCoder commented 3 days ago

The project for which I have this issue is a large one imported from Godot 4.3-stable.

I just tried to reproduce the issue with a trivial new project. The problem does not occur. Maybe there's some bad data or setting in the other project.

I'll close this issue.

daveTheOldCoder commented 3 days ago

I'm reopening this issue because I've reproduced the problem with the trivial project I mentioned above.

The problem appears to occur in alternate openings of the editor. In any case, it occurs intermittently.

If I run the project manager from the command line with the -d and -v options, this is output when the plugin is detected:

Found a repository at /home/dave/Documents/Godot/Projects/4.4/4.4-mono-test1/.git/.
Selected repository path: /home/dave/Documents/Godot/Projects/4.4/4.4-mono-test1/.git/.

and this is output when it fails:

ERROR: Cannot get class 'GitPlugin'.
   at: _instantiate_internal (core/object/class_db.cpp:550)
ERROR: Received a nullptr VCS extension instance during construction.
   at: _load_plugin (editor/plugins/version_control_editor_plugin.cpp:149)

I'm attaching the MRP. I omitted the .git, .godot and addons/godot-git-plugin directories from the .zip.

To reproduce:

  1. Create the project directory with the .zip contents.
  2. Use the git init command to set up git for the directory.
  3. Import the project with the Godot 4.4-dev3-mono project manager.
  4. Add Godot Git Plugin 3.1.1. https://github.com/godotengine/godot-git-plugin/releases/tag/v3.1.1
  5. Try opening the project in the editor and observe whether the Commit tab is present, and whether there are errors in the Output pane. Repeat this several times.

4.4-mono-test1.zip

daveTheOldCoder commented 3 days ago

The same problem occurs in the non-mono edition.