PC [HELP] Game Crash while saving

Terramine

Newcomer
I am helping a friend, so can't be too descriptive
The game has been crashing while entering the bed and saving. Seems like the crash is not constant and can be delayed by, for example, going to bed right in the morning
The crash has occured both through 1.5.2 and 1.5.3 and on different farms without corrupting the saves
I have a feeling that it's not the game's issue specifically, but still need help understanding the error logs
Here's the said log:

Message: The render target must not be set on the device when it is used as a texture.
InnerException:
Stack Trace: в Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
в Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
в Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
в Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
в StardewValley.Game1.renderScreenBuffer(RenderTarget2D target_screen) в C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:строка 19948
в StardewValley.Game1.Draw(GameTime gameTime) в C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:строка 18700
в StardewValley.GameRunner.Draw(GameTime gameTime) в C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\LocalMultiplayer.cs:строка 642
в Microsoft.Xna.Framework.Game.DrawFrame()
в Microsoft.Xna.Framework.Game.Tick()
в Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
в Microsoft.Xna.Framework.GameHost.OnIdle()
в Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
в Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
в System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Microsoft.Xna.Framework.WindowsGameHost.Run()
в Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
в StardewValley.Program.Main(String[] args) в C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:строка 156

Game Version: 1.5.3
SDK Helper: SteamHelper
Game Language: ru
GPU: Google SwiftShader 3D Renderer
OS: Win32NT Microsoft Windows NT 6.1.7601 Service Pack 1
Multiplayer (Client)
In-game Date: spring 17 Y1 Time of Day: 600
Game Location: FarmHouse
 
Last edited by a moderator:

liquidcat

Moderator
Staff member
Have you tried out doing these things -
  • Delete the startup_preferences file in %AppData%/StardewValley
  • Go into the game file directly (you can find this by right clicking game in steam library > properties > local files > browse local files...) and then into the folder titled “_CommonRedist”, then “XNA”, then “4.0”, then “xnafx40_redist” installer. Once there, run the installer and hit repair.
  • If you don’t have SMAPI installed, right-click on Stardew Valley in Steam, then go to Properties > Set Launch Options, and make sure it is empty.
  • If you are running the software "RivaTuner", exit out of it completely before running the game
  • Go to Device Manager > System Devices and check if there is something called "FrescoLogic Display Adapter". this can cause incompatiblity issues.
Hopefully one of them will work!
 

mrgreengenes

Newcomer
I've had the same error twice. The first time, I just had to redo the day and it kept going. Seems to me like it was going to trigger an overnight event, but then it just crashes to desktop before getting to the sold screen and saving the game. I've also noticed I've had very few overnight events this game, aside from the ones triggered by the community center. I think the only one's I've gotten are the witch and the owl and I'm already in 3rd spring, quite a bit fewer than previous runs.

Given when it's happening and my uninformed guess from the stack trace, maybe some texture for something used in an event cutscene is bugging out?
  • I'm going to try deleting my startup_preferences file, but this crash seems to be happening quite rarely, as I suspect it's only on certain overnight events for me.
  • I don't have anything in "\Stardew Valley\_CommonRedist\XNA\4.0" at all, even with options enabled to show hidden and system files/folders.
  • The last 3 suggestions don't seem to apply to me.
Stack Trace for the most recent incident:

Message: The render target must not be set on the device when it is used as a texture.
InnerException:
Stack Trace: at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
at StardewValley.Game1.renderScreenBuffer(RenderTarget2D target_screen) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 19957
at StardewValley.Game1.Draw(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 18709
at StardewValley.GameRunner.Draw(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\LocalMultiplayer.cs:line 642
at Microsoft.Xna.Framework.Game.DrawFrame()
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) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 156

Game Version: 1.5.4
SDK Helper: SteamHelper
Game Language: en
GPU: NVIDIA GeForce GTX 1070 with Max-Q Design
OS: Win32NT Microsoft Windows NT 6.2.9200.0
In-game Date: spring 14 Y3 Time of Day: 600
Game Location: FarmHouse

Message and Stack Trace for the previous incident were identical. Just including the last part:

Game Version: 1.5.4
SDK Helper: SteamHelper
Game Language: en
GPU: NVIDIA GeForce GTX 1070 with Max-Q Design
OS: Win32NT Microsoft Windows NT 6.2.9200.0
In-game Date: fall 18 Y2 Time of Day: 600
Game Location: FarmHouse
 

Scary5Pumpkin

Newcomer
I have the same problem with the save crashes!
About 10 times in 3 (real time) days, it crashes when the saving screen is up, and I have to start the day al over.
 

evilnpc

Newcomer
I am having the same issue, my game crashes whilest going to sleep/save.
The errorlog is the same, as follows :
>>Message: The render target must not be set on the device when it is used as a texture.
InnerException:
Stack Trace: at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
at StardewValley.Game1.renderScreenBuffer(RenderTarget2D target_screen) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 19957
at StardewValley.Game1.Draw(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 18709
at StardewValley.GameRunner.Draw(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\LocalMultiplayer.cs:line 642
at Microsoft.Xna.Framework.Game.DrawFrame()
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) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 156
Game Version: 1.5.4
SDK Helper: SteamHelper
Game Language: en
GPU: Google SwiftShader 3D Renderer
OS: Win32NT Microsoft Windows NT 6.1.7601 Service Pack 1
In-game Date: winter 3 Y2 Time of Day: 600
Game Location: FarmHouse
<<

>> I've tried reinstalling the game, reinstalling/fixing XNA, and deleting startup_preferences. I dont have any Mods or whatsoever, it started happening after the version 1.5.4 update, wonder if it could have anything to do with the actualization? Please if anyone has found the fix for this let me know ;(((
 

sety

Newcomer
I have the same issue. It happened once, I redid everything again and the game didn't crash. The day after, it crashed again :(

Message: The render target must not be set on the device when it is used as a texture.
InnerException:
Stack Trace: at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
at StardewValley.Game1.renderScreenBuffer(RenderTarget2D target_screen) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 19957
at StardewValley.Game1.Draw(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 18709
at StardewValley.GameRunner.Draw(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\LocalMultiplayer.cs:line 642
at Microsoft.Xna.Framework.Game.DrawFrame()
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) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 156

Game Version: 1.5.4
SDK Helper: SteamHelper
Game Language: en
GPU: NVIDIA GeForce RTX 3070 Laptop GPU
OS: Win32NT Microsoft Windows NT 6.2.9200.0
Playing on Controller
In-game Date: fall 25 Y1 Time of Day: 600
Game Location: FarmHouse
 

tornadojack

Sodbuster
Everything is the same.
About 1 am, farm house, going asleep, crash to desktop before summing up the results of the day. Save file stays intact from previous day.

Message: The render target must not be set on the device when it is used as a texture.
InnerException:
Stack Trace: в Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
в Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
в Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
в Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
в StardewValley.Game1.renderScreenBuffer(RenderTarget2D target_screen) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:строка 19957
в StardewValley.Game1.Draw(GameTime gameTime) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:строка 18709
в StardewValley.GameRunner.Draw(GameTime gameTime) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\LocalMultiplayer.cs:строка 642
в Microsoft.Xna.Framework.Game.DrawFrame()
в Microsoft.Xna.Framework.Game.Tick()
в Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
в Microsoft.Xna.Framework.GameHost.OnIdle()
в Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
в Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
в System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Microsoft.Xna.Framework.WindowsGameHost.Run()
в Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
в StardewValley.Program.Main(String[] args) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:строка 156

Game Version: 1.5.4
SDK Helper: GalaxyHelper
Game Language: ru
GPU: NVIDIA GeForce GT 1030
OS: Win32NT Microsoft Windows NT 6.2.9200.0
In-game Date: spring 23 Y6 Time of Day: 600
Game Location: FarmHouse
 
Everything is the same.
About 1 am, farm house, going asleep, crash to desktop before summing up the results of the day. Save file stays intact from previous day.

Message: The render target must not be set on the device when it is used as a texture.
InnerException:
Stack Trace: в Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
в Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
в Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
в Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
в StardewValley.Game1.renderScreenBuffer(RenderTarget2D target_screen) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:строка 19957
в StardewValley.Game1.Draw(GameTime gameTime) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:строка 18709
в StardewValley.GameRunner.Draw(GameTime gameTime) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\LocalMultiplayer.cs:строка 642
в Microsoft.Xna.Framework.Game.DrawFrame()
в Microsoft.Xna.Framework.Game.Tick()
в Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
в Microsoft.Xna.Framework.GameHost.OnIdle()
в Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
в Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
в System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Microsoft.Xna.Framework.WindowsGameHost.Run()
в Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
в StardewValley.Program.Main(String[] args) в C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:строка 156

Game Version: 1.5.4
SDK Helper: GalaxyHelper
Game Language: ru
GPU: NVIDIA GeForce GT 1030
OS: Win32NT Microsoft Windows NT 6.2.9200.0
In-game Date: spring 23 Y6 Time of Day: 600
Game Location: FarmHouse
Also, most importantly could you play as admin from your Steam?
I noticed that you need to download and install the Microsoft XNA.
Could you download the latest XNA and DirectX?

XNA

I have provided for you the latest Direct X

Please report back, if it works or not.
 
Last edited:

tornadojack

Sodbuster
Top