Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

DirectoryNotFoundException on startup

Discussion in 'Unity Analytics' started by smithmj5, Aug 10, 2015.

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    139
    I'm using Unity Analytics in my game Letter Quest Remastered that was released on Steam on August 5, 2015.

    There have been around 2400 players so far, and I've had 3 users encounter this crash, and I've seen it once myself. I'm not sure about the other users, but in my case, I definitely did not manually remove the directory in question.

    When I restarted the game, the error went away and Unity Analytics functioned normally. Is there any way to have this error treated as a warning instead, since having it crash the game on startup isn't ideal. :)

    Error Message:

    Code (CSharp):
    1. DirectoryNotFoundException: Directory 'C:\Users\Eacritchley\AppData\LocalLow\Bacon Bandit Games\Letter Quest Remastered\Unity\a6172682-4f62-4430-a007-e8fa05d185bd\Cloud\Analytics\1439154705166' not found.
    Stack trace from Unity Performance crash reporting:

    Code (CSharp):
    1. System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs)
    2. System.IO.Directory.GetFiles (System.String path, System.String searchPattern)
    3. System.IO.Directory.GetFiles (System.String path)
    4. UnityEngine.Cloud.Analytics.FileSystem.GetFiles (System.String path)
    5. UnityEngine.Cloud.Analytics.FileStore.DeleteAll ()
    6. UnityEngine.Cloud.Analytics.FileStore.Delete ()
    7. UnityEngine.Cloud.Analytics.ArchiveManager.GetFirstArchiveSession (IGameSessionInfo& gameSessionInfo)
    8. UnityEngine.Cloud.Analytics.EventManager.SetupDispatcherQueue ()
    9. UnityEngine.Cloud.Analytics.EventManager.OnDataBlockConsumed (Int32 numbOfEvents, Int32 numbOfHighPriority)
    10. UnityEngine.Cloud.Analytics.DataDispatcher.RestResultCallback (IWWW response)
    11. UnityEngine.Cloud.Analytics.Rest+<Execute>c__AnonStorey2.<>m__1 (IWWW www)
    12. UnityEngine.Cloud.Analytics.Rest+<Do>c__Iterator1.MoveNext ()
     
  2. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    139
    I've got one more crash that has come up a few times in the last day, this time it's an UnauthorizedAccessException:

    Error Message:

    Code (CSharp):
    1. UnauthorizedAccessException: Access to the path "C:\Users\Marko\AppData\LocalLow\Bacon Bandit Games\Letter Quest Remastered\Unity\a6172682-4f62-4430-a007-e8fa05d185bd\Cloud\Analytics\1439314082510" is denied.
    Stack trace from Unity Performance crash reporting:

    Code (CSharp):
    1.  
    2. System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs)
    3. System.IO.Directory.GetFiles (System.String path, System.String searchPattern)
    4. System.IO.Directory.GetFiles (System.String path)
    5. UnityEngine.Cloud.Analytics.FileSystem.GetFiles (System.String path)
    6. UnityEngine.Cloud.Analytics.FileStore.DeleteAll ()
    7. UnityEngine.Cloud.Analytics.FileStore.Delete ()
    8. UnityEngine.Cloud.Analytics.ArchiveManager.GetFirstArchiveSession (IGameSessionInfo& gameSessionInfo)
    9. UnityEngine.Cloud.Analytics.EventManager.SetupDispatcherQueue ()
    10. UnityEngine.Cloud.Analytics.EventManager.OnDataBlockConsumed (Int32 numbOfEvents, Int32 numbOfHighPriority)
    11. UnityEngine.Cloud.Analytics.DataDispatcher.RestResultCallback (IWWW response)
    12. UnityEngine.Cloud.Analytics.Rest+<Execute>c__AnonStorey2.<>m__1 (IWWW www)
    13. UnityEngine.Cloud.Analytics.Rest+<Do>c__Iterator1.MoveNext ()
    Unfortunately I can't look into the code since it's all in DLLs, so I can't figure out how to fix the issues. In the meantime, I've just added extra checks to my error handling to ignore these specific errors, and everything seems okay (doesn't cause further crashes).
     
  3. mpinol

    mpinol

    Unity Technologies

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hey there,

    I believe we have found the issue and are currently working on a fix. I will make another post containing the details when we have any more information.