Issue Game crashes when leaving the farmhouse

Thanks for the log.
I'm not exactly sure the cause; seems to be due to an issue with the animals.
Both, the pet dog, and farm animals.

Code:
09:10:59    TRACE    SMAPI          Rewrote CustomChores.dll to fix FarmAnimal.pet (added missing optional parameters)...

09:13:12    ERROR    Farm Type Manager    This mod failed in the GameLoop.DayStarted event. Technical details:
NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.FarmAnimal.GetBoundingBox() in stardewvalley\Farmer\Farmer\FarmAnimals\FarmAnimal.cs:line 490
   at StardewValley.Character.getTileLocation() in stardewvalley\Farmer\Farmer\Character.cs:line 1069
   at StardewValley.Farm.isTileOccupied(Vector2 tileLocation, String characterToIgnore, Boolean ignoreAllCharacters) in stardewvalley\Farmer\Farmer\Locations\Farm.cs:line 1580
   at StardewValley.GameLocation.isTileLocationTotallyClearAndPlaceable(Vector2 v) in stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 7044
   at FarmTypeManager.ModEntry.Utility.IsTileValid(GameLocation location, Vector2 tile, Point size, String strictTileChecking) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Utility\Tiles\IsTileValid.cs:line 76
   at FarmTypeManager.ModEntry.TileValidator.GetTile(Point size) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Classes\TileValidator.cs:line 56
   at FarmTypeManager.ModEntry.Generation.SpawnTimedSpawns(List`1 timedSpawns, Nullable`1 time) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Generation Routines\SpawnTimedSpawns.cs:line 118
   at FarmTypeManager.ModEntry.DayStarted(Object sender, EventArgs e) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Events\DayStarted.cs:line 52
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101


09:13:16    ERROR    game    An error occurred in the base update loop: NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.FarmAnimal.GetBoundingBox() in stardewvalley\Farmer\Farmer\FarmAnimals\FarmAnimal.cs:line 490
   at StardewValley.Farm.isCollidingPosition(Rectangle position, Rectangle viewport, Boolean isFarmer, Int32 damagesFarmer, Boolean glider, Character character, Boolean pathfinding, Boolean projectile, Boolean ignoreCharacterRequirement) in stardewvalley\Farmer\Farmer\Locations\Farm.cs:line 1070
   at StardewValley.Characters.Pet.RunState(GameTime time) in stardewvalley\Farmer\Farmer\Characters\Pet.cs:line 535
   at StardewValley.Characters.Dog.RunState(GameTime time) in stardewvalley\Farmer\Farmer\Characters\Dog.cs:line 124
   at StardewValley.Characters.Pet.update_PatchedBy<PeacefulEnd.AlternativeTextures>(Pet this, GameTime time, GameLocation location)
   at StardewValley.GameLocation.updateCharacters(GameTime time)
   at StardewValley.GameLocation.updateEvenIfFarmerIsntHere(GameTime time, Boolean ignoreWasUpdatedFlush)
   at StardewValley.Locations.BuildableGameLocation.updateEvenIfFarmerIsntHere(GameTime time, Boolean skipWasUpdatedFlush)
   at StardewValley.Farm.updateEvenIfFarmerIsntHere(GameTime time, Boolean skipWasUpdatedFlush)
   at StardewValley.Game1.UpdateLocations(GameTime time)
   at StardewValley.Game1._update(GameTime gameTime)
   at StardewValley.Game1.Update(GameTime gameTime)
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)


