git-learning-game / oh-my-git

An interactive Git learning game!
https://ohmygit.org
Other
1.98k stars 143 forks source link

Crash when switching to "Your first commit" on Git 2.17.1 #25

Open oliver opened 3 years ago

oliver commented 3 years ago

After finishing the level "The command line" and clicking "Next level", the game crashed. Here's the terminal output (running with LANG= ./oh-my-git to get English error messages):

$ LANG= ./oh-my-git
Godot Engine v3.2.3.stable.official - https://godotengine.org
WARNING: initialize: XOpenIM failed
   At: platform/x11/os_x11.cpp:195.
WARNING: initialize: XCreateIC couldn't create xic
   At: platform/x11/os_x11.cpp:497.
OpenGL ES 3.0 Renderer: GeForce 8300/integrated/SSE2

ERROR: get_language_code: Condition "p_locale.length() < 2" is true. Returned: p_locale
   At: core/translation.cpp:945.
ERROR: set_locale: Unsupported locale '', falling back to 'en'.
   At: core/translation.cpp:969.
ERROR: call: OS.execute failed: bash [-c, "'export HOME='"'"'/home/oliver/.local/share/Oh My Git/tmp/'"'"';export PATH='"'"'/home/oliver/.local/share/Oh My Git/tmp/:'"'"'"$PATH";cd '"'"'/home/oliver/.local/share/Oh My Git/tmp/repos/yours/'"'"' || exit 1;git log --graph --oneline --all --no-abbrev'"] Output: fatal: your current branch 'main' does not have any commits yet

Exit Code 128
   At: modules/gdscript/gdscript_functions.cpp:803.
FATAL ERROR: OS.execute failed: bash [-c, "'export HOME='"'"'/home/oliver/.local/share/Oh My Git/tmp/'"'"';export PATH='"'"'/home/oliver/.local/share/Oh My Git/tmp/:'"'"'"$PATH";cd '"'"'/home/oliver/.local/share/Oh My Git/tmp/repos/yours/'"'"' || exit 1;git log --graph --oneline --all --no-abbrev'"] Output: fatal: your current branch 'main' does not have any commits yet

Exit Code 128
WARNING: cleanup: ObjectDB instances leaked at exit (run with --verbose for details).
   At: core/object.cpp:2135.
ERROR: clear: Resources still in use at exit (run with --verbose for details).
   At: core/resource.cpp:477.
ERROR: cleanup: Condition "allocs_used > 0" is true.
   At: core/pool_vector.cpp:69.

This crash happens on Ubuntu 16.04, with Git 2.7.4. It does not happen on Ubuntu 18.04, with Git 2.17.1.
According to https://blinry.itch.io/oh-my-git where I downloaded the game, this should be OMG 0.6.0.

When I go into /home/oliver/.local/share/Oh My Git/tmp/repos/yours/ on Ubuntu 16.04 and run git log --graph --oneline --all --no-abbrev, I get that same error message, and the command exits with code 128.
On Ubuntu 18.04 the same command works fine, however. I guess the behavior of git log --all has changed between these two Git versions.

Btw. in my opinion it's OK if such old Git versions are not supported any more.

blinry commented 3 years ago

Thanks for reporting! We'd have to check what exactly causes this behavior, but yeah, probably the older Git version isn't happy with us renaming the default branch to main or something. Maybe we can fix this – but I agree, the other option would be to point out to the player that they should please update their Git/their OS. :P In any case, this is super helpful!

sympodius commented 3 years ago

I get the same issue with git version 2.11.0