1. This forum is archived for reference. For support & bug reports visit the help section of forums.stardewvalley.net

Bug/Issue Help me! Stardew valley crash due to the missing Texture2D file:(

Discussion in 'Support' started by yian2922, Mar 8, 2017.

  1. yian2922

    yian2922 Orbital Explorer

    So recently I had change my Dot net and try the feminine mode for the male bachelors, this is what I found in the Error logs:

    Code:
    Message: Cannot access a disposed object.
    Object name: 'Texture2D'.
    InnerException:
    Stack Trace:  at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr)
      at Microsoft.Xna.Framework.Graphics.Texture2D.CopyData[T](Int32 level, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount, UInt32 options, Boolean isSetting)
      at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](T[] data)
      at StardewValley.FarmerRenderer.changeShirt(Int32 whichShirt)
      at StardewValley.Farmer.changeShirt(Int32 whichShirt)
      at StardewValley.Game1.resetPlayer()
      at StardewValley.Game1.LoadContent()
      at Microsoft.Xna.Framework.Game.DeviceCreated(Object sender, EventArgs e)
      at Microsoft.Xna.Framework.GraphicsDeviceManager.OnDeviceCreated(Object sender, EventArgs args)
      at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation newInfo)
      at Microsoft.Xna.Framework.GraphicsDeviceManager.ChangeDevice(Boolean forceCreate)
      at Microsoft.Xna.Framework.GraphicsDeviceManager.ToggleFullScreen()
      at StardewValley.Game1.toggleNonBorderlessWindowedFullscreen(Int32 width, Int32 height)
      at StardewValley.Game1.toggleFullscreen()
      at StardewValley.Game1.checkForEscapeKeys()
      at StardewValley.Game1.Update(GameTime gameTime)
      at Microsoft.Xna.Framework.Game.Tick()
      at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
      at Microsoft.Xna.Framework.GameHost.OnIdle()
      at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
      at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
      at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
      at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.Run(Form mainForm)
      at Microsoft.Xna.Framework.WindowsGameHost.Run()
      at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
      at StardewValley.Program.Main(String[] args)
    
    and the file of SMAPI which also report the error here
    Code:
    [11:26:20 ERROR SMAPI] An error occured in the base update loop: System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.Xml.XmlException: Root element is missing.
      at System.Xml.XmlTextReaderImpl.Throw(Exception e)
      at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
      at System.Xml.XmlTextReaderImpl.Read()
      at System.Xml.XmlTextReader.Read()
      at System.Xml.XmlReader.MoveToContent()
      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderStartupPreferences.Read3_StartupPreferences()
      --- End of inner exception stack trace ---
      at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
      at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
      at StardewValley.StartupPreferences.loadPreferences() in C:\Users\tomc\Documents\Visual Studio 2010\Projects\Stardew.XNA\Farmer\Farmer\StartupPreferences.cs:line 86
      at StardewValley.Menus.TitleMenu..ctor() in C:\Users\tomc\Documents\Visual Studio 2010\Projects\Stardew.XNA\Farmer\Farmer\Menus\TitleMenu.cs:line 129
      at StardewValley.Game1.UpdateTitleScreen(GameTime time) in C:\Users\tomc\Documents\Visual Studio 2010\Projects\Stardew.XNA\Farmer\Farmer\Game1.cs:line 2227
      at StardewValley.Game1.Update(GameTime gameTime) in C:\Users\tomc\Documents\Visual Studio 2010\Projects\Stardew.XNA\Farmer\Farmer\Game1.cs:line 1612
      at StardewModdingAPI.Inheritance.SGame.Update(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Inheritance\SGame.cs:line 338
    
    This is on Window 8.1 64-bit

    I used 8 mods, but when I uninstall the game and delete the smapi mod in the roaming appdata and begin to install it again, run again and I continued to meet this error, this made me conclude the error doesn't related to the mods that I used.

    I am looking forward to your support :( and so sorry for my poor English grammar.
     
      Last edited: Mar 8, 2017
    • Rexje

      Rexje Star Wrangler

      %AppData% also contains your saved games. Be careful when you delete from here!

      The second message says that the file %AppData%\StardewValley\startup_preferences is empty. See if deleting that one file helps. You'll have to fix this first, or the game won't boot.

      The first message is about a use-after-free bug. It looks like the game is trying to read a texture or tileset after it has been disposed (unloaded) already. Because the stack trace mentions your farmer, it might be that you have two or more mods that change the way the farmer looks. These may conflict; try to load only one of these mods.

      Mods aren't installed into your %AppData% but into your game installation folder. Mods may need to save some data in %AppData%, but uninstalling them is done by moving the mods folder out of where you installed the game.
       
      • yian2922

        yian2922 Orbital Explorer

        OMG thanks for your answer :up:<3<3<3, but my hunger for Stardew in last 4 hours made me "refresh" (I had window 8.1 run again and of course all my data won't be their anymore) my computer and start set up/download all of my file and games, Stardew once again can be played :nod:
         

        Share This Page