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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

the file 'c:/Test/Test_Data/Level0' is corrupted! Remove it and launch Unity again!

Discussion in 'Editor & General Support' started by RPKMN1, Jun 6, 2017.

  1. RPKMN1

    RPKMN1

    Joined:
    Feb 13, 2017
    Posts:
    34
    I've been plugging away for a couple of months on a test UI for the backend DLL i'm working on for an RPG rules engine. Tonight, I tried to do a stand-alone build so I could send it off to some testers.

    I did my build and fired it up, only to be greeted by the message "The File 'C:/test/test_Data/level3' is corrupted! Remove it and launch unity again! [Position is out of bounds!]

    I'm not getting any unhandled exceptions when i run it through the unity IDE. None of the searches I did yielded anything helpful. the game doesn't crash, but i start getting all kinds of object reference not set to an instance of an object errors and i suspect it's not able to access objects that should be part of a singleton in my rules engine DLL.

    I'm using 5.6.1f1
     
  2. RPKMN1

    RPKMN1

    Joined:
    Feb 13, 2017
    Posts:
    34
    I pulled this out of the log file

    The file 'C:/test/test_Data/level6' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]

    (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 220)
    Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
    UnloadTime: 1.679840 ms
    System memory in use before: 22.2 MB.
    System memory in use after: 22.1 MB.

    Unloading 5 unused Assets to reduce memory usage. Loaded Objects now: 1680.
    Total: 1.085573 ms (FindLiveObjects: 0.061317 ms CreateObjectMapping: 0.027848 ms MarkObjects: 0.982866 ms DeleteObjects: 0.013029 ms)

    NullReferenceException: Object reference not set to an instance of an object
    at SkillsCombat.Start () [0x000f2] in C:\TFS\VsProjects\GameEngine\UnityProject\Assets\Scripts\UIScripts\SkillsCombat.cs:83

    skillsCombat is a script in my unity project that is attempting to access the singleton in my DLL
     
  3. RPKMN1

    RPKMN1

    Joined:
    Feb 13, 2017
    Posts:
    34
    well, after tinkering and tinkering... as near as I can tell, i had an inactive object which had a reference to a script I had removed from my project a while back. removed the inactive game object entirely and I seem to be in business now.
     
    junaid109 likes this.
  4. junaid109

    junaid109

    Joined:
    Mar 3, 2013
    Posts:
    10
    I have experienced this exact same bug in Unity 2018.3.0f2. However, in my case, I had to change the stereo rendering mode and the scripting runtime version from .Net 3.5 to .Net 4.X.
     
  5. OlivierMorland

    OlivierMorland

    Joined:
    Sep 24, 2021
    Posts:
    8
    I found that if I created a new blank scene the build would work. So I copied the contents of my scene that was causing the level0 corrupted problem and pasted its contents into my new blank scene. It worked fine after that.
     
  6. Tanoshimi2000

    Tanoshimi2000

    Joined:
    Feb 10, 2014
    Posts:
    46
    I'm running 2022.3.5.f1 and getting the same error
    "WindowsPlayer "MAIN" The file '...Data/level0' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]
    "
    I've even tried moving everything into a blank scene.

    Any other suggestions? Why is Unity Compiler building a bad file?

    If I delete the Level0 file, the program runs, but nothing happens.