EverestAPI / Everest

Everest - Celeste Mod Loader / Mod API
https://everestapi.github.io/
MIT License
368 stars 80 forks source link

Game crash when launching with `--dump` #651

Closed DemoJameson closed 1 year ago

DemoJameson commented 1 year ago

My mods and Everest install are up to date

Yes

I have recreated the bug with only Everest OR a minimum number of mods enabled

Yes

Describe the bug

CELESTE : 1.4.0.0
(08/02/2023 17:24:17) [Everest] [Info] [core] Booting Everest
(08/02/2023 17:24:17) [Everest] [Info] [core] AppDomain: Celeste.exe+Everest
(08/02/2023 17:24:17) [Everest] [Info] [core] VersionCelesteString: 1.4.0.0-fna [Everest: 4119-azure-a3499]
(08/02/2023 17:24:17) [Everest] [Info] [core] SystemMemoryMB: 32706.730 MB
(08/02/2023 17:24:17) [Everest] [Warn] [discord-game-sdk] Could not initialize Discord Game SDK!
--------------------------------
Discord.ResultException: InternalError
   at Discord.Discord..ctor(Int64 clientId, UInt64 flags)
   at Celeste.Mod.Everest.DiscordSDK..ctor(Game game) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.DiscordSDK.cs:line 23
(08/02/2023 17:24:17) [Everest] [Info] [core] Module Everest 1.4119.0 registered.
(08/02/2023 17:24:17) [Everest] [Info] [discord-game-sdk] Discord Game SDK disposed
(08/02/2023 17:24:17) [Everest] [Info] [core] Module Celeste 1.4.0.0 registered.
(08/02/2023 17:24:17) [Everest] [Info] [core] Module DialogCutscene 1.0.0 registered.
(08/02/2023 17:24:17) [Everest] [Info] [core] Module UpdateChecker 1.0.2 registered.
(08/02/2023 17:24:17) [Everest] [Info] [core] Module InfiniteSaves 1.0.0 registered.
(08/02/2023 17:24:17) [Everest] [Info] [core] Module DebugRebind 1.0.0 registered.
(08/02/2023 17:24:17) [Everest] [Info] [core] Module RebindPeriod 1.0.0 registered.
(08/02/2023 17:24:18) [Everest] [Info] [Everest.LuaBoot] Lua ready.
(08/02/2023 17:24:18) [Everest] [Info] [loader] Loading mods with unsatisfied optional dependencies (if any)
FNA3D Driver: D3D11
D3D11 Adapter: NVIDIA GeForce GT 740
SetStringMarker not supported!
BEGIN LOAD
--------------------------------
Detailed exception log:
--------------------------------
System.NullReferenceException: Object reference not set to an instance of an object.
   at Celeste.Mod.ContentExtensions.GetPaddedSubtextureCopy(MTexture input) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/ContentExtensions.cs:line 80
   at Celeste.Mod.Everest.Content.Dump(String assetNameFull, Object asset) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Content.cs:line 1113
   at Celeste.Mod.Everest.Content.Dump(String assetNameFull, Object asset) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Content.cs:line 1113
   at Celeste.Mod.Everest.Content.ProcessLoad(Object asset, String assetNameFull) in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Everest/Everest.Content.cs:line 985
   at Monocle.Atlas.FromAtlas(String path, AtlasDataFormat format) in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Monocle/Atlas.cs:line 265
   at Celeste.OVR.Load()
   at Celeste.Celeste.orig_LoadContent()
   at Celeste.Celeste.LoadContent() in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Celeste.cs:line 268
   at Microsoft.Xna.Framework.Game.Initialize()
   at Monocle.Engine.Initialize()
   at Celeste.Celeste.orig_Initialize()
   at Celeste.Celeste.Initialize() in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Celeste.cs:line 259
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run()
   at Monocle.Engine.RunWithLogging() in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Monocle/Engine.cs:line 41

Steps to reproduce

Launch the game with --dump argument then crash

Expected behavior

no crash

Operating System

Windows 10

Everest Version

4119

Mods required to reproduce

No response

Additional context

No response

DemoJameson commented 1 year ago

https://github.com/EverestAPI/Everest/blob/dev/Celeste.Mod.mm/Mod/Everest/ContentExtensions.cs#L84

// input.Texture.Texture == null
Color[] dataInput = new Color[input.Texture.Texture.Width * input.Texture.Texture.Height];