TileSheets\FruitTree ContentEditor - Loading a PNG triggers error (sometimes)
spacechase0 opened this issue ยท 2 comments
This mod adds in a "fruit" tree. When you load a save with fruit trees, sometimes the screen flickers, and you get an error:
[10:02:05 TRACE Json Assets] Injecting Ghostly Tree fruit tree images
[10:02:05 TRACE SMAPI] Json Assets intercepted TileSheets\fruitTrees.
[10:02:05 ERROR SMAPI] An error occured in the overridden draw loop: System.InvalidOperationException: Begin cannot be called again until End has been successfully called.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformMatrix)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState)
at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 795
at StardewModdingAPI.Framework.SGame.Draw(GameTime gameTime) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 599
The edits appear to have worked fine though.
Current Log: https://log.smapi.io/VLB7aW4R
- Game loads, crashes upon selecting a character
- 14 or more trees causes crash, works fine with 13 or less
Investigated with @spacechase0 and @paradigmnomad. Spacechase0 added a workaround to the JSON Assets mod (by preloading the assets), but a more permanent fix requires a bigger change to SMAPI (split to #403).