Hook_D3d.dll Bug Report

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Hook_D3d.dll Bug Report

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

Post by Darksaber » Mon May 04, 2020 2:10 pm

I've found a bug with Hook_D3d.dll

I tracked it down by first replacing DDraw.dll for older versions which didn't help as the problem persisted

I only went back as far as 1.1.3.6

I then removed each one of the hooks start with the newest dated, when it came to Hook_D3d.dll I removed it and the problem went away

I then went back to Ddraw.dll 1.1.3.10 again it was fine

I better show you the bug, and explain, while in the hangar I noticed while pressing the numberpad keys to look around that the shadows and transparency of the craft and objects kept disappearing, wait a few minutes and they would reappear then again disappear

Keypad 1
like so
flightscreen1a.jpg
.
then they appear and disappear sporadically
.
flightscreen2a.jpg
.
Keypad 3
.
flightscreen3a.jpg
.
You can see the workstand shadow has clearly gone, but look at the only craft they have no shadows, then the workstands shadow appears but the othe craft shadows are still missing
.
flightscreen4a.jpg
.
These are with the Hook_D3d.dll removed, this is how it should look with every transparency and shadows
.
flightscreen5a.jpg
.
flightscreen6a.jpg
.
So Jeremy could you possibly take a look at the Hook_D3d.dll please :)
Thank you
You do not have the required permissions to view the files attached to this post.
“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
Commander
XWAU Member
Posts: 2737
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon May 04, 2020 3:08 pm

Thanks for the bug report.
I will take a look.

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

Post by Darksaber » Tue May 05, 2020 5:57 pm

Or this! Bump!
“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
Commander
XWAU Member
Posts: 2737
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue May 05, 2020 6:57 pm

I can't reproduce the problem. :(

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

Post by Darksaber » Tue May 05, 2020 8:07 pm

I think you've have 4 releases of this hook and each one I get disappearing shadows and transparency's

Is this hook actually necessary?
“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
Commander
XWAU Member
Posts: 2737
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue May 05, 2020 8:16 pm

The purpose of this hook is to improve performance of the game 3d engine.
If you don't have performance issue then the hook is not necessary.

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

Post by Darksaber » Tue May 05, 2020 8:20 pm

To be brutally honest I don't actually play the game, I just test stuff in skirmish and the proving grounds lol

Don't you need this hook for Blue Max's effects though?
“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
Commander
XWAU Member
Posts: 2737
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue May 05, 2020 8:36 pm

I think it can work without.

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

Post by Darksaber » Tue May 05, 2020 8:37 pm

Thanks for everything :)
“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

Kampher
Cadet 2nd Class
Posts: 68
Joined: Tue May 09, 2006 11:01 pm

Post by Kampher » Tue May 05, 2020 9:09 pm

Just as a test I turned this hook off and it fudges with dynamic cockpits and Blue's effects. I would leave this on.

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

Post by Darksaber » Tue May 05, 2020 9:11 pm

at present I don't have them installed
“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
blue_max
Lieutenant Commander
XWAU Member
Posts: 1425
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu May 07, 2020 4:45 pm

Kampher wrote:
Tue May 05, 2020 9:09 pm
Just as a test I turned this hook off and it fudges with dynamic cockpits and Blue's effects. I would leave this on.
Sorry; but this is not true. To properly disable the hook_d3d you need to remove/disable the DLL and also modify the cfg file to say "IsHookD3DEnabled = 0". I just double-checked and all the effects and DC work fine even with this hook disabled... unless you did something else, of course, in which case feel free to report the bug again.

Since we're in this topic: Jeremy, I updated my hooks using your tool yesterday and the default setting for "IsHookD3DEnabled" seems to be 0. So, this causes the geometry to be messed up since the hook is actually present in the downloads (I just copied all the files downloaded from the tool into my XWA directory).

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

Post by JeremyaFr » Thu May 07, 2020 6:09 pm

UPDATE
I've updated the d3d hook. Now it is enbaled by default.

It was disabled by default because it requires a DDraw update. Now the the DDraw dll supports it, the hook can be enabled by default. I've changed that.

Kampher
Cadet 2nd Class
Posts: 68
Joined: Tue May 09, 2006 11:01 pm

Post by Kampher » Thu May 07, 2020 7:13 pm

blue_max wrote:
Thu May 07, 2020 4:45 pm
Kampher wrote:
Tue May 05, 2020 9:09 pm
Just as a test I turned this hook off and it fudges with dynamic cockpits and Blue's effects. I would leave this on.
Sorry; but this is not true. To properly disable the hook_d3d you need to remove/disable the DLL and also modify the cfg file to say "IsHookD3DEnabled = 0". I just double-checked and all the effects and DC work fine even with this hook disabled... unless you did something else, of course, in which case feel free to report the bug again.

Since we're in this topic: Jeremy, I updated my hooks using your tool yesterday and the default setting for "IsHookD3DEnabled" seems to be 0. So, this causes the geometry to be messed up since the hook is actually present in the downloads (I just copied all the files downloaded from the tool into my XWA directory).
Hi Blue. I merely deleted the .dll but forgot to tell the cfg file to say "IsHookD3DEnabled = 0". My mistake!

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1425
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu May 07, 2020 7:23 pm

