Issue SMAPI black screen every night after going to sleep.

The_Gater

Newcomer
Seems like some sort of NPC issue, but I don't speak C# so have no clue what I'm looking at.
Object reference not set to an instance of an object.
at StardewValley.NPC.pathfindToNextScheduleLocation(String startingLocation, Int32 startingX, Int32 startingY, String endingLocation, Int32 endingX, Int32 endingY, Int32 finalFacingDirection, String endBehavior, String endMessage) in stardewvalley\Farmer\Farmer\NPC.cs:line 5153
at StardewValley.NPC.parseMasterSchedule(String rawData) in stardewvalley\Farmer\Farmer\NPC.cs:line 5552
at StardewValley.NPC.getSchedule(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\NPC.cs:line 5795
at StardewValley.NPC.resetForNewDay(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\NPC.cs:line 6065
at StardewValley.NPC.dayUpdate(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\NPC.cs:line 6000
at StardewValley.Game1._newDayAfterFade()+MoveNext() in stardewvalley\Farmer\Farmer\Game1.cs:line 9707
at StardewValley.Game1.<>c.<newDayAfterFade>b__716_2() in stardewvalley\Farmer\Farmer\Game1.cs:line 8714
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
---------------

at StardewValley.Game1._update(GameTime gameTime) in stardewvalley\Farmer\Farmer\Game1.cs:line 4154
at StardewValley.Game1.Update(GameTime gameTime) in stardewvalley\Farmer\Farmer\Game1.cs:line 3974
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 1003
[02:16:53 TRACE game] _newDayTask failed with an exception
[02:16:53 ERROR game] NullReferenceException: Object reference not set to an instance of an object.
at StardewValley.NPC.pathfindToNextScheduleLocation(String startingLocation, Int32 startingX, Int32 startingY, String endingLocation, Int32 endingX, Int32 endingY, Int32 finalFacingDirection, String endBehavior, String endMessage) in stardewvalley\Farmer\Farmer\NPC.cs:line 5153
at StardewValley.NPC.parseMasterSchedule(String rawData) in stardewvalley\Farmer\Farmer\NPC.cs:line 5552
at StardewValley.NPC.getSchedule(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\NPC.cs:line 5795
at StardewValley.NPC.resetForNewDay(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\NPC.cs:line 6065
at StardewValley.NPC.dayUpdate(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\NPC.cs:line 6000
at StardewValley.Game1._newDayAfterFade()+MoveNext() in stardewvalley\Farmer\Farmer\Game1.cs:line 9707
at StardewValley.Game1.<>c.<newDayAfterFade>b__716_2() in stardewvalley\Farmer\Farmer\Game1.cs:line 8714
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
[02:16:53 ERROR game] An error occurred in the base update loop: System.Exception: Error on new day:
I haven't got any idea what mod could be causing the issue, if it's a generic error or anything.
 

The_Gater

Newcomer
I managed to finish a day without this glitch, but after a few in game days it starts up again. I'm not sure what exactly is happening, since I don't do anything specific.
 

Odin

Moderator
Staff member
Can you provide an error log? You can generate one at https://smapi.io/log, there are instructions on that page. Having a log will make it easier to resolve your issue!
 
Top