EverestAPI / Everest

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

Crashing when streaming to Discord Voice Chat #248

Open hyblocker opened 3 years ago

hyblocker commented 3 years ago

I've been trying to stream Celeste lately on Discord Voice Chats, and have been encountering a reproducible, critical crash. To reproduce: Use Everest Join a voice chat on Discord Stream Celeste Beat a chapter (I've only tested chapter 1) Crashes before rendering the main menu

This bug is with Everest (tried doing it on vanilla, not reproducible), and I can't seem to find any crash logs.

0x0ade commented 3 years ago

Can you please take a look at the launch.txt in your Celeste installation folder and check if any of the options fix this problem?

WEGFan commented 3 years ago

I tried some combinations and found that this only happens on FNA version with --no-d3d enabled in launch.txt on my Windows 10, so a solution may be switching to XNA version or enable --d3d

And also I noticed that the game flickers in the map edit screen while streaming

No idea why the error log didn't appear in log.txt, I found it in windows event, seems like it's related to graphics devices

System.AccessViolationException
   at Microsoft.Xna.Framework.Graphics.OpenGLDevice.<>c__DisplayClass186_0.<GetTextureData2D>b__0()
   at Microsoft.Xna.Framework.Graphics.OpenGLDevice.ForceToMainThread(Action action)
   at Microsoft.Xna.Framework.Graphics.OpenGLDevice.GetTextureData2D(IGLTexture texture, SurfaceFormat format, Int32 width, Int32 height, Int32 level, Int32 subX, Int32 subY, Int32 subW, Int32 subH, IntPtr data, Int32 startIndex, Int32 elementCount, Int32 elementSizeInBytes)
   at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](Int32 level, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
   at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](T[] data)
   at Celeste.HiresSnow..ctor(Single overlayAlpha)
   at DMD<Celeste.AreaComplete::orig_Update>(AreaComplete this)
   at Celeste.AreaComplete.Update()
   at DMD<Monocle.Engine::Update>(Engine this, GameTime gameTime)
   at Trampoline<Monocle.Engine::Update>?3731560(Engine , GameTime )
   at Celeste.Mod.CommunalHelper.Entities.SyncedZipMoverActivationControllerHooks.modEngineUpdate(orig_Update orig, Engine engine, GameTime gameTime)
   at Hook<Monocle.Engine::Update>?28376987(Engine , GameTime )
   at Trampoline<Monocle.Engine::Update>?14220479(Engine , GameTime )
   at Celeste.Mod.SpeedrunTool.RespawnSpeedUtils.RespawnSpeed(orig_Update orig, Engine self, GameTime time)
   at Hook<Monocle.Engine::Update>?42707522(Engine , GameTime )
   at Trampoline<Monocle.Engine::Update>?48346548(Engine , GameTime )
   at TAS.EverestInterop.Core.Engine_Update(orig_Update orig, Engine self, GameTime gameTime)
   at Hook<Monocle.Engine::Update>?26100924(Engine , GameTime )
   at DMD<Celeste.Celeste::Update>(Celeste this, GameTime gameTime)
   at Trampoline<Celeste.Celeste::Update>?51320162(Celeste , GameTime )
   at Celeste.Mod.TogglableHUD.Modules.TogglableHud.on_Celeste_Update(orig_Update orig, Celeste self, GameTime gametime)
   at Hook<Celeste.Celeste::Update>?38904091(Celeste , GameTime )
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SDL2_FNAPlatform.RunLoop(Game game)
   at Microsoft.Xna.Framework.Game.Run()
   at Monocle.Engine.RunWithLogging()
   at Celeste.Celeste.orig_Main(String[] args)
   at Celeste.Celeste.MainInner(String[] args)
   at Celeste.Celeste.Main(String[] args)
   at Celeste.Mod.BOOT.Main(String[] args)
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, String[] args)
   at System.AppDomain.ExecuteAssembly(System.String, System.String[])
   at Celeste.Mod.BOOT+<>c__DisplayClass0_1.<Main>b__0()
   at Celeste.Mod.BOOT+<>c__DisplayClass3_0.<ThreadIfNeeded>b__0()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()
maddie480 commented 3 years ago

Hyblocker came to the Discord since then, and had their issue fixed with --d3d. Note that this is not a general issue though, since I use --no-d3d and I don't crash if I stream Celeste through Discord and end a chapter.