Skip to content

Dragging unity from 1 screen to another with different DPI causes training to crash #2748

@devedse

Description

@devedse

Describe the bug
When I have 2 monitors connected to my laptop and drag unity from my 200% DPI screen to my 100% DPI screen Unity takes a while to resize and then shows an exception. The agents also stop moving after this.

To Reproduce

  1. Start training on one of the scenes using for example:
    mlagents-learn config/trainer_config.yaml --run-id=hide_8 --train
  2. Once training, drag Unity to your other DPI screen
  3. Watch the Errors

Console logs / stack traces

442+ times:

NullReferenceException: Object reference not set to an instance of an object
MLAgents.Academy.EnvironmentStep () (at Assets/ML-Agents/Scripts/Academy.cs:522)
MLAgents.Academy.FixedUpdate () (at Assets/ML-Agents/Scripts/Academy.cs:583)

and
1 time:

NullReferenceException: Object reference not set to an instance of an object
MLAgents.Academy.OnDestroy () (at Assets/ML-Agents/Scripts/Academy.cs:596)

Screenshots
image

Environment (please complete the following information):

  • OS + version: Windows 10
  • ML-Agents version: Latest develop branch
  • Environment: Reproducable in all samples
  • Unity version: 2019.1.14f1

Metadata

Metadata

Assignees

Labels

bugIssue describes a potential bug in ml-agents.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions