Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[Error] The file 'level2' is corrupted! Remove it and launch unity again! [Position out of bounds!]

Discussion in 'Unity 5 Pre-order Beta' started by any_user, Oct 27, 2014.

  1. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I get this error when running a development build, but not in a release build. Does a release build just not show the error or does it not happen there?

    [Error] The file 'level2' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]

    _JS_Log_Dump (webgl.js, line 10360)
    __Z40DebugStringToFilePostprocessedStacktracePKcS0_S0_iS0_iiiiPFvRK11CppLogEntryE (webgl.js, line 976612)
    __Z17DebugStringToFilePKciS0_iiiiPFvRK11CppLogEntryE (webgl.js, line 1458860)
    __ZN12CachedReader16OutOfBoundsErrorEjj (webgl.js, line 758188)
    __ZN12CachedReader15UpdateReadCacheEPvj (webgl.js, line 1173552)
    __ZN4PPtrI6ObjectE8TransferI18StreamedBinaryReadILb0EEEEvRT_ (webgl.js, line 1731663)
    __Z26Transfer_UnityEngineObjectI18StreamedBinaryReadILb0EELb0EEvRK29SerializationCommandArgumentsR31RuntimeSerializationCommandInfo (webgl.js, line 2258815)
    __Z23TransferScriptingObjectI18StreamedBinaryReadILb0EEEvRT_P15ScriptingObjectP14ScriptingClassPK15MonoScriptCache (webgl.js, line 1264728)
    __ZN13MonoBehaviour25TransferEngineAndInstanceI18StreamedBinaryReadILb0EEEEvRT_ (webgl.js, line 2150593)
    __ZN13MonoBehaviour23VirtualRedirectTransferER18StreamedBinaryReadILb0EE (webgl.js, line 2711334)
    __ZN14SerializedFile10ReadObjectEx18ObjectCreationModebPPK8TypeTreePbR6Object (webgl.js, line 788340)
    __ZN17PersistentManager26LoadFileCompletelyThreadedERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPxPiibR12LoadProgress (webgl.js, line 511572)
    __ZN18LoadLevelOperation7PerformEv (webgl.js, line 361759)
    __ZN14PreloadManager26UpdatePreloadingSingleStepEb (webgl.js, line 1608922)
    __ZN14PreloadManager35WaitForAllAsyncOperationsToCompleteEv (webgl.js, line 2686952)
    __Z20PlayerLoadFirstLevelv (webgl.js, line 1454062)
    _main (webgl.js, line 748014)
    (anonymous function) (webgl.js, line 2813807)
    callMain (webgl.js, line 2815659)
    doRun (webgl.js, line 2815695)
    (anonymous function) (webgl.js, line 2815705)
     
  2. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I had this happen to my assetdatabase file in the editor which required an hour worth of importing again. Dunno what it is about.
     
  3. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    In my case it is because i have script connecting to each other and i don't know a solution unless i want to remove every connections :(
     
  4. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    I have found a solution to my problem at least..
    if i make a direct link ("public myScript myScriptedObject;") then it gives me that error that this thread is all about :p
    But however if i do something like this:

    public GameObject myScriptedObject;
    private myScript myPrivateObject;
    void Start ()
    {
    myPrivateObject = myScriptedObject.GetComponent<myScript>();
    }

    then i can actually make the call without also calling that error!
    I Hope this helps other in here :)
    Cheers ;)
     
  5. JasonBricco

    JasonBricco

    Joined:
    Jul 15, 2013
    Posts:
    956
    Hope this bug gets fixed soon, having the same problem. Is it generally an issue with passing references of scripts in through the inspector? I suppose I can look around at what might be causing that.
     
  6. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    You can reference gameobjects in monodevelop but other script references needs to be made with getcomponent that is not a bug it is a feature to make c# scripts look more like c# (that is what i understood on this :p) but it's a new feature!

    Edit! I meant you can reference gameobjects in monodevelop normally!
     
  7. JasonBricco

    JasonBricco

    Joined:
    Jul 15, 2013
    Posts:
    956
    I'm confused, then. In my case, the problem is happening on my loader scene. The loader scene only has one script in it that gets carried on to the scenes that come after. The error relates to that script in some way, but there are no inspector references in it. And there aren't references to any other scripts in it.
     
  8. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    Then you should definitely report it as a bug to unity :) they can help bbetter than i can ;)
     
  9. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    Interesting – In my case it was also happening in an almost empty loader scene (one gamebject with script + camera). My fix was to remove the scene, because I didn't need it anymore anyway. And now I can't reproduce the problem anymore.
     
  10. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    What i used to do (i write it here for others to see if it can help them :)) was reference GameObjects via the scripts they had attached like :

    public firstScript myFirstScript;

    and in the Unity Inspector i would assign the GameObject that was relevant / has that "firstScript" script attached,
    but now with the new C# scripting that is no longer possible for me (i now have to use this code instead) :

    public / private firstScript myFirstScript;

    void Awake / Start ()
    {
    myFirstScript = GameObject.Find("myFirstObject").GetComponent<firstScript>();
    }

    i have the choices of using either public or private statement (don't know what it is truly called :)) and i can then use either the Awake or Start function to assign the script to the "myFirstScript", i have tried to be as clear as i can, but i hope you get the picture :) i have a hard time making myself clear so i hope you understand what i mean :)

    I have been able to figure out that if i have "public GameObject myFirstObject;" and in the inspector in Unity, i can then assign a gameObject to that variable but only if i do not change the variable to something like (from: GameObject, to: firstScript!!!) but all the time have the GameObject variable assigned, but i can however assign the myFirstObject like:

    public GameObject myFirstObject;

    void Awake / Start ()
    {
    myFirstObject.GetComponent<myFirstScript>();
    }

    This have been working for me quite well in Unity 5, so i hope you guys can get your games up and running in Unity5 fast :)

    Cheers,
    David.