Troubleshooting: Steam preparation window closes without further notice and running the exe shows the error 0xc000007b.

Last modified by stefan on 2023/08/15 16:20

Note that these steps are specific to exactly the described issue.

If your issue diverts just slightly from the following symptoms, it's very likely you have a different issue and these steps are not suitable for your needs. In this case please contact Egosoft support via the support forums or send a mail to support@egosoft.comhttp://www.egosoft.com:8282/jira/images/icons/mail_small.gif.

Symptoms

If you run the game from Steam, Steam displays the following dialog and then the dialog closes without any further notice:

steam_startup.png

If you try to start the game directly (aka: double click the game exe instead of starting the game via Steam) the following error pops up:

startup_error.png

Steps to resolve the issue

Verify game files

This will ensure that you are not suffering problems with missing or corrupted files in X Rebirth itself.

Steam

  1. In Steam go to the "Library" section and select "X Rebirth".
  2. Right-click on "X Rebirth" and select "Properties".
  3. Click on "Local Files" and "Verify Integrity of game cache".
  4. Once the verification is finished, restart your computer and try to start the game again.

GOG

  1. In GOG select "X Rebirth".
  2. Click on More -> Manage Installation -> Verify & Repair...
  3. Click on Verify Game
  4. Once the verification is finished, restart your computer and try to start the game again.

If this doesn't solve the problem, continue with the next step.

Correcting missing or corrupted DirectX DLLs

These steps ensure that there were no problems during the installation of X Rebirth, which might have resulted in missing system DLLs and will also fix certain DLL corruptions which might have caused the problem.

Steam

  1. In Steam go to the "Library" section and select "X Rebirth".
  2. Right-click on "X Rebirth" and select "Properties".
  3. Click on "Local Files" and "Browse Local Files...".
  4. Go to the "_CommonRedist/DirectX/Jun2010" folder and run dxsetup.exe.
  5. In the dialog that follows, accept the license, click on "Next" twice and wait for DirectX to finish the setup.
  6. Click on Finish.
  7. Restart your computer and try to start the game again.

GOG

  1. In GOG select "X Rebirth".
  2. Click on More -> Manage Installation -> Show Folder
  3. Go to the "__redist\DirectX" folder and run dxsetup.exe.
  4. In the dialog that follows, accept the license, click on "Next" twice and wait for DirectX to finish the setup.
  5. Click on Finish.
  6. Restart your computer and try to start the game again.

If that still didn't fix the problem, continue with the following step.

Detect DLL 32-bit vs. 64-bit mismatch

  1. Download Dependency Walker (64-bit): http://www.dependencywalker.com/depends22_x64.zip
  2. Extract the files to a local folder.

Steam

  1. In Steam go to the "Library" section and select "X Rebirth".
  2. Right-click on "X Rebirth" and select "Properties".
  3. Click on "Local Files" and "Browse Local Files..."

GOG

  1. In GOG select "X Rebirth".
  2. Click on More -> Manage Installation -> Show Folder

GOG and Steam

  1. Drag-and-drop the "XRebirth.exe" file onto "depends.exe" in the folder into which you just extracted DependencyWalker.
  2. If the lowest frame contains at least one entry stating (in red): "Error: Modules with different CPU types were found." you are suffering a 32-bit vs. 64-bit DLL mismatch issue (marked with number 2 in the following screenshot):
    dependency_walker.png

If you don't see this error, you are running into a different problem. If you still have exactly the same symptoms described above, please leave a comment and provide your dwi file (see below).

Resolve DirectX DLL 32-bit vs. 64-bit mismatch

In the upper left frame you should find one entry with at least one red icon (number 1 in the screenshot above).

ONLY IF THE FILENAME NEXT TO THE RED ICON IS ONE OF THE FOLLOWING FILES, FOLLOW THE STEPS BELOW

The next steps will only solve your issue, if one of these files are causing the problem. Otherwise you need some different solution and these steps won't help you. Please leave a comment in this case so the instructions can be updated/extended.

  • D3D9.DLL
  • D3DX9_43.DLL
  • DINPUT8.DLL
  • X3DAUDIO1_7.DLL
  • XAPOFX1_5.DLL
  • XINPUT1_3.DLL

Steps to resolve the issue:

  1. Close DependencyWalker.
  2. Go to the "C:\Windows\system32" folder and rename the file you identified before (for instance XINPUT1_3.DLL) to something else (like: XINPUT1_3.bak) or move it out of the system32 folder.
  3. Steam: Go into the "_CommonRedist/DirectX/Jun2010" folder (in the X Rebirth directory) and run dxsetup.exe.
    GOG: Go into the "__redist/DirectX" folder (in the X Rebirth directory) and run dxsetup.exe.
  4. Start the game.

If this didn't help, please contact us by mail at support@egosoft.com or leave a comment pointing out that you followed these steps without success and provide your DWI file.

Saving the Dependency Walker Image (DWI) file

To save the current Dependency Walker Image to a file in order to send it to Egosoft support follow these steps:

  1. In Dependency walker select File -> Save As.
  2. Make sure "Dependency Walker Image (*.dwi) is selected in the "Save as type" box.
  3. Save the dwi file.

Technical background information

The startup error code 0xc000007b translates to STATUS_INVALID_IMAGE_FORMAT and indicates that either the executable itself (unlikely) or some dynamically loaded executable (most likely) have an invalid format. Invalid format can mean that the file is corrupted (unlikely) or has a different format (most likely). In most cases this is indicating that a 32-bit application tries to load some 64-bit DLL or vise versa.
 The way Windows loads DLLs went through several iterations over the time Windows evolved. Several changes were done in favor to protect the user against viruses and malware. As part of this, the way application load DLLs changed several times and the actual behavior doesn't only depend on the application but also on the OS the application runs in as well as security fixes which are installed (or absent) on the target system.
 For an application to ensure that the proper DLLs are loaded there are several ways to go. One way is to prevent the use of DLLs altogether and link the corresponding libraries statically into the executable. For X Rebirth we moved over to statically linked libraries progressively (the latest related change at the time of writing this was done in version 4.0 where we now link the Visual Studio runtimes directly in the game executable).
 For users this means that it's less likely to run into startup problems when DLLs are corrupted or mismatch.

The other way for applications to ensure the OS is loading the correct DLL is to include the required information in the executable's manifest. Simply speaking: the manifest contains information for the OS about how the executable is expected to be run and what its dependencies are.

For X Rebirth we are planning to incorporate this information in a following patch so to further reduce the cases for players running into these startup issues.