ObjectManagerManager / SMAPIDedicatedServerMod

Dedicated (headless) server mod for Stardew Valley, powered by SMAPI. Turns the host into an automated bot.
MIT License
78 stars 17 forks source link

Game crashes when no display is available #1

Closed ShaneTRS closed 1 year ago

ShaneTRS commented 1 year ago

I'd imagine this isn't exactly easy to fix, but I figured I'd report it here anyway.

[SMAPI] SMAPI 3.15.1 with Stardew Valley 1.5.6 (build 1.3.37.0) on Unix 5.18.16.1
[SMAPI] Mods go here: /run/media/shane/Eden/Games/Steam/steamapps/common/Stardew Valley/Mods
[SMAPI] Waiting for game to launch...
[game] The game failed to launch: Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!
 ---> NullReferenceException: Object reference not set to an instance of an object.
   at MonoGame.OpenGL.GL.LoadExtensions()
   at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   --- End of inner exception stack trace ---
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at StardewModdingAPI.Framework.SCore.RunInteractively()
[SMAPI] Game has ended. Press any key to exit.
SkyfallWasTaken commented 1 year ago

I'd imagine you could use Xfvb to get round this?

ObjectManagerManager commented 1 year ago

Yes, that's the idea. There needs to be some sort of graphics device, even if it's a virtual one. I haven't tried it out myself yet, but I have successfully run vanilla SDV on a remote desktop (with no display), at least.

On Wed, Oct 26, 2022 at 4:34 AM SkyfallWasTaken @.***> wrote:

I'd imagine you could use Xfvb to get round this?

— Reply to this email directly, view it on GitHub https://github.com/ObjectManagerManager/SMAPIDedicatedServerMod/issues/1#issuecomment-1291896006, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2DISHKB434NZGC4GD5V3HDWFEJMFANCNFSM557EQA4Q . You are receiving this because you are subscribed to this thread.Message ID: <ObjectManagerManager/SMAPIDedicatedServerMod/issues/1/1291896006@ github.com>