Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BloodRayne 2 crashes on startup #78

Closed
WinterSnowfall opened this issue Jan 3, 2023 · 3 comments · Fixed by #122
Closed

BloodRayne 2 crashes on startup #78

WinterSnowfall opened this issue Jan 3, 2023 · 3 comments · Fixed by #122
Labels

Comments

@WinterSnowfall
Copy link

The intro videos play, choppy as hell, and then the game crashes before getting to the main menu. I've captured a trace that doesn't reproduce the crash, unfortunately, but captures the problem with the intro videos (I'm hoping that's our main culprit here anyway).

Software information

BloodRayne 2 (Terminal Cut, but without using Ziggurat's d3d8.dll wrapper)

System information

  • GPU: Intel Xe (TigerLake GT2)
  • Driver: ANV/Mesa 23.0
  • Wine version: 7.22 Staging
  • DXVK version: d0f5903 (noticed first on 0.10)

Apitrace file(s)

rayne2.tar.xz

Log files

@AlpyneDreams AlpyneDreams added game bug Something isn't working crash labels Jan 30, 2023
@WinterSnowfall
Copy link
Author

I did a bisect, because BloodRayne 2 used to work just fine sometime prior to 0.10 (aside from the fact that it crashed on exit). Sure enough, seems like something in D3D8Subresource broke it:

bc25a3133bbba811e54e8055d238dcd51206574c is the first bad commit
commit bc25a3133bbba811e54e8055d238dcd51206574c
Author: Alpyne <[email protected]>
Date:   Fri Nov 18 04:34:38 2022 -0800

    [d3d8] Add D3D8Subresource

 src/d3d8/d3d8_subresource.h | 61 +++++++++++++++++++++++++++++++++++++++++++++
 src/d3d8/d3d8_surface.h     | 23 +++++++++--------
 src/d3d8/d3d8_texture.h     |  2 +-
 src/d3d8/d3d8_volume.h      | 13 ++++------
 4 files changed, 79 insertions(+), 20 deletions(-)
 create mode 100644 src/d3d8/d3d8_subresource.h

I'll see if I can figure out more.

@WinterSnowfall
Copy link
Author

*sigh* Looks like the game doesn't like d8vk holding refs to the container texture in subresources. Commenting out as follows makes it work again:

    // Refing subresources implicitly refs the container texture,
    ULONG STDMETHODCALLTYPE AddRef() final {
      //if (m_container != nullptr)
        //return m_container->AddRef();

      return Resource::AddRef();
    }

    // and releasing them implicitly releases the texture.
    ULONG STDMETHODCALLTYPE Release() final {
      //if (m_container != nullptr)
        //return m_container->Release();

      return Resource::Release();
    }

Not sure if the game simply expects dangling subresources to be a thing, or what is the best way to address this...

Something is probably broken anyway even with the above, because the game crashes on exit (as it did before the regression).

@WinterSnowfall
Copy link
Author

WinterSnowfall commented Jan 31, 2023

#95 will fix the initial crash, but as mentioned above the game will still crash on exit. (no longer the case with latest master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants