Search Unity

NetworkInformationException: The pipe is being closed.

Discussion in 'Scripting' started by Strategos, Jul 28, 2015.

  1. Strategos

    Strategos

    Joined:
    Aug 24, 2012
    Posts:
    255
    I have some code which has just stopped working and I cannot for the life of me work out why.

    Perhaps someone here can cast some light on this.

    I am loading a local image using a WWW call like this


    Code (CSharp):
    1.     IEnumerator LoadCachedImage( )
    2.     {
    3.         WWW uImage;
    4.  
    5.         uImage = new WWW("file:///" + Application.temporaryCachePath + "/" + Id + ".png");
    6.  
    7.         yield return uImage;
    8.  
    9.         if (uImage.error != null)
    10.             Debug.Log("image error = " + uImage.error);
    11.         else
    12.         {
    13.             Image.GetComponent<UITexture>().mainTexture = uImage.texture;
    14.         }
    15.  
    16.  
    17.     }

    Now this used to work fine but it now never gets passed the yield.

    Instead it kicks out the following error

    NetworkInformationException: The pipe is being closed.

    Code (CSharp):
    1. NetworkInformationException: The pipe is being closed.
    2.  
    3. System.Net.NetworkInformation.Win32NetworkInterface2.GetAdaptersInfo ()
    4. System.Net.NetworkInformation.Win32NetworkInterface2.GetAdapterInfoByIndex (Int32 index)
    5. System.Net.NetworkInformation.Win32IPInterfaceProperties2.get_UnicastAddresses ()
    6. SyntaxTree.VisualStudio.Unity.Messaging.Platform.<IPAddresses>b__1 (System.Net.NetworkInformation.NetworkInterface i)
    7. System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[System.Net.NetworkInformation.NetworkInterface,System.Net.NetworkInformation.UnicastIPAddressInformation].MoveNext ()
    8. System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.Net.NetworkInformation.UnicastIPAddressInformation].MoveNext ()
    9. System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.Net.NetworkInformation.UnicastIPAddressInformation].MoveNext ()
    10. System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[System.Net.NetworkInformation.UnicastIPAddressInformation,System.Net.IPAddress].MoveNext ()
    11. System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.Net.IPAddress].MoveNext ()
    12. System.Collections.Generic.List`1[System.Net.IPAddress].AddEnumerable (IEnumerable`1 enumerable) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
    13. System.Collections.Generic.List`1[System.Net.IPAddress]..ctor (IEnumerable`1 collection) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
    14. System.Linq.Enumerable.ToArray[IPAddress] (IEnumerable`1 source)
    15. SyntaxTree.VisualStudio.Unity.Messaging.Platform.IPAddresses ()
    16. SyntaxTree.VisualStudio.Unity.Bridge.Announcer.<.ctor>b__2 ()
    17. SyntaxTree.VisualStudio.Unity.Bridge.Project+<>c__DisplayClass3.<RunOnceOnUpdate>b__2 ()
    18. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:264)