Search Issue Tracker
Not Reproducible
Votes
1
Found in
2017.2.0f2
Issue ID
957140
Regression
Yes
NullReferenceException using ModelImporter when restoring from collaborate
To reproduce:
1. Open users attached project "AssetImporterNull.zip"
2. Enable collaborate and push to the cloud
3. Delete Models > basicobj.fbx
4. Open Window > Collab History
5. Restore the newest commit
Expected result: debug logs in the console showing that the asset import was successful
Actual result: NullReferenceException: Object reference not set to an instance of an object
Reproduced on: 2017.2.0f2 2017.2.0f3 2017.3.0b3 2018.1.0a1
Not reproduced on: 5.6.4f1 2017.1.1p4 2017.2.0a1 2017.2.0a4
Regression introduced in: 2017.2.0b1
Notes: could not reproduce this on my machine, windows version - 1703(OS Build 15063.608)
Was able to reproduce on another machines with the same windows version.
Also, visual c++ 2017 is installed.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Invertex
Nov 16, 2017 13:29
Also, doesn't just happen on Restoring from Collab. It happens when you Pull new content from the Collab as well, which puts anyone using Collab and AssterPosprocessor scripts in a very difficult situation right now.
Temporary sort-of workaround for now is to do:
if(assetImporter == null || assetImporter == prevAssetImporter))
{
AssetDatabase.Refresh();
return;
}
(preferably use a "!ifRefreshed" bool there as well to prevent potential endless loops). After these two conditions aren't met anymore, you assign the current assetImporter to that custom public static AssetImporter "prevAssetImporter" variable and isRefreshed back to false..
This will increase imports times a bit, but better than nothing for now.