Scaless / HaloTAS

Halo: Combat Evolved PC Speedrunning Tools
MIT License
6 stars 2 forks source link

Crash on opening of Halo Program #10

Closed LiquidDeath911 closed 4 years ago

LiquidDeath911 commented 4 years ago

Describe the bug After all 3 opening sequences are played or skipped, the game will show the main screen for a split second and then crash. By main screen I mean the screen where the Campaign, Multiplayer, and Settings buttons are.

To Reproduce

  1. Open Game
  2. Skip opening scenes or let them play out
  3. Game crashes.

Log File Here is what the log says (I will also attach it): [17:40:11.214] [-W-] [thread 3728] Failed to create directory (HaloTASFiles) [17:40:11.214] [-W-] [thread 3728] Failed to create directory (HaloTASFiles/Recordings) [17:40:11.214] [-W-] [thread 3728] Failed to create directory (HaloTASFiles/Recordings/_Autosave) [17:40:11.214] [-W-] [thread 3728] Failed to create directory (HaloTASFiles/Plugins) [17:40:11.214] [-W-] [thread 3728] Failed to create directory (HaloTASFiles/Patches) [17:40:11.214] [-I-] [thread 3728] ===== HaloTAS Started ===== [17:40:11.214] [-I-] [thread 3728] Current working directory: C:\Program Files (x86)\Microsoft Games\Halo [17:40:19.157] [-C-] [thread 3728] Couldn't create dummy d3d9 device.

HaloTAS.log

Other Info The first time I opened the Halo game it crashed. The second time I opened the Halo game, this time with admin rights (right click and Run as Administrator), and the game opened and I was able to load up the first level of the campaign.

After that, I quit the campaign and closed Halo. Now I haven't been able to open it since. This above log file is only updated when I run Halo as Admin. So I am guessing the Tas stuff doesn't even try to start when the game is run normally.

Scaless commented 4 years ago

Hello, thanks for the report :)

Running the game as admin is generally needed for the TAS programs due to the injection and such that it is doing.

Can you add -novideo and -window to your game shortcut to skip the starting videos and start the game in windowed mode. The TAS program has issues with the game running in fullscreen.

The program also has known issues with Intel integrated graphics if you are using a laptop or low spec desktop.

Unfortunately I will probably not be making any code changes or debugging this too much since my focus going forward will be on the MCC version of the game.

LiquidDeath911 commented 4 years ago

I understand about not fixing things on this, especially if you are working on MCC.

Here is what is happening now though: I start the Halo program It immediately goes to the main screen Then it starts looping the same short bit of music and I am unable to use my mouse. Its about 2 seconds of music before looping. I have to use CTRL+ALT+DEL to open task manager to force quit the game.

Also, I am in the last year of my computer engineering degree. So I am a bit more technically savvy than the normal person, so feel free to ask more detailed questions.

Edit I forgot to mention, the tas log file gives no extra info since nothing crashes or happens.

Scaless commented 4 years ago

Based on your log it looks like it would be failing here:

https://github.com/Scaless/HaloTAS/blob/master/HaloTAS/TASDLL/tas_hooks.cpp#L110

Since this isn't a "clean" exit from the DLL it is understandable that it would cause the hanging issues you are seeing. If you want to build the project yourself you can alter the D3DPRESENT_PARAMETERS or CreateDevice parameters to find ones that might work with your graphics driver.

LiquidDeath911 commented 4 years ago

Well I finally got it working (well by working I mean Halo is open and the HaloTAS window is also open. I haven't actually tried to do anything else yet). So this issue can be closed!

Here is what happened and what I did (so that if anybody else ends up having the same issue they know what I did)

So I tried altering the TASDLL file like you said. It took me a while to get everything setup so that I could build the .dll after making those changes. I had to download the GLFW stuff and also rebuild Boost to include all of the types of libraries because I didn't have the static libraries that your visual studio project was using, only the dynamic libraries. That took forever to figure out.

After all that, I finally got the .dll built with the changes I made. Then I started getting this error: [16:43:05.780] [-E-] [thread 7112] GLFW Error 65544: Win32: Failed to register window class: Class already exists. [16:43:05.781] [-C-] [thread 7112] Failed to initialize GLFW

Well, after banging my head against the wall for a bit. I decided to take off the "-novideo" parameter on the Halo shortcut and voila! everything worked!

Here are the specifics if anybody needs to make the same changes I did. In the tas_hooks.cpp file, I changed the parameter D3DDEVTYPE_HAL to D3DDEVTYPE_REF. Then also take off the "-novideo" parameter from the Halo shortcut, but leave the "-window" parameter.

LiquidDeath911 commented 4 years ago

Also, Scaless, if you need help working on the TAS stuff for MCC I would love to be a part of a project like this. If you do need or want help on this stuff you can message me on discord, my username is LiquidDeath911#3588

Scaless commented 4 years ago

Very cool that you got it working!

There's a HaloTAS discord server that a few people are in if you would like to join: https://discord.gg/XhkUyGD. There's not much activity right now since I'm mostly working on getting co-op world records instead of doing TAS stuff but maybe soon :)

If you are interested in general Halo speedrunning stuff you can also check out https://haloruns.com/ and join the HaloRuns discord: https://discord.gg/5wrYz6b