goatcorp / FFXIVQuickLauncher

Custom launcher for FFXIV
https://goatcorp.github.io/
GNU General Public License v3.0
2.76k stars 327 forks source link

Crash when starting game on Linux (environment variable case-sensitivity issue?) #1018

Open sersorrel opened 2 years ago

sersorrel commented 2 years ago

Update disclaimer

What did you do?

I left the game installing from scratch ("Patching through 0/107 updates..."), and came back to this screen:

image

I've never played FFXIV before and I haven't changed any of the xivlauncher settings apart from enabling autologin. I installed xivlauncher through Lutris. Here's output.log; there's no dalamud.log present anywhere in the wineprefix.

Platform

Linux (Wine/Proton)

Wine/Proton runner version

lutris-7.1-x86_64

Relevant log output

System.ArgumentException: Item has already been added. Key in dictionary: 'shell'  Key being added: 'SHELL'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at System.Diagnostics.ProcessStartInfo.get_EnvironmentVariables()
   at XIVLauncher.Common.Windows.WindowsDalamudRunner.Run(FileInfo runner, Boolean fakeLogin, FileInfo gameExe, String gameArgs, IDictionary`2 environment, DalamudLoadMethod loadMethod, DalamudStartInfo startInfo) in C:\goatsoft\xl\XIVLauncher.Common.Windows\WindowsDalamudRunner.cs:line 52
   at XIVLauncher.Common.Dalamud.DalamudLauncher.Run(FileInfo gameExe, String gameArgs, IDictionary`2 environment) in C:\goatsoft\xl\XIVLauncher.Common\Dalamud\DalamudLauncher.cs:line 85
   at XIVLauncher.Common.Game.Launcher.LaunchGame(IGameRunner runner, String sessionId, Int32 region, Int32 expansionLevel, Boolean isSteamServiceAccount, String additionalArguments, DirectoryInfo gamePath, Boolean isDx11, ClientLanguage language, Boolean encryptArguments, DpiAwareness dpiAwareness) in C:\goatsoft\xl\XIVLauncher.Common\Game\Launcher.cs:line 268
   at XIVLauncher.Windows.ViewModel.MainWindowViewModel.<StartGameAndAddon>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at XIVLauncher.Windows.ViewModel.MainWindowViewModel.<TryProcessLoginResult>d__25.MoveNext() in D:\a\FFXIVQuickLauncher\FFXIVQuickLauncher\src\XIVLauncher\Windows\ViewModel\MainWindowViewModel.cs:line 601

Version: 6.2.40.0
Git Hash: 6.2.40-0-gdb12d85
Context: Login
OS: Microsoft Windows NT 6.2.9200.0
64bit? True
DX11? True
Addons Enabled? True
Auto Login Enabled? True
Language: English
LauncherLanguage: English
Game path: C:\Program Files (x86)\SquareEnix\FINAL FANTASY XIV - A Realm Reborn
Bluefissure commented 2 years ago

I think it's because the Unix env vars are case-sensitive but on Windows they're not, the wine makes the psi.EnvironmentVariables code here takes it as in Unix and generate same env vars w/ different cases, and something's broken when porting the vars into wine. To resolve we can try how the env vars are handled in corefx. Relative discussion: https://github.com/dotnet/runtime/issues/19142