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
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- Module installation fails with "Download failed: Validation Failed" errors when using beta.2 Hub version
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Shader Graph Category dropdown cannot be expanded/collapsed when clicking on the text
- Different text alignment in the column header in Entities "System" window
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.