Breaking change from v3 to v4
Running StardewValley as a headless server. I have everything working fine using jlesage/baseimage-gui:debian-11-v3.5. When I updated to jlesage/baseimage-gui:debian-11-v4 the app won't launch and gets the following error:
stardew | [app ] ./StardewValley: line 7: sw_vers: command not found
stardew | [supervisor ] all services started.
stardew | [supervisor ] service 'utils' exited (with status 126).
stardew | [app ] Unhandled exception. Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!
stardew | [app ] ---> System.NullReferenceException: Object reference not set to an instance of an object.
stardew | [app ] at MonoGame.OpenGL.GL.LoadExtensions() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\OpenGL.cs:line 1443
stardew | [app ] at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsContext.SDL.cs:line 49
stardew | [app ] at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsDevice.OpenGL.cs:line 249
stardew | [app ] at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 297
stardew | [app ] at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 273
stardew | [app ] at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 144
stardew | [app ] at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 115
stardew | [app ] --- End of inner exception stack trace ---
stardew | [app ] at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 123
stardew | [app ] at Microsoft.Xna.Framework.Game.DoInitialize() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 941
stardew | [app ] at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 465
stardew | [app ] at StardewValley.Program.Main(String[] args) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 200
I'm suspecting some issue with xterm. I reviewed the adaptations from 3.x section of the docs but didn't find anything promising.
Any pointers would be appreciated.
After further troubleshooting, I think it broke when TigerVNC replaced x11vnc in V4.
I've tried taking the v4 image and removing TigerVNC and re-installing x11vnc and xvfb. I used the config files from commit 28f8215 as inspiration.
I still get the error Unhandled exception. Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device! when trying to launch the game.
Maybe it's something that changed with openbox between v3 and v4, but I have no idea what logs would help or what configs to check.
This might be caused by support for GTK4. Could you try with version 4.5.3 to see if you have the same issue ?
This might be caused by support for GTK4. Could you try with version 4.5.3 to see if you have the same issue ?
@jlesage thanks for chiming in. I was able to test using jlesage/baseimage-gui:debian-11-v4.5.3. I still get game crash with the following error.
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() in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\OpenGL.cs:line 1444
at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info) in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsContext.SDL.cs:line 49
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup() in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsDevice.OpenGL.cs:line 252
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup() in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 297
at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters) in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 273
at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi) in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 144
at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 115
I tried using v3.5.8 and it worked. In addition, I also observed that the game used llvmpipe for CPU rendering instead of GPU, resulting in high CPU usage. Could it be because v4 uses TigerVNC but does not support llvmpipe?