Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hades crashes after game launch #128

Closed
mchubby opened this issue Oct 22, 2020 · 5 comments
Closed

Hades crashes after game launch #128

mchubby opened this issue Oct 22, 2020 · 5 comments

Comments

@mchubby
Copy link

mchubby commented Oct 22, 2020

Hades crashes with access violation

.\legendary launch appname --offline --language en

config.ini doesn't have any overrides.

FATAL EXCEPTION at 0x00007FFFE544A3F9
Violation when reading address 0x40
Code: 0xc0000005

ExceptionStack Trace:
 at addRootSignature in d:\jenkins\workspace\minos_pc_latest\gsge\the-forge\common_3\renderer\direct3d11\direct3d11.cpp:line 2695 (0x00007fffe544a3f0)
 at sgg::addDescriptorSets in d:\jenkins\workspace\minos_pc_latest\gsge\engine.native\code\rendering\forgerenderer.cpp:line 1077 (0x00007fffe53403d8)
 at sgg::DrawManager::Load in d:\jenkins\workspace\minos_pc_latest\gsge\engine.native\code\rendering\drawmanager.cpp:line 254 (0x00007fffe5339bad)
 at sgg::App::Initialize in d:\jenkins\workspace\minos_pc_latest\gsge\engine.native\code\app.cpp:line 426 (0x00007fffe5148cfe)
 at sgg::HadesMainApp::Init in d:\jenkins\workspace\minos_pc_latest\gsge\engine.native\windows\code\program.cpp:line 1903 (0x00007fffe548fa4e)
 at WindowsMain in d:\jenkins\workspace\minos_pc_latest\gsge\the-forge\common_3\os\windows\windowsbase.cpp:line 1083 (0x00007fffe5443ed6)
 at AppMain in d:\jenkins\workspace\minos_pc_latest\gsge\engine.native\windows\code\program.cpp:line 1721 (0x00007fffe548f1fb)
 at main in d:\jenkins\workspace\minos_pc_latest\gsge\game.native\main.cpp:line 74 (0x00007ff7214b17b6)
 at CoInitializeEx in d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:line 288 (0x00007ff7214b1a7a)
 at BaseThreadInitThunk (0x00007ff836176fc0)

Game log:

https://gist.github.com/mchubby/8a21a88b36ddeefbcdbce1072fc44d31

What works

  • Directly double-clicking Hades.exe
  • .\legendary launch appname --offline --language en --dry-run
[cli] INFO: Not Launching Min (dry run)
[cli] INFO: Launch parameters: 'C:\Users\User/legendary\Hades\x64/Hades.exe' '/c=.. /DirectLoadShell=true' -AUTH_LOGIN=unused -AUTH_PASSWORD= -AUTH_TYPE=exchangecode -epicapp=appname -epicenv=Prod -EpicPortal -epicusername=redacted -epicuserid=redacted -epiclocale=en
[cli] INFO: Working directory: C:\Users\User/legendary\Hades\x64
[cli] INFO: Environment overrides:
  • Running the yielded commandline by removing '/c=.. /DirectLoadShell=true' makes Hades run correctly
@CommandMC
Copy link
Contributor

CommandMC commented Oct 22, 2020

Open up the installed.json inside your Legendary config folder and search for launch_parameters. Is the '/c=.. /DirectLoadShell=true' listed there?

Edit: Why I think that's the issue:
Looking at

params.append(game_exe)

you can see that the params get added in the order:

  1. Game Exe
  2. Launch args
  3. Authentication info

Since the '/c=.. /DirectLoadShell=true' is between the Game Exe and the Auth info, I suspect it's the Launch args defined inside installed.json and that either something is going wrong with the shlex.split or the params are just simply that

@mchubby
Copy link
Author

mchubby commented Oct 23, 2020

Yes, it's like this

    "can_run_offline": true,
    "egl_guid": "",
    "executable": "x64/Hades.exe",
    "install_path": "C:\\Users\\User/legendary\\Hades",
    "install_size": 12064852471,
    "is_dlc": false,
    "launch_parameters": "/c=..\\ /DirectLoadShell=true",
    "manifest_path": null,
    "needs_verification": false,
    "prereq_info": {
      "args": "",
      "ids": [
        "MS.NET4.5"
      ],
      "installed": true,
      "name": "MS.NET4.5",
      "path": "Dependencies/DotNet45Install.cmd"
    },
    "requires_ot": false,
    "save_path": null,
    "title": "Hades",
    "version": "36450-x64"

@CommandMC
Copy link
Contributor

CommandMC commented Oct 23, 2020

Well, remove the "launch_parameters" then (just leave "launch_parameters": "",)

@mchubby
Copy link
Author

mchubby commented Oct 23, 2020

Yes, it works this way, and with just "launch_parameters": "/c=.." as well.
Or manually quoted "launch_parameters": "'/c=..' '/DirectLoadShell=true'"

When manually quoting, the Hades.log file says

2020-10-23 02:53:37 [MainThread     ]          optionset.cpp:157   INFO| argument: /c=..
2020-10-23 02:53:37 [MainThread     ]          optionset.cpp:157   INFO| argument: /DirectLoadShell=true
2020-10-23 02:53:37 [MainThread     ]          optionset.cpp:157   INFO| argument: -AUTH_LOGIN=unused

vs argument: /c=.. /DirectLoadShell=true previously

I had a look in  .config\legendary\manifests\Min.manifest and extracted stuff with binwalk (zlib data)

It's really in there
 .................Min....36450-x64.....x64/Hades.exe...../c=..\ /DirectLoadShell=true........MS.NET4.5....MS.NET4.5.!...Dependencies/DotNet45Install.cmd...

@derrod
Copy link
Owner

derrod commented Oct 24, 2020

I assume this is due to shlex.split() misinterpreting the argument as a path... Thanks whoever decided arguments starting with a slash are a good idea. Turning off posix mode might work, but that might cause other issues elsewhere... I'll see if I can find a solution that won't break things.

@derrod derrod closed this as completed in d95fd20 Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants