Steam version w/ XWAUP 1.6 crashes on mission launch

In here you can discuss what is going on in the project, offer help, praise or critique!
Post Reply

Steam version w/ XWAUP 1.6 crashes on mission launch

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 12:54 am

This has been driving me nuts. Vanilla steam version works fine. When I install XWAUP everything goes smoothly, the game launches fine, concourse etc all look great, but when I go to launch a mission it crashes. Campaign or quick missions both crash. If I go into pilot training, however, it will launch fine.

I've searched around online and tried various proposed fixes, but they all seem to be geared at different crashes - none of them work.

Any ideas?

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 4:26 pm

Hello,

You can try to install the latest version of the hooks and the ddraw dll.

To download the hooks, you can use XwaHooksSetup (you will find it in the Download section).
The latest version of the ddraw dll is here.

If you have multiple graphic cards on your computer, you can also check that you run the game with the best available one.

If the crash persists, please attach a crash report from the Events Viewer.

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 4:55 pm

Just the one graphics card. It's a GTX 970. System is an AMD 2700x with 16gb of ram, running off an SSD. I can provide more detailed system info if that would help. Everything works fine with vanilla Alliance, and I can launch the pilot training grounds fine. Just not actual battles, career or otherwise.

Here's the event properties info from the event log:

Log Name: Application
Source: Application Error
Date: 12/23/2019 11:50:47 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-0I8LL5S
Description:
Faulting application name: Alliance.EXE, version: 2.0.0.2, time stamp: 0x3765a9b7
Faulting module name: Alliance.EXE, version: 2.0.0.2, time stamp: 0x3765a9b7
Exception code: 0xc0000005
Fault offset: 0x0018ef96
Faulting process id: 0x6394
Faulting application start time: 0x01d5b9b117845a0d
Faulting application path: C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance\Alliance.EXE
Faulting module path: C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance\Alliance.EXE
Report Id: 7376d868-a05c-4200-b14f-628692750975
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-12-23T16:50:47.593609200Z" />
<EventRecordID>1219</EventRecordID>
<Channel>Application</Channel>
<Computer>DESKTOP-0I8LL5S</Computer>
<Security />
</System>
<EventData>
<Data>Alliance.EXE</Data>
<Data>2.0.0.2</Data>
<Data>3765a9b7</Data>
<Data>Alliance.EXE</Data>
<Data>2.0.0.2</Data>
<Data>3765a9b7</Data>
<Data>c0000005</Data>
<Data>0018ef96</Data>
<Data>6394</Data>
<Data>01d5b9b117845a0d</Data>
<Data>C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance\Alliance.EXE</Data>
<Data>C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance\Alliance.EXE</Data>
<Data>7376d868-a05c-4200-b14f-628692750975</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
Last edited by Cyrano4747 on Mon Dec 23, 2019 4:57 pm, edited 2 times in total.

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 4:55 pm

Oh, and I installed the latest version of the dll and the hooks before that generating that log.

Thanks a bunch.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 5:01 pm

Have you tried to launch "XWingAlliance.exe" directly instead of launching "Alliance.exe" ?

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 5:50 pm

Yeah. I have xwingalliance.exe renamed alliance.exe. Should have mentioned that earlier. It's the best way to get the steam controller to work via the overlay without having the joystick check screw you up.

The executables get renamed after the mod installations, so they're not missing any chances going on there.

That setup works just fine with vanilla, and the mod itself launches just fine. Proper screen resolutions in the concourse and the hanger, and the pilot proving grounds launch just fine. When you go to launch a mission it hard crashes a couple seconds after leaving the briefing, during the load screen before the hanger.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 6:03 pm

The main hook (DInput.dll) checks the executable name ("XWingAlliance.exe") to determine whether it is attached to the main game executable. If the name matches, then the main hook applies the patchs to the exe.
If the exe is renamed, the main hook thinks that it is not attached to the main game exe. So it doesn't apply the patches. This leads to a crash.

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 6:56 pm

The patches were applied before renaming the executables.

I'll go through and try a clean install to make double sure, though.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 7:10 pm

The patchs used by the hooks are applied at runtime. This means that they are not applied to the exe file. Instead they are applied to the in-memory image of the exe each time the hooks initialization code is executed. So when the exe is not named "XWingAlliance.exe", then the initialization code is not executed and the hooks' patches are not applied.

Rename the exe back to "XWingAlliance.exe" and the hooks should work.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 7:25 pm

An other option is to use xwa_hook_main_no_dinput.

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 7:40 pm

Just did totally clean install, on a separate drive to make double sure. Installed the game, launched it to make sure it works, installed XWAUP, installed the latest version of the dll and the hooks, renamed the exectuables.

Same crash as before. I can jump into the proving grounds just fine and fly around that loop, but when I launch a mission it crashes. The briefing works fine, it goes to the "review your briefing" screen, and then crashes after a few seconds. Hard crash, no "this program stopped responding" dialog or hang. It feels like it's dumping me when it is about ready to put me in the hanger. Note that the hanger works fine in the proving grounds.
JeremyaFr wrote:
Mon Dec 23, 2019 7:25 pm
An other option is to use xwa_hook_main_no_dinput.
What's that do?

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Dec 23, 2019 7:50 pm

:kopfwand: :kopfwand: :kopfwand:

DO NOT RENAME EITHER OF THE EXECUTABLES, DO NOT TOUCH THEM, LEAVE THEM ALONE!!

There are 2 shortcuts on your descktop, one is for the launcher the other is a quickstart which is linked to XwingAlliance.exe USE THESE
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 8:04 pm

Ok, using those (and the exes back to their original names) it doesn't launch at all because it won't detect a joystick.

The .exe work around let me launch the game and use a controller (steam controller, as that's what I have).

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 8:27 pm

The purpose of xwa_hook_main_no_dinput is to apply the hooks patches at runtime without relying on dinput.dll.
# xwa_hook_main
This is the main dll hook that is used to call other hooks. A hook is a way to inject code into the exe.

# xwa_hook_main_no_dinput
If you use a custom Dinput.dll, it will conflict with this hook. In this case, use xwa_hook_main_no_dinput instead of xwa_hook_main.
With xwa_hook_main_no_dinput, the dinput dll is not needed. You apply the patch present in the zip to the xwa exe file. Then at runtime, the xwa exe will call the hooks_main dll and the patches will be applied.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Dec 23, 2019 8:32 pm

Cyrano4747 wrote:
Mon Dec 23, 2019 8:04 pm
Ok, using those (and the exes back to their original names) it doesn't launch at all because it won't detect a joystick.

The .exe work around let me launch the game and use a controller (steam controller, as that's what I have).
Because a steam controller is not a joystick, it's a pad, you really need a proper joystick to play this game.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 8:45 pm

Well, I've played the campaign in vanilla a few times with the controller fine. The thumb joystick isn't ideal but it works. I don't have a joystick so this is kind of where I am. Given that I can run it vanilla I'm not all to eager to buy a single use peripheral.

The reason I'm asking here, with the mod knowledge that is present, is because the game itself seems to work. Like I've said, it launches fine and all of the various components seem to work fine. I can get into the flight trials with no problem and fly around using all the various craft and the new cockpits. The hanger works fine, all of it. It's just when I load up an actual mission it crashes hard. I was hoping there might be some insight on what the difference is that's causing that crash.

The fact that it works otherwise but there is a very predictable, very reproducible crash that isn't as simple as the flight engine being borked somehow and the fact that my normal setup works fine for the vanilla game is why I suspect it goes beyond just needing a joystick.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Dec 23, 2019 9:04 pm

Yes but your using the steam version of XWA, Steam themselves have added stuff to the Executables, XwingAlliance.exe and Alliance.exe changing the size of the files.

When patching a vanilla version of Steam XWA the patch does not work, rendering the craft upgrades useless, because of different POVs and stats to the original craft stats

To get around this when you install XWAUCP or DSUCP, they both replace the Steam versions of XwingAlliance.exe and Alliance.exe with the original 1999 CD version of XwingAlliance.exe and Alliance.exe, so they can be patched correctly.

Therefore a Steam controller will no longer work. Sorry, but Steam had no right adding crap to the executables, GOG never did this!
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 9:10 pm

IIRC, Reimar added support for Steam controller in his version of the ddraw dll. Maybe you can give it a try.

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 9:16 pm

Any idea why steam version of the game would work XWAUP version of the pilot proving grounds but not the missions? Using the controller in the proving grounds incidentally.

I'm not trying to cause problems or an argument over what steam has or hasn't done. It's the version of the game I have and the controller I have. I just find it bizarre that I can fly around with the new models etc in one part of the game (proving grounds) but not another (missions).
JeremyaFr wrote:
Mon Dec 23, 2019 9:10 pm
IIRC, Reimar added support for Steam controller in his version of the ddraw dll. Maybe you can give it a try.
Got a link?

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 23, 2019 9:20 pm

There is a link at the bottom of the Download section.

Cyrano4747
Cadet 4th Class
Posts: 10
Joined: Mon Feb 18, 2019 5:27 pm

Post by Cyrano4747 » Mon Dec 23, 2019 9:27 pm

Got it. Same behavior. Crash on mission launch, but the pilot proving grounds work fine.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Tue Dec 24, 2019 5:16 am

No. Use that ddraw.dll without renaming the executables. The solution is not renaming the executables; the solution is to get your Steam controller working by some other means. (Frankly, I can't imagine how renaming the executables gets the steam controller working in the proving grounds in the first place.)

I suspect the reason the proving grounds work but the missions crash is that the proving grounds don't have any of the new models (which crash the game if the runtime patches aren't applied) in them. (Except the player ship model & cockpit, of course. I'm finding that a bit mysterious as well.)

Turgidson
Cadet 2nd Class
Posts: 52
Joined: Sun Aug 25, 2019 10:02 pm

Post by Turgidson » Tue Dec 24, 2019 2:01 pm

Cyrano4747 wrote:
Mon Dec 23, 2019 8:45 pm
Well, I've played the campaign in vanilla a few times with the controller fine. The thumb joystick isn't ideal but it works. I don't have a joystick so this is kind of where I am. Given that I can run it vanilla I'm not all to eager to buy a single use peripheral.
A second-hand stick would cost around 10 bucks or so... I do think it's worth it. XWA was meant to be played with joystick and keyboard (just look at the numerous keys and key combinations!), a gamepad won't be the best experience by far...
Darksaber wrote:
Mon Dec 23, 2019 9:04 pm
[...]
Sorry, but Steam had no right adding crap to the executables, GOG never did this!
I don't know what kind of contract Steam negociated with LucasArts... Maybe were allowed to tamper with the exe, in which case it's fine. If not, then it's fishy but I doubt LucasArts would complain...
For sure, the simplest thing is to avoid the Steam version.
keiranhalcyon7 wrote:
Tue Dec 24, 2019 5:16 am
No. Use that ddraw.dll without renaming the executables. The solution is not renaming the executables; the solution is to get your Steam controller working by some other means. (Frankly, I can't imagine how renaming the executables gets the steam controller working in the proving grounds in the first place.)
[...]
I don't own a Steam Controller, so I don't know how Windows recognises it (As a game input device? As something else?).

Third-party software like Joystick Gremlin can be used to emulate a virtual joystick from multiple devices, maybe it could take a Steam Controller as an input.

Post Reply