I’ve run into bit of strange issue, that doesn’t give me that much of useful detail, but seems more like it has something to do with integration test runner itself.
When running integration test in on scene, I get following error
MissingReferenceException: The object of type ‘Sprite’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Sprite.get_border () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/SpritesBindings.gen.cs:210)
UnityEngine.UI.Image.get_hasBorder () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Image.cs:163)
UnityEngine.UI.Image.GenerateSlicedSprite (UnityEngine.UI.VertexHelper toFill) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Image.cs:360)
UnityEngine.UI.Image.OnPopulateMesh (UnityEngine.UI.VertexHelper toFill) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Image.cs:297)
UnityEngine.UI.Graphic.DoMeshGeneration () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:380)
UnityEngine.UI.Graphic.UpdateGeometry () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:374)
UnityEngine.UI.Graphic.Rebuild (UnityEngine.UI.CanvasUpdate update) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:335)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:150)
UnityEngine.Canvas:SendWillRenderCanvases()
That comes immediately at the start and keeps on coming continuously until the test runner decides that test has failed.
The scene runs all nicely and without any errors if I run it just clicking play and playing around. Also, with exactly same version of source code and others, I managed to run the same test yesterday without any errors (even though it was already giving same failure to our other programmer back then already).
Anyone else has run into same issue or could give me some insights where I should dig more deep, as the stack trace does not give real indication that it would be some specific thing in our code itself?
Unity version is 2017.1.1p2