[SOLVED] Think I found a gen-u-ine bug

  • Martigen
  • Topic Author
More
7 years 4 months ago - 7 years 4 months ago #1 by Martigen Think I found a gen-u-ine bug was created by Martigen
1) Reshade works perfectly with Dishonored 2. Awesome!
2) Add Ioxa's latest shaders (Love Ioxa. Ioxa is the MAN and/or WOMAN. Love Ioxa!) -- reshade.me/forum/shader-presentation/270...ioxa-for-reshade-3-0
3) Load up Dishonored 2. Shift-F2. While playing with shaders, CTD after around 30 secs.
4) Re-load, repeat, CTD after about 30 secs.
5) Remove the new .fx files, re-load -- Dishonored 2 plays fine.

Process of elimination, this shader is causing the game to CTD:
Warning: Spoiler!

This the end of the log file when it crashes:
13/12/2016 21:56:34:388 [02712] | INFO  | Loading image files for textures ...
13/12/2016 21:56:34:469 [02712] | INFO  | > Resizing image data for texture 'lensDBTex' from 1024x576 to 1920x1080 ...
13/12/2016 21:56:34:524 [02712] | INFO  | > Resizing image data for texture 'lensDB2Tex' from 1024x576 to 1920x1080 ...
13/12/2016 21:56:34:618 [02712] | INFO  | > Resizing image data for texture 'texDirt' from 1024x576 to 1920x1080 ...
13/12/2016 21:57:00:415 [02712] | INFO  | Redirecting 'RegisterRawInputDevices(00007FFF97120BD0, 1, 16)' ...
13/12/2016 21:57:00:415 [02712] | INFO  | > Dumping device registration at index 0:
13/12/2016 21:57:00:415 [02712] | INFO  |   +-----------------------------------------+-----------------------------------------+
13/12/2016 21:57:00:415 [02712] | INFO  |   | Parameter                               | Value                                   |
13/12/2016 21:57:00:415 [02712] | INFO  |   +-----------------------------------------+-----------------------------------------+
13/12/2016 21:57:00:415 [02712] | INFO  |   | UsagePage                               | 0x1                                     |
13/12/2016 21:57:00:415 [02712] | INFO  |   | Usage                                   | 0x6                                     |
13/12/2016 21:57:00:415 [02712] | INFO  |   | Flags                                   | 0x200                                   |
13/12/2016 21:57:00:415 [02712] | INFO  |   | TargetWindow                            | 0000000000040470                        |
13/12/2016 21:57:00:415 [02712] | INFO  |   +-----------------------------------------+-----------------------------------------+
You can see it dies after about 26 seconds. I seem to remember a mode for the old Reshade for more advanced diagnostics, let me know if I can assist further.

Mart
Last edit: 7 years 4 months ago by Martigen.
The following user(s) said Thank You: Ioxa

Please Log in or Create an account to join the conversation.

  • Ioxa
More
7 years 4 months ago #2 by Ioxa Replied by Ioxa on topic Think I found a gen-u-ine bug
It looks like some brackets got lost in the copying and pasting.
This line
color = tex2D(SurfaceSharpFinalSampler, texcoord + float2(sampleOffsetsX * ReShade::PixelSize.x, sampleOffsetsY * ReShade::PixelSize.y) * SharpOffset).rgb;
should look like this
color = tex2D(SurfaceSharpFinalSampler, texcoord + float2(sampleOffsetsX[i] * ReShade::PixelSize.x, sampleOffsetsY[i] * ReShade::PixelSize.y) * SharpOffset).rgb;
And this line
factor = normpdfE(diff,sigma)*sampleWeights;
should look like this
factor = normpdfE(diff,sigma)*sampleWeights[i];
I wouldn't think that would be enough to cause a CTD though, so maybe there is another issue somewhere.

Please Log in or Create an account to join the conversation.

  • Martigen
  • Topic Author
More
7 years 4 months ago - 7 years 4 months ago #3 by Martigen Replied by Martigen on topic Think I found a gen-u-ine bug

Ioxa wrote: It looks like some brackets got lost in the copying and pasting.

I think that may have been me putting it into Spoiler tags above, didn't use Code as it was long.

Just re-copied the shader from your thread, and double-checked those lines above anyway, all looked complete. Added it back to the shader dir for Reshade to load in Dishonored 2, and it CTDs after 30 secs.

I wouldn't think that would be enough to cause a CTD though, so maybe there is another issue somewhere.

Agreed, hence it might be showing up a bug in Reshade that could occur for other shaders in future.

What games did you test it with? Maybe this is limited to D2, though that would be weird. Could also be a function of perhaps other shaders I am loading in combination. Too many variables, will wait to hear from Crosire for enabling more detailed logging.

Incidentally -- the CTD happens without actually enabling the Surface Sharpen shader. Just having it in Reshade's Shader dir and loading at initialization is causing this.
Last edit: 7 years 4 months ago by Martigen.

Please Log in or Create an account to join the conversation.

  • Martigen
  • Topic Author
More
7 years 4 months ago #4 by Martigen Replied by Martigen on topic Think I found a gen-u-ine bug
Whelp I solved it, but I'm not marking the thread solved as it's still tripping up Reshade, in case Crosire wants to put in a fix.

So I loaded another game, XCOM2, and no crash with Surface Sharpen. But I did see this: when using the drop-down option boxes -- and this is hard to explain -- but after the stock provided options Reshade was trying to render more lines constantly in the drop-down box, creating a kind of Matrix-esque ascii character blur and rapidly appearing and disappearing scrollbar as it freaked out.

Checking Surface Sharpen the drop-down box (first one) code is:
ui_items = "\Smoothstep\0Smootherstep\0Techni\0SinWave";
And I noticed other shaders are formatted more like this:
ui_items = "Off\0On\0";
So on a whim changed the Surface Sharpen code to match:
ui_items = "Smoothstep\0Smootherstep\0Techni\0SinWave\0";
And... bingo, no freaky Matrix ascii scrolling in Reshade in XCOM2.

Then loaded up Dishonoured 2 because, surely this couldn't be it? And... no CTD!

I think I've seen this formatting in some of your other shaders Ioxa, so maybe update those.
The following user(s) said Thank You: Ioxa

Please Log in or Create an account to join the conversation.

  • crosire
More
7 years 4 months ago #5 by crosire Replied by crosire on topic Think I found a gen-u-ine bug
Please never do this:
ui_items = "Smoothstep\0Smootherstep\0Techni\0SinWave";
Always end it with a final "\0". I should add a check for that. Because otherwise you'll get a buffer overflow and all kinds of funky things can happen.
The following user(s) said Thank You: Ioxa

Please Log in or Create an account to join the conversation.

  • Ioxa
More
7 years 4 months ago #6 by Ioxa Replied by Ioxa on topic Think I found a gen-u-ine bug
Glad you figured it out. I would not have thought something like that could cause CTDs but I'll be sure to put the \0 on the end in the future.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.