Skip to content

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

@bdovaz

Description

@bdovaz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions