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

Remove UnitySDK.log file #2580

Merged
merged 2 commits into from
Sep 19, 2019
Merged

Remove UnitySDK.log file #2580

merged 2 commits into from
Sep 19, 2019

Conversation

andrewcoh
Copy link
Contributor

@andrewcoh andrewcoh commented Sep 17, 2019

This change removes the feature that Academy.cs creates and writes to UnitySDK.log in the directory of the build. UnitySDK.log is a bit redundant given the player log and as written it's logging of "System.DateTime.Now" was causing the following warning and exception with newer versions of Unity.

Warning
Plugins: Couldn't open libc, error: dlopen(libc, 2): image not found

Exception
ObjectDisposedException: Cannot write to a closed TextWriter.
System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) (at <b35a51e37b9044f3a540f83fa39a96e3>:0)
System.IO.StreamWriter.Write (System.Char[] buffer, System.Int32 index, System.Int32 count) (at <b35a51e37b9044f3a540f83fa39a96e3>:0)
System.IO.TextWriter.WriteLine (System.String value) (at <b35a51e37b9044f3a540f83fa39a96e3>:0)
MLAgents.Academy.InitializeEnvironment () (at <31b28fc73f93469aa66b0663de536fb0>:0)
MLAgents.Academy.Awake () (at <31b28fc73f93469aa66b0663de536fb0>:0)

This change also modifies the UnityTimeOutException class to simply pass the exception message through to Exception (as most of the other exceptions do) and no longer read from UnitySDK.log.

@andrewcoh andrewcoh closed this Sep 17, 2019
@andrewcoh andrewcoh reopened this Sep 17, 2019
Copy link
Contributor

@vincentpierre vincentpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve : 🚢🇮🇹
Are you sure the UnitySDK.log file is not referenced anywhere in the documentation? If it is, you should change the document in this PR.

@andrewcoh andrewcoh merged commit 88caccf into develop Sep 19, 2019
@andrewcoh andrewcoh deleted the develop-removeUnitySDKlog branch September 19, 2019 00:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants