Skip to content

Fix Analyze error handling to properly record failure to load #48

@SkowronskiAndrew

Description

@SkowronskiAndrew

The reporting of "successfully processed files" is complete wishful thinking.

For example when trying to "analyze" a player build without typetrees I got the following conclusion line:

Finalizing database. Successfully processed files: 6, Failed files: 0, Ignored files: 0

But looking a the more complete log its apparent that nothing got imported!

This ticket is to revisit the error handling and make sure that if we cannot open the serialized file this is treated as a failure.

Full log:

>UnityDataTool analyze . -o out.db
Invalid serialized file version. File: "C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\level0". Expected version: 6000.3.0b6. Actual version: 6000.0.65f1.
Unknown error occurred while loading 'C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\level0'.

Error processing file: C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\level0
System.Exception: Unknown error.
Processing 16% (1/6) level0Invalid serialized file version. File: "C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\level1". Expected version: 6000.3.0b6. Actual version: 6000.0.65f1.
Unknown error occurred while loading 'C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\level1'.

Error processing file: C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\level1
System.Exception: Unknown error.
Processing 33% (2/6) level1
Error processing file: C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\out.db
System.IO.IOException: The process cannot access the file 'C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\out.db' because it is being used by another process.
Processing 50% (3/6) out.dbFailed to load 'C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\README.md'. File may be corrupted or was serialized with a newer version of Unity.

Processing 66% (4/6) README.mdInvalid serialized file version. File: "C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\sharedassets0.assets". Expected version: 6000.3.0b6. Actual version: 6000.0.65f1.
Unknown error occurred while loading 'C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\sharedassets0.assets'.

Error processing file: C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\sharedassets0.assets
System.Exception: Unknown error.
Processing 83% (5/6) sharedassets0.assetsInvalid serialized file version. File: "C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\sharedassets1.assets". Expected version: 6000.3.0b6. Actual version: 6000.0.65f1.
Unknown error occurred while loading 'C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\sharedassets1.assets'.

Error processing file: C:\UnitySrc\UnityDataTools\TestCommon\Data\PlayerNoTypeTree\sharedassets1.assets
System.Exception: Unknown error.
Processing 100% (6/6) sharedassets1.assets
Finalizing database. Successfully processed files: 6, Failed files: 0, Ignored files: 0

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