Kampher wrote:
Thu May 07, 2020 7:13 pm
Hi Blue. I merely deleted the .dll but forgot to tell the cfg file to say "IsHookD3DEnabled = 0". My mistake!
No worries, glad we got to the bottom of this.

@Jeremy: Thanks!

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4980
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sun Sep 20, 2020 1:34 am

JeremyaFr wrote:
Mon May 04, 2020 3:08 pm
Thanks for the bug report.
I will take a look.
I can confirm this issue is still happening and it can really mess up the hangar. This happens in the Proving Grounds and Calamaris.
The hangar roof lights are not illuminated in every number pad position.
As the droids or cranes move then they will sometimes turn on.
bug1.jpg

Also the shadows under the workstands are flickering in and out and you can see glitches at times.
I tried to take pics but it's too quick and ramdom.
bug2.jpg

By disabling Hook_D3d.dll and setting the Hooks.ini to IsHookD3DEnabled = 0 the issue does not appear and is ok.
Obviously this will not be good as it does effect the new Wireframe Effects such as wireframe and the game jerks.

The issue isn't there in a normal version with NO effects installed as far as I can see.
Latest hook but I included it just in case.
You do not have the required permissions to view the files attached to this post.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

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

Post by JeremyaFr » Sun Sep 20, 2020 3:13 pm

Hello,
Does this happen with the new effects DDraw dll only, or also with the golden DDraw dll?

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4980
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sun Sep 20, 2020 4:42 pm

JeremyaFr wrote:
Sun Sep 20, 2020 3:13 pm
Hello,
Does this happen with the new effects DDraw dll only, or also with the golden DDraw dll?
I have had several random results. The only sure thing I can tell you is when Hook_D3d.dll is disabled and renamed the issue is fixed.

I've moved hooks and DDraw and it makes no difference. I've got a test install that has Effects installed on and it works perfectly!
Yet other ones the issue is always there. Here's something that may help.

Install 1: DDraw dll - 1.3.11.0 = No issues. This has NEVER had Effects installed on it.

Install 2: DDraw dll - 1.1.4.1. VR = issues, with Effects ON

Install 2a: DDraw dll - 1.3.11.0 = Issues. Copied the DDraw over without removing the Effects normally. The issue is there. I've also had some crashes.

Jeremy load up our WIP04 test from the Beta forum. Normally the easiest way to see it is by pressing NumPad 2 and waiting a bit.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
DTM

Fleet Admiral (Administrator)
Posts: 1791
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Sun Sep 20, 2020 5:36 pm

I confirm the problem. I experimented it few days ago, when I was setting up the Hangar Objects for the new Calamari Hangar. I supposed there was a problem with my new hangar opt, BUT than I used the same Hangar Objects settings with the old hangar, and this bug happened also using the old hangar...it looks linked also with the number or type of objects present into the hangar (?) I use DDraw dll - 1.1.4.1. VR

MTD industries
WIPs: REBCP version 2

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

Post by JeremyaFr » Sun Sep 20, 2020 7:08 pm

WIP

Hello,
You can try that:

EDIT: link removed

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Sun Sep 20, 2020 7:21 pm

Nope still loosing shadows, transparent meshes and engine glows, also if you leave the Hook_D3D.dll in the main folder, but disable it in the Hooks.ini enter the pilot proving ground, all you see it stars

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

Post by JeremyaFr » Sun Sep 20, 2020 7:42 pm

An other test:

Code: Select all

<Patch Name="[WIP] fix render states initializing">
  <Item Offset="197B2D" From="8B15CC1C7B00C70215000000A1CC1C7B00C74004010000008B0DCC1C7B0083C108890DCC1C7B00" To="8B55C4909090C702150000008B45C49090C74004010000008B4DC490909083C108894DC4909090" />
  <Item Offset="197B66" From="A1CC1C7B00C700150000008B0DCC1C7B00C74104040000008B15CC1C7B0083C2088915CC1C7B00" To="8B45C49090C700150000008B4DC4909090C74104040000008B55C490909083C2088955C4909090" />
  <Item Offset="197B8F" From="A1CC1C7B00C700150000008B0DCC1C7B00C74104020000008B15CC1C7B0083C2088915CC1C7B00" To="8B45C49090C700150000008B4DC4909090C74104020000008B55C490909083C2088955C4909090" />
</Patch>

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Sun Sep 20, 2020 7:50 pm

Ok tested that, I still have no shadows or transparent meshes with number pad keys 2,3 and 9

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4980
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sun Sep 20, 2020 10:43 pm

JeremyaFr wrote:
Sun Sep 20, 2020 7:08 pm
WIP
Hello,
You can try that:
Sorry no difference.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1425
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Sep 21, 2020 5:50 am

I updated my hook_d3d.dll and the hook_hangar.dll and I see no issues. I also downloaded Jeremy's WIP hook_d3d above, and things still look fine. I mean, the shadows don't look perfect in the hangar (they seem to have transparency -- that's a bug in my ddraw), but they are there and everything else looks fine.

I don't think I've got any custom hangars installed, though. Does this happen with a specific hangar perhaps?

Post Reply