Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in Unity's version detection logic in 2019.4.1f #406

Open
4 tasks done
bdovaz opened this issue Jul 28, 2020 · 1 comment
Open
4 tasks done

Crash in Unity's version detection logic in 2019.4.1f #406

bdovaz opened this issue Jul 28, 2020 · 1 comment

Comments

@bdovaz
Copy link

bdovaz commented Jul 28, 2020

Issue Checklist

  • I'm using the latest u3d version
  • I ran u3d --help
  • I read the README
  • 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:

raise Exception if version_size.zero? # TODO: use GetLastError

@bdovaz
Copy link
Author

bdovaz commented Aug 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant