steviegt6 / Stardew64Installer

A handy piece of software that converts a Linux installation of SDV into a working 64bit Windows installation.
MIT License
15 stars 2 forks source link

OpenGL 3.0 compatible driver error. #27

Open fforres opened 3 years ago

fforres commented 3 years ago

Hey folks, been trying to install 64 bit version, and came across this issues.

Followed along this video to the letter, and when running StardewModdingAPI.exe it shows the following .

[SMAPI] SMAPI 3.10.1 with Stardew Valley 1.5.4 on Microsoft Windows 10 Pro N
[SMAPI] Detected custom version: running 64-bit SMAPI with MonoGame, patched by Stardew64Installer 1.1.7
[SMAPI] Mods go here: C:\Users\felip\Documents\depot\depots\413153\6125897\Mods
[SMAPI] Starting game...
[game] The game failed to launch: System.PlatformNotSupportedException: MonoGame requires OpenGL 3.0 compatible drivers, or either ARB_framebuffer_object or EXT_framebuffer_object extensions.Try updating your graphics drivers.
   at 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, PresentationParameters presentationParameters)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.Initialize()
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   at Microsoft.Xna.Framework.GamePlatform.BeforeInitialize()
   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.

Log here https://smapi.io/log/c09b160edd7542dd84540d1157c52b86

For extra context, got an AMD Radeon RX 5700 XT and an AMD Ryzen 5. Initially I tried this installation with a bunch of mods, and got the same error, so I went back and did a fresh installation of the linux version with smapi 3.10.1 and got the same error.

Also tried installed latest .net framework and updating my drivers.

fforres commented 3 years ago

Not sure if there's any extra context I can provide, happy to help :)

fforres commented 3 years ago

Hey @Steviegt6 got some more info on this.

I did a clean install, and it worked, re-applied mods 1 by one (All stardew-valley-expended ones) and it still worked.

So issue was not the installer or the mods. Testing a bit more, turns out the problem starts when I try to run this via steam.

TLDR: Following this steps breaks the game with the previously mentioned error.

It also breaks the installation moving forward, since now running StardewModdingAPI.exe on it's own (Not via steam) also throws the same error.


I tried looking on what commands does steam inject in the the command interpolation in "C:/Path/to/exefile.exe" %command% but could not find anything.

PS: This work is really awesome :) Thanks for taking the time 🙏

Hope this helps

fforres commented 3 years ago

this is the full error


[15:25:31 INFO  SMAPI] SMAPI 3.10.1 with Stardew Valley 1.5.4 on Microsoft Windows 10 Pro N
[15:25:31 INFO  SMAPI] Detected custom version: running 64-bit SMAPI with MonoGame, patched by Stardew64Installer 1.1.8
[15:25:31 INFO  SMAPI] Mods go here: C:\Users\felip\Downloads\Stardew64Installer_1.1.8\depots\413153\6971863\Mods
[15:25:31 TRACE SMAPI] Log started at 2021-07-06T22:25:31 UTC
[15:25:31 TRACE SMAPI] Loaded with custom settings: AggressiveMemoryOptimizations: False
[15:25:34 DEBUG SMAPI] Starting game...
[15:25:34 TRACE game] Couldn't create window: The current process has used all of its system allowance of handles for Window Manager objects.
[15:25:35 TRACE game] Invalid window
[15:25:35 TRACE game] displayIndex must be in the range 0 - 0
[15:25:35 TRACE game] Invalid window
[15:25:35 TRACE game] displayIndex must be in the range 0 - 0
[15:25:35 TRACE game] Invalid window
[15:25:35 TRACE game] Invalid window
[15:25:35 ERROR game] The game failed to launch: System.PlatformNotSupportedException: MonoGame requires OpenGL 3.0 compatible drivers, or either ARB_framebuffer_object or EXT_framebuffer_object extensions.Try updating your graphics drivers.
   at 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, PresentationParameters presentationParameters)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.Initialize()
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   at Microsoft.Xna.Framework.GamePlatform.BeforeInitialize()
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at StardewModdingAPI.Framework.SCore.RunInteractively()
[15:25:35 INFO  SMAPI] Game has ended. Press any key to exit.
steviegt6 commented 3 years ago

Useful information but I have no idea why that happens. @Pathoschild might know, though it seems like launching through Steam has been causing some other issues too...

fforres commented 3 years ago

🙏 Not a mod maker or game developer, but a SE.

So if there's anything i can help, LMK

fforres commented 3 years ago

Made a quick program to extract the arguments.

Have this on steam "C:\Users\fforres\github\sdv\sdv-win.exe" %command%

and it outputs:

theArgs: [ 'D:\\steam\\steamapps\\common\\Stardew Valley\\Stardew Valley.exe' ]

So steam is injecting their default SDV executable in the mix? does SMAPI do something with that arg? Does steam use the path only for achievements?

If so... Maybe a red herring

(Removing %command% makes it so steam does not run my custom path at all)