u3d
u3d copied to clipboard
Crash in Unity's version detection logic in 2019.4.1f
Issue Checklist
- [x] I'm using the latest u3d version
- [x] I ran
u3d --help
- [x] I read the README
- [x] I made sure that a similar issue doesn't exit
Issue Description
Stacktrace:
C:\WINDOWS\system32>u3d install 2019.4.1f1 -p Unity,Android,Android-sdk-ndk-tools,Android-sdk-platform-tools,Android-sdk-build-tools,Android-sdk-platforms,Android-open-jdk,Android-ndk --installation_path "D:\Unity_2019.4.1f1"C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/installation.rb:350: warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead
Traceback (most recent call last):
19: from C:/tools/ruby27/bin/u3d:23:in `<main>'
18: from C:/tools/ruby27/bin/u3d:23:in `load'
17: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/exe/u3d:7:in `<top (required)>'
16: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands_generator.rb:41:in `start'
15: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands_generator.rb:263:in `run'
14: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/commander-4.5.0/lib/commander/delegates.rb:15:in `run!'
13: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/commander-4.5.0/lib/commander/runner.rb:71:in `run!'
12: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/commander-4.5.0/lib/commander/runner.rb:446:in `run_active_command'
11: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/commander-4.5.0/lib/commander/command.rb:153:in `run'
10: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/commander-4.5.0/lib/commander/command.rb:182:in `call'
9: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands_generator.rb:176:in `block (2 levels) in run'
8: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands.rb:154:in `install'
7: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands.rb:340:in `check_unity_presence'
6: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands.rb:340:in `find'
5: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands.rb:340:in `each'
4: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/commands.rb:340:in `block in check_unity_presence'
3: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/installation.rb:393:in `version'
2: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/installation.rb:330:in `version'
1: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/installation.rb:350:in `unity_version_info'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/u3d-1.2.3/lib/u3d/installation.rb:364:in `string_file_info': Exception (Exception)
Crash location:
https://github.com/DragonBox/u3d/blob/a46fc319139bd6ebe983b4e002bd3f22a85120cd/lib/u3d/installation.rb#L364
It seems that this confusing crash appears when there is an installation that is incomplete.
I'm saying this in case it happens to someone so they don't waste hours finding the cause of the problem like in our case.
This use case should be improved, thanks.