eumario / godot-manager

A Project, Version and Addons/Plugins manager for Godot Game Engine.
MIT License
332 stars 19 forks source link

Crash when sorting by Godot version in project tab #79

Closed RobProductions closed 6 months ago

RobProductions commented 8 months ago

I have one "custom" Godot version added in the installs which is a manual download of 4.1:

image

I set my project directory and hit the "scan" button and it found my 3 projects, one of which uses that custom Godot and the other two use a compiled Godot that I have not added to the manager:

image

But when I click "Godot version" to sort the list it causes a crash.

I'm using Windows 10, Ryzen 5 CPU, and a GTX 1060 with an HDD. The projects and the custom install were both on my G: drive which is not the drive that stores the OS.

Possibly relevant info: when I click edit on the FirstTestProject it correctly assumes the custom Godot I added is the one to use, however it still says "Unknown" in the list view

image

eumario commented 8 months ago

So, this problem is 3 fold, which actually one is just a technicality.

Currently, you have no Default Engine selected in the Settings Panel, so when you imported new projects, they weren't setup with a Default Engine, hence why they all say Unknown.

The second problem, is that it looks as though it is associated with your Custom imported version of Godot, it actually isn't, cause what Godot Manager does in the background to prevent another bug from cropping up, is that when you edit the project settings for a Godot Project, if no engine is associated, or the engine that was associated with the project is removed, it defaults to the first available project, hence why it looks like it is Associated with your Custom version of Godot, but actually isn't.

If you were to actually Edit the project, and Type some stuff into the Description, and hit Save, it would actually associate the project with your only version of Godot Installed.

Which leads to the second problem, that it should allow you to save the project when no-engine is associated, but we have one available to associate with it, which is why I suggested typing something in the description, to denote a change has been made, and clicking save, to associate your Custom Engine with the project.

And that leads to the Third problem. While downloaded versions of Godot are automatically setup as the default engine, when none exist, Imported versions of Godot are not automatically setup as the default engine, when none exist. I will see if I can get a patch for this in. This behavior will definitely be fixed in 0.3.0, as it's a complete re-write of the system, and I'm working to finish up the port to get everything back to current levels, and working properly.

TL;DR of it all. Current Fix: Right click on the project, edit the project, type stuff into Description to make Godot Manager a chance has been made, click save, and it will associate it with your current Imported version of Godot.

RobProductions commented 8 months ago

Thanks for the detailed info! I tried your suggestion but unfortunately did not work, here's the test description I added:

image

And I selected the Godot version and hit save, and yet I get the same screen in the project tab showing all "Unknown" versions. It also still crashes when I hit the sort by version button.

As for what you mentioned about how I got into this situation, those are definitely issues that if resolved would make things go smoother and would love to see them implemented! But do you mean to say that all projects in the tab are expected to be associated with a Godot version and that's why it crashes? Wouldn't it make more sense to just allow projects to have null/undefined Godot versions and to sort them at the bottom of the list when you click that button?

Apologies for my ignorance as I've got no idea how the code works under the hood but this might help to both eliminate the crash (which arguably is most important here) and support extra use cases as users may not care about some projects, i.e. the ones I mentioned that are from a compiled Godot which I don't want to add to the manager. For another example, what happens if I remove a Godot install from the manager? Do the projects get into this same state? Not sure what you've got planned for 0.3.0 but this seems like it could be useful to note.