microsoft / D3D9On12

The Direct3D9-On-12 mapping layer
MIT License
338 stars 37 forks source link

NULL_CLASS_PTR_READ_c0000005_d3d9on12.dll #58

Open erknkaya opened 1 year ago

erknkaya commented 1 year ago

Hello,

I've tried all known Intel Iris Xe drivers and they all get the same crash. I did a memory test with the app at https://memtest.org/ and it passed. When I disable the Intel Iris Xe device from the device manager, the problem is solved. The game usually crashes between 4 and 10 minutes.

Dmp file: https://drive.google.com/file/d/1a431zmOc6HDgvfPXnaN1J_oDNTascK9J/view?usp=sharing

I downloaded and recompiled the library to follow up on the problem. I saved the value of pResource->GetDesc()->Width from the InputAssembly::SetVertexBuffer method to the file until the game crashed.

I tried this game on many computers with up-to-date hardware, none of them have this problem.

Driver problem or d3d9on12 mapping layer?

Intel Community Link : https://community.intel.com/t5/Graphics/i7-12700H-Intel-Iris-Xe-Game-Crash-on-d3d9on12-dll/td-p/1426476

The last lines of the output (1)

bufferSize:112 bufferSize:112 bufferSize:112 bufferSize:112 bufferSize:112 bufferSize:32768 bufferSize:112 bufferSize:112 bufferSize:32768 bufferSize:112 bufferSize:32768 bufferSize:112 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:8810597777358030847 ->when it crashed

The last lines of the output (2)

bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:32768 bufferSize:16809754405499322002 -> when it crashed

    HRESULT InputAssembly::SetVertexBuffer(Device& device, Resource* pResource, UINT vbSlot, UINT offset, UINT stride)
    {
        HRESULT hr = S_OK;
        if (pResource) {
            LOG_("bufferSize", std::to_string(pResource->GetDesc().Width ? pResource->GetDesc().Width : 0));
        }

        const UINT64 bufferSize = pResource ? pResource->GetDesc().Width : 0;

        InputBuffer& inputBuffer = m_inputStreams[vbSlot];
        Resource* pPrevResource = m_inputStreams[vbSlot].GetAppResource();

System Information

  Time of this report: 11/10/2022, 17:51:30
         Machine name: ***
           Machine Id: {1867AEC7-407A-4918-9B2E-57E57CE1EC54}
     Operating System: Windows 11 Pro 64-bit (10.0, Build 22621) (22621.ni_release.220506-1250)
             Language: Turkish (Regional Setting: Turkish)
  System Manufacturer: HUAWEI
         System Model: RLEF-XX
                 BIOS: 1.23 (type: UEFI)
            Processor: 12th Gen Intel(R) Core(TM) i7-12700H (20 CPUs), ~2.3GHz
               Memory: 16384MB RAM
  Available OS Memory: 16110MB RAM
            Page File: 13580MB used, 6626MB available
          Windows Dir: C:\Windows
      DirectX Version: DirectX 12
  DX Setup Parameters: Not found
     User DPI Setting: 96 DPI (100 percent)
   System DPI Setting: 120 DPI (125 percent)
      DWM DPI Scaling: UnKnown
             Miracast: Available, with HDCP

Microsoft Graphics Hybrid: Not Supported DirectX Database Version: 1.4.3 DxDiag Version: 10.00.22621.0001 64bit Unicode

jenatali commented 1 year ago

I might've missed it in the problem description, but... what game?

erknkaya commented 1 year ago

Knight Online World Url : https://www.nttgame.com/knight/en

erknkaya commented 1 year ago

Is there a way to disable 9on12?

erknkaya commented 1 year ago

I was able to open the game with debug. At the time of the crash it looks like the first chunk is from the intel driver. I couldn't find the symbol files for the Intel DLLS files. So I can't see the call stacks.

I don't have enough knowledge about C++ and drivers. So I can't find the exact source of the problem.

1 2

HerMajestyDrMona commented 1 year ago

@erknkaya It seems like Intel released new drivers for the "better" DX9 support: https://github.com/microsoft/D3D9On12/issues/57#issuecomment-1349671011. Could you please check it out and let us know how it works?

erknkaya commented 1 year ago

@erknkaya It seems like Intel released new drivers for the "better" DX9 support: #57 (comment). Could you please check it out and let us know how it works?

Unfortunately it doesn't work. I tried versions 3959, 4032 and it doesn't work. I solve the problem with dxvk.