cai567890 / pcsx2

Automatically exported from code.google.com/p/pcsx2
1 stars 0 forks source link

Shader Suite crash not isolated to only D3D11. #1462

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1) Did the game ever work correctly (i.e. not have this problem) on the
Official PCSX2 build or an earlier version of PCSX2 playground?
(If so, please specify the latest pcsx2-playground or Official revision
that last worked.)

Not a game issue

2) What steps will reproduce the problem?
1. Use GSDX9
2. Enable FXAA
3. Run fullboot

3) What exactly happens when you experience this issue (listing any console
errors or screen output you receive)?

PCSX2 crashes,
Debugging points to a block of code in GSDevice9.cpp similar to that in 
GSDevice11.cpp patched in r5804

4) What version of PCSX2 are you using? On what operating system? Plugins?

5801 - 5804

6) Attachments.
Crash dumps
http://www.mediafire.com/download/94bzx4ekztwlg82/CrashDumps.7z

Original issue reported on code.google.com by danialho...@gmail.com on 12 Jan 2014 at 7:39

GoogleCodeExporter commented 9 years ago
Getting an Assertion failed error on Line 1441 with debug binaries,

Line 1441 as marked is part in this block of code

void GSDevice9::CompileShader(const char* fn, const string& entry, const 
D3DXMACRO* macro, IDirect3DPixelShader9** ps)
{
    uint32 flags = 0;

    if(m_shader.level >= D3D_FEATURE_LEVEL_9_3)
    {
        flags |= D3DXSHADER_AVOID_FLOW_CONTROL;
    }
    else
    {
        flags |= D3DXSHADER_SKIPVALIDATION;
    }

    vector<D3DXMACRO> m;

    PrepareShaderMacro(m, macro);

    HRESULT hr;

    CComPtr<ID3DXBuffer> shader, error;

    hr = D3DXCompileShaderFromFile(fn, &m[0], NULL, entry.c_str(), m_shader.ps.c_str(), flags, &shader, &error, NULL);

    if(SUCCEEDED(hr))
    {
        hr = m_dev->CreatePixelShader((DWORD*)shader->GetBufferPointer(), ps);
    }
    else if(error)
    {
        printf("%s\n", (const char*)error->GetBufferPointer());
    }

    ASSERT(SUCCEEDED(hr));  <<<<<<<< 1441

    if(FAILED(hr))
    {
        throw GSDXRecoverableError();
    }
}

Original comment by danialho...@gmail.com on 12 Jan 2014 at 8:26

GoogleCodeExporter commented 9 years ago
the crashes occuring in DX9 are rectified by making the same changes to 
GSDevice9 cpp and h as were made to GSDevice11 in r5804

Original comment by danialho...@gmail.com on 12 Jan 2014 at 9:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
as for that crash in the debug build rama, i've checked to make sure all nvidia 
settings are application default for pcsx2 and that nothing is injecting into 
the process

Heres the pdb, dmp and sse4 binary i can generate it with

http://www.mediafire.com/download/hdvnq3mgu60kucs/debug_plugins.7z

Original comment by danialho...@gmail.com on 12 Jan 2014 at 10:06

GoogleCodeExporter commented 9 years ago
and heres the patch for GSDevice9

Original comment by danialho...@gmail.com on 12 Jan 2014 at 10:09

Attachments:

GoogleCodeExporter commented 9 years ago
************* Symbol Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       
SRV*c:\symbols\win7_64*http://msdl.microsoft.com/download/symbols
Symbol search path is: 
SRV*c:\symbols\win7_64*http://msdl.microsoft.com/download/symbols
Executable search path is: 
Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Sun Jan 12 23:45:16.000 2014 (UTC + 11:00)
System Uptime: not available
Process Uptime: 0 days 0:00:27.000
................................................................
...................
Loading unloaded module list
................................................................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(36b88.3cdd0): Access violation - code c0000005 (first/second chance not 
available)
eax=00000000 ebx=0b11e9f4 ecx=06b06200 edx=06b08f9c esi=00000002 edi=00000000
eip=77bc015d esp=0b11e9a4 ebp=0b11ea40 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!ZwWaitForMultipleObjects+0x15:
77bc015d 83c404          add     esp,4
0:010> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** WARNING: Unable to verify checksum for pcsx2.exe
*** ERROR: Module load completed but symbols could not be loaded for pcsx2.exe
*** WARNING: Unable to verify checksum for w32pthreads.v4.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for 
w32pthreads.v4.dll - 
*** WARNING: Unable to verify timestamp for nvd3dum.dll
*** ERROR: Module load completed but symbols could not be loaded for nvd3dum.dll

FAULTING_IP: 
d3d9!CD3DBase::SetRenderTarget+da
60c19ed8 8b9088000000    mov     edx,dword ptr [eax+88h]

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 60c19ed8 (d3d9!CD3DBase::SetRenderTarget+0x000000da)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 0000008b
Attempt to read from address 0000008b

CONTEXT:  00000000 -- (.cxr 0x0;r)
eax=00000000 ebx=0b11e9f4 ecx=06b06200 edx=06b08f9c esi=00000002 edi=00000000
eip=77bc015d esp=0b11e9a4 ebp=0b11ea40 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!ZwWaitForMultipleObjects+0x15:
77bc015d 83c404          add     esp,4

PROCESS_NAME:  pcsx2.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced 
memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced 
memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1:  00000000

EXCEPTION_PARAMETER2:  0000008b

READ_ADDRESS:  0000008b 

FOLLOWUP_IP: 
d3d9!CD3DBase::SetRenderTarget+da
60c19ed8 8b9088000000    mov     edx,dword ptr [eax+88h]

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

APP:  pcsx2.exe

ANALYSIS_VERSION: 6.3.9600.16384 (debuggers(dbg).130821-1623) amd64fre

FAULTING_THREAD:  0003cdd0

BUGCHECK_STR:  APPLICATION_FAULT_NULL_CLASS_PTR_READ_BEFORE_CALL

PRIMARY_PROBLEM_CLASS:  NULL_CLASS_PTR_READ_BEFORE_CALL

DEFAULT_BUCKET_ID:  NULL_CLASS_PTR_READ_BEFORE_CALL

LAST_CONTROL_TRANSFER:  from 08ab3ce8 to 60c19ed8

STACK_TEXT:  
0b11f09c 08ab3ce8 06b06200 00000000 00200100 d3d9!CD3DBase::SetRenderTarget+0xda
0b11f0ec 08ab29eb 0b11f2e8 00000000 00000000 
GSdx32_SSE4!GSDevice9::OMSetRenderTargets+0x48
0b11f1a0 08ab2fe4 080df7e0 ffffffff 0b11f210 
GSdx32_SSE4!GSDevice9::StretchRect+0x6b
0b11f284 08b1a8e3 ffffffff 0b11f2e8 08aac65b GSdx32_SSE4!GSDevice9::DoFXAA+0x1c4
0b11f2e8 08ade189 00000001 0a5ab1a8 0a5a8440 
GSdx32_SSE4!__sse2_available_init+0x1ed4
0b11f3e0 08ade29d 0a5a8440 00000001 00000000 GSdx32_SSE4!GSRenderer::Merge+0x6f9
0b11f544 08ae432a 00002000 00000000 08aa3d7c GSdx32_SSE4!GSRenderer::VSync+0xfd
0b11f550 08aa3d7c 00002000 00000000 00000000 
GSdx32_SSE4!GSRendererHW::VSync+0x2a
0b11f594 012ccffe 00002000 030caf90 763c1499 GSdx32_SSE4!GSvsync+0xac
WARNING: Stack unwind information not available. Following frames may be wrong.
0b11f604 0113e38f 030caf90 763c1499 0113f450 pcsx2+0x20cffe
0b11f67c 0113e88a 030caf90 011271a0 005408b8 pcsx2+0x7e38f
0b11f6f8 6f0720e2 030caf90 00000000 00000000 pcsx2+0x7e88a
0b11f74c 6d75c556 030caf90 388c3450 00000000 w32pthreads_v4!ptw32_throw+0x222
0b11f784 6d75c600 00000000 0b11f79c 763c336a msvcr100!_endthreadex+0x3f
0b11f790 763c336a 080f13c8 0b11f7dc 77bdbf32 msvcr100!_endthreadex+0xce
0b11f79c 77bdbf32 080f13c8 f356749b 00000000 kernel32!BaseThreadInitThunk+0xe
0b11f7dc 77bdbf05 6d75c59c 080f13c8 00000000 ntdll!__RtlUserThreadStart+0x70
0b11f7f4 00000000 6d75c59c 080f13c8 00000000 ntdll!_RtlUserThreadStart+0x1b

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  d3d9!CD3DBase::SetRenderTarget+da

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: d3d9

IMAGE_NAME:  d3d9.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  4ce7b7b3

STACK_COMMAND:  ~10s; .ecxr ; kb

FAILURE_BUCKET_ID:  
NULL_CLASS_PTR_READ_BEFORE_CALL_c0000005_d3d9.dll!CD3DBase::SetRenderTarget

BUCKET_ID:  
APPLICATION_FAULT_NULL_CLASS_PTR_READ_BEFORE_CALL_d3d9!CD3DBase::SetRenderTarget
+da

ANALYSIS_SOURCE:  UM

FAILURE_ID_HASH_STRING:  
um:null_class_ptr_read_before_call_c0000005_d3d9.dll!cd3dbase::setrendertarget

FAILURE_ID_HASH:  {0dc8a791-b7d9-bea6-2c4d-fa3abf9457d9}

Followup: MachineOwner
---------

Original comment by danialho...@gmail.com on 12 Jan 2014 at 12:48

GoogleCodeExporter commented 9 years ago
Thanks for this and the patch, looking at it :)

Original comment by ramapcsx2.code on 13 Jan 2014 at 8:17