09:13:17    ERROR    SMAPI    An error occurred in the overridden draw loop: NullReferenceException: Object reference not set to an instance of an object.
   at AlternativeTextures.Framework.Patches.Entities.FarmAnimalPatch.DrawPrefix(Character __instance, SpriteBatch b) in C:\Users\Floogen\Documents\GitHub Repos\AlternativeTextures\AlternativeTextures\Framework\Patches\Entities\FarmAnimalPatch.cs:line 44
   at StardewValley.FarmAnimal.draw_PatchedBy<PeacefulEnd.AlternativeTextures>(FarmAnimal this, SpriteBatch b)
   at StardewValley.Farm.draw_PatchedBy<PeacefulEnd.AlternativeTextures>(Farm this, SpriteBatch b)
   at StardewModdingAPI.Framework.SGame.DrawImpl_PatchedBy<tlitookilakin.AeroCore>(SGame this, GameTime gameTime, RenderTarget2D target_screen)
   at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen)


09:13:17    ERROR    game    An error occurred in the base update loop: NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.FarmAnimal.updateWhenCurrentLocation_PatchedBy<PeacefulEnd.AlternativeTextures>(FarmAnimal this, GameTime time, GameLocation location)
   at StardewValley.Farm.UpdateWhenCurrentLocation(GameTime time)
   at StardewValley.Game1.UpdateLocations(GameTime time)
   at StardewValley.Game1._update(GameTime gameTime)
   at StardewValley.Game1.Update(GameTime gameTime)
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)

It does mention AeroCore and AlternativeTextures both editing them.
But, can you try removing "CustomChores" first, and see if that helps. It modifies the animals, and is pretty old.

Also, as a FYI; there's an issue with CustomFurniture right now. It's not recommended to be using them right now.
Post with more details:
 

Khaos

Greenhorn
Thanks for the log.
I'm not exactly sure the cause; seems to be due to an issue with the animals.
Both, the pet dog, and farm animals.

Code:
09:10:59    TRACE    SMAPI          Rewrote CustomChores.dll to fix FarmAnimal.pet (added missing optional parameters)...

09:13:12    ERROR    Farm Type Manager    This mod failed in the GameLoop.DayStarted event. Technical details:
NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.FarmAnimal.GetBoundingBox() in stardewvalley\Farmer\Farmer\FarmAnimals\FarmAnimal.cs:line 490
   at StardewValley.Character.getTileLocation() in stardewvalley\Farmer\Farmer\Character.cs:line 1069
   at StardewValley.Farm.isTileOccupied(Vector2 tileLocation, String characterToIgnore, Boolean ignoreAllCharacters) in stardewvalley\Farmer\Farmer\Locations\Farm.cs:line 1580
   at StardewValley.GameLocation.isTileLocationTotallyClearAndPlaceable(Vector2 v) in stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 7044
   at FarmTypeManager.ModEntry.Utility.IsTileValid(GameLocation location, Vector2 tile, Point size, String strictTileChecking) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Utility\Tiles\IsTileValid.cs:line 76
   at FarmTypeManager.ModEntry.TileValidator.GetTile(Point size) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Classes\TileValidator.cs:line 56
   at FarmTypeManager.ModEntry.Generation.SpawnTimedSpawns(List`1 timedSpawns, Nullable`1 time) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Generation Routines\SpawnTimedSpawns.cs:line 118
   at FarmTypeManager.ModEntry.DayStarted(Object sender, EventArgs e) in D:\Esca\Stardew\Mods\FarmTypeManager\FarmTypeManager\Events\DayStarted.cs:line 52
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101


09:13:16    ERROR    game    An error occurred in the base update loop: NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.FarmAnimal.GetBoundingBox() in stardewvalley\Farmer\Farmer\FarmAnimals\FarmAnimal.cs:line 490
   at StardewValley.Farm.isCollidingPosition(Rectangle position, Rectangle viewport, Boolean isFarmer, Int32 damagesFarmer, Boolean glider, Character character, Boolean pathfinding, Boolean projectile, Boolean ignoreCharacterRequirement) in stardewvalley\Farmer\Farmer\Locations\Farm.cs:line 1070
   at StardewValley.Characters.Pet.RunState(GameTime time) in stardewvalley\Farmer\Farmer\Characters\Pet.cs:line 535
   at StardewValley.Characters.Dog.RunState(GameTime time) in stardewvalley\Farmer\Farmer\Characters\Dog.cs:line 124
   at StardewValley.Characters.Pet.update_PatchedBy<PeacefulEnd.AlternativeTextures>(Pet this, GameTime time, GameLocation location)
   at StardewValley.GameLocation.updateCharacters(GameTime time)
   at StardewValley.GameLocation.updateEvenIfFarmerIsntHere(GameTime time, Boolean ignoreWasUpdatedFlush)
   at StardewValley.Locations.BuildableGameLocation.updateEvenIfFarmerIsntHere(GameTime time, Boolean skipWasUpdatedFlush)
   at StardewValley.Farm.updateEvenIfFarmerIsntHere(GameTime time, Boolean skipWasUpdatedFlush)
   at StardewValley.Game1.UpdateLocations(GameTime time)
   at StardewValley.Game1._update(GameTime gameTime)
   at StardewValley.Game1.Update(GameTime gameTime)
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)


09:13:17    ERROR    SMAPI    An error occurred in the overridden draw loop: NullReferenceException: Object reference not set to an instance of an object.
   at AlternativeTextures.Framework.Patches.Entities.FarmAnimalPatch.DrawPrefix(Character __instance, SpriteBatch b) in C:\Users\Floogen\Documents\GitHub Repos\AlternativeTextures\AlternativeTextures\Framework\Patches\Entities\FarmAnimalPatch.cs:line 44
   at StardewValley.FarmAnimal.draw_PatchedBy<PeacefulEnd.AlternativeTextures>(FarmAnimal this, SpriteBatch b)
   at StardewValley.Farm.draw_PatchedBy<PeacefulEnd.AlternativeTextures>(Farm this, SpriteBatch b)
   at StardewModdingAPI.Framework.SGame.DrawImpl_PatchedBy<tlitookilakin.AeroCore>(SGame this, GameTime gameTime, RenderTarget2D target_screen)
   at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen)


09:13:17    ERROR    game    An error occurred in the base update loop: NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.FarmAnimal.updateWhenCurrentLocation_PatchedBy<PeacefulEnd.AlternativeTextures>(FarmAnimal this, GameTime time, GameLocation location)
   at StardewValley.Farm.UpdateWhenCurrentLocation(GameTime time)
   at StardewValley.Game1.UpdateLocations(GameTime time)
   at StardewValley.Game1._update(GameTime gameTime)
   at StardewValley.Game1.Update(GameTime gameTime)
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)

It does mention AeroCore and AlternativeTextures both editing them.
But, can you try removing "CustomChores" first, and see if that helps. It modifies the animals, and is pretty old.

Also, as a FYI; there's an issue with CustomFurniture right now. It's not recommended to be using them right now.
Post with more details:
i removed the mods you mentioned and a few that go with them but sadly nothing seems to have changed
 
i removed the mods you mentioned and a few that go with them but sadly nothing seems to have changed
Hrm, okay.

Can you zip up the save, and send it to me:
 

Khaos

Greenhorn
Hrm, okay.

Can you zip up the save, and send it to me:
Here
 

Attachments

Thanks for the save.

So, the save itself was bugged; I experienced the same crash.
I managed to fix it though. It appears to have been a baby chicken, being saved to the farm instead of the coop.
So, the coop was registered as empty, and the game is always supposed to have farm animals assigned to a farm building.

Here's a fixed save.
I unfortunately don't know the cause; you don't seem to have SaveAnywhere, or anything similar that could unintentionally bug this way.
 

Attachments

Khaos

Greenhorn
Thanks for the save.

So, the save itself was bugged; I experienced the same crash.
I managed to fix it though. It appears to have been a baby chicken, being saved to the farm instead of the coop.
So, the coop was registered as empty, and the game is always supposed to have farm animals assigned to a farm building.

Here's a fixed save.
I unfortunately don't know the cause; you don't seem to have SaveAnywhere, or anything similar that could unintentionally bug this way.
Thank you so much!!! ;u;
oh and i did have SaveAnywhere until i removed it so i could install another mod, so im guessing that had something to do with this?

At this point im convinced the chickens are cursed. after getting another one it glitches out inside the coop (thankfully it was raining). Definitely wont get anymore. though i wonder if it'll happen with the other animals too;;
 
Last edited:
Thank you so much!!! ;u;
oh and i did have SaveAnywhere until i removed it so i could install another mod, so im guessing that had something to do with this?

At this point im convinced the chickens are cursed. after getting another one it glitches out inside the coop (thankfully it was raining). Definitely wont get anymore. though i wonder if it'll happen with the other animals too;;
Well, I've definitely seen similar errors before in relation to SaveAnywhere.

But, you mentioned it happened again; so I took another closer look, at the absolute minimal changes needed to fix the specific crash. So, ignoring the Coop weirdness.
It looks like it's specifically crashing on the animal type; I fixed that when re-adding it to the Coop.
But, the save shows:
<type>Chicken</type>

When it should be a specific color(White,Brown,Blue,Void,Golden):
<type>{colorType} Chicken</type>

I know you also have a few mods like BetterRanching, Livestock Choices, AlternativeTextures and AeroCore that seem to modify the farmanimals.
But, I couldn't replicate it on my end; when buying animals. The rest all came out normal.

You may want to revert to the fixed save above. And, then remove 1/2 your mods temporarily; then add/remove mods while attempting to buy chickens.
Maybe you can narrow it down.
 

Khaos

Greenhorn
Well, I've definitely seen similar errors before in relation to SaveAnywhere.

But, you mentioned it happened again; so I took another closer look, at the absolute minimal changes needed to fix the specific crash. So, ignoring the Coop weirdness.
It looks like it's specifically crashing on the animal type; I fixed that when re-adding it to the Coop.
But, the save shows:
<type>Chicken</type>

When it should be a specific color(White,Brown,Blue,Void,Golden):
<type>{colorType} Chicken</type>

I know you also have a few mods like BetterRanching, Livestock Choices, AlternativeTextures and AeroCore that seem to modify the farmanimals.
But, I couldn't replicate it on my end; when buying animals. The rest all came out normal.

You may want to revert to the fixed save above. And, then remove 1/2 your mods temporarily; then add/remove mods while attempting to buy chickens.
Maybe you can narrow it down.
Alright, I'll try it out ^^
 

Khaos

Greenhorn
Well, I've definitely seen similar errors before in relation to SaveAnywhere.

But, you mentioned it happened again; so I took another closer look, at the absolute minimal changes needed to fix the specific crash. So, ignoring the Coop weirdness.
It looks like it's specifically crashing on the animal type; I fixed that when re-adding it to the Coop.
But, the save shows:
<type>Chicken</type>

When it should be a specific color(White,Brown,Blue,Void,Golden):
<type>{colorType} Chicken</type>

I know you also have a few mods like BetterRanching, Livestock Choices, AlternativeTextures and AeroCore that seem to modify the farmanimals.
But, I couldn't replicate it on my end; when buying animals. The rest all came out normal.

You may want to revert to the fixed save above. And, then remove 1/2 your mods temporarily; then add/remove mods while attempting to buy chickens.
Maybe you can narrow it down.
ok so it seems like it was mainly BetterRanching causing the issues.
Before removing most of the mods to test it i took out both better ranching and livestock choices and starting buying animals and progressing the days. Everything looked ok and when i added BR back (after i tried livestock choices first) it started giving me errors until one of the chickens started teleporting around the coop again and crashed the game.

I'll double check with some of the other mods just to make sure nothing else was affecting it. But again, thank you so much for the help!! I greatly appreciate it
 
Top