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.
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
- GameObjects with a material derived from a Custom Lighting Surface Shader are displayed as skewed on quads when the Camera's Width and Height properties of the Viewport Rect are lower than 1
- Warning 'Unable to find player assmebly' is thrown when building some Project Templates
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
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.