godot: Editor fails to launch on Linux without any error when project is on a path with `\x20`
Godot version
v4.1.1.stable.official [bd6af8e0e]
System information
Linux 6.4.8-247.current
Issue description
The editor fails to open projects.
- New projects and demo projects behave the same.
- Identical behaviour with Godot
v3.5.2.stable.official [170ba337a]
.
So I assume there is some missing library or something on my system. But there is no info on the commandline and no error messages or feedback. Just silently takes me back to the Project Manager window.
I ran Delta V: Rings of Saturn to confirm that a built Godot game would work, and it ran just fine. As do non-Godot games from Stellaris for Linux from GoG to Deep Rock Galactic running on Proton.
Very perplexing.
Steps to reproduce
- Run Godot
- Create a new project
- Click on project to highlight it
- Click Edit button
Expected
Godot editor launches.
Actual
Godot logo displays briefly before returning to the Project Manager.
Minimal reproduction project
Empty projected I tested with: Aleph.zip
Also tried a demo project from the asset list and got the same result.
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 18 (9 by maintainers)
We could change the
replace("\\", "/")
to run it only on Windows, but this might have other unwanted consequences. Needs thorough testing.I think you’re onto something.
I’ve tried many other locations and other names. In my home folder it works with spaces or periods - so it isn’t the dots. It also works on my external drive - so it isn’t because it is across some odd filesystem boundary.
But the editor will not work on my secondary internal drive no matter where it is.
And after making many different projects and trying things out I think I know why:
/media/data.secondary
/mnt
(for historical reasons)\x20
Godot’s Project Manager can access the symlink, but I tried to brown to the path with the backslash in it, and it refuses to open the path at all. I can select it, but then the Godot Project Manager reports that the path specified doesn’t exist.
You’ll also note that it shows a forward slash instead of the backslash that it should.
Nemo, my file manager, displays the disk label in the breadcrumbs, but the backslashed version generated by the mounting configuration in the folder itself.
So I think that the editor is trying to resolve symlinks, hits that backslash and decides that it has seen enough and exits.
Incidentally, Godot does not crash or report any errors to the console when it is unable to open that weird path in the project browser.
I haven’t run into any other programs that have issues with it, but I can kinda understand why a program might. I can do a workaround to rename the mount path, and since I luckily used a symlink for everything, very few things should break so long as I update the
/media/data.secondary
link. I’ll try that out shortly.Looks like that incantation is used all over the place. I might suggest a single
Path
object which can handle paths instead of disconnected bespoke string operations.There is a single file (but not exactly tiny) library called
cwalk
for C/C++ which could be handy if you don’t want to write your own. It is also MIT licensed like Godot.I’ve written my own Path libraries in a couple of languages, but not C++. I could give it a shot if you’re interested.
Can confirm:
Now works!
So it had to do with the backslash in the symlink path.
It immediately drops me into the Project Manager whether I run it from
gdb
or not.Because it immediately kicks over the Project Manager I don’t think that a trace will be very useful but here is the
bt
command after I halted it:Is there a good place in the editor code where I could drop a breakpoint or something?
This is X11 with Budgie.
Trying to open a project from the commandline doesn’t seem to dump anything interesting either.
Godot was downloaded from the official website and moved to a writable subdirectory in
/opt
.