Mesa-3D icon indicating copy to clipboard operation
Mesa-3D copied to clipboard

Batman Arkham City rendering thread exception NineDevice9_DrawIndexedPrimiteUP

Open Macribit opened this issue 7 years ago • 14 comments

I get a error message on Arkham City at NineDevice9_DrawIndexedPrimiteUP. I attach a screenshot. rendering thread error screenshot_20170326_011133

Macribit avatar Apr 03 '17 22:04 Macribit

does it crash almost instantly, or after some time ?

axeldavy avatar Apr 04 '17 06:04 axeldavy

it crashes instantly, if I disable nine it doesn't crash.

Macribit avatar Apr 04 '17 13:04 Macribit

I mean after the message appears it crashes and won't run anymore. But the message appears at the end of the benchmark.

Macribit avatar Apr 04 '17 13:04 Macribit

If in device9.c

in the beginning of NineDevice9_DrawIndexedPrimitiveUP

you add user_assert(NumVertices, D3D_OK); does it work better ?

If not I'd need a debug log with the crash (NINE_DEBUG=all . It needs mesa compiled with --enable-debug)

axeldavy avatar Apr 04 '17 20:04 axeldavy

like this HRESULT NINE_WINAPI user_assert(NumVertices, D3D_OK); NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,

Macribit avatar Apr 04 '17 20:04 Macribit

the line should look like this

NineDevice9_DrawIndexedPrimitiveUP( user_assert(NumVertices, D3D_OK);

Macribit avatar Apr 04 '17 20:04 Macribit

NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This, D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, const void *pIndexData, D3DFORMAT IndexDataFormat, const void *pVertexStreamZeroData, UINT VertexStreamZeroStride ) { struct pipe_vertex_buffer vbuf; struct pipe_index_buffer ibuf;

DBG("iface %p, PrimitiveType %u, MinVertexIndex %u, NumVertices %u "
    "PrimitiveCount %u, pIndexData %p, IndexDataFormat %u "
    "pVertexStreamZeroData %p, VertexStreamZeroStride %u\n",
    This, PrimitiveType, MinVertexIndex, NumVertices, PrimitiveCount,
    pIndexData, IndexDataFormat,
    pVertexStreamZeroData, VertexStreamZeroStride);

user_assert(pIndexData && pVertexStreamZeroData, D3DERR_INVALIDCALL);
user_assert(VertexStreamZeroStride, D3DERR_INVALIDCALL);
user_assert(IndexDataFormat == D3DFMT_INDEX16 ||
            IndexDataFormat == D3DFMT_INDEX32, D3DERR_INVALIDCALL);
user_assert(PrimitiveCount, D3D_OK);
user_assert(NumVertices, D3D_OK);

vbuf.stride = VertexStreamZeroStride; vbuf.buffer_offset = 0; vbuf.buffer = NULL; vbuf.user_buffer = pVertexStreamZeroData;

axeldavy avatar Apr 04 '17 21:04 axeldavy

strange the first time I tried the fix it crashed with segmentation fault (no error message), but then when debugging it didn't crashed and the benchmark completed.

Macribit avatar Apr 04 '17 23:04 Macribit

I tried again and this time it crashed with the same error message. Do you need a debug log of a crash, because I have a log that didn't crashed...

QA_APPROVED_BUILD_JANUARY_2011 424000 11-04-2012 15:05.24 (Wwise: 2011.1.0 #3886) Game

Address = 0xf686abe9 (filename not found) [in ] Address = 0xf678aba2 (filename not found) [in ] Address = 0xf686b91c (filename not found) [in ] Address = 0xf699b415 (filename not found) [in ] Address = 0xf6a028d7 (filename not found) [in ] WineNineDevice9_DrawIndexedPrimitiveUP() Address = 0xf7393ca7 (filename not found) [in C:\windows\system32\d3d9.dll] Address = 0xba80ef (filename not found) [in Z:\resaca\arkhamcity\Binaries\Win32\BatmanAC.exe]

Macribit avatar Apr 04 '17 23:04 Macribit

ok sorry! I didn't read carefully. I'll try to get a crash debug log. Maybe it takes me a while to get it because the benchmark took two hours to complete.

Macribit avatar Apr 05 '17 01:04 Macribit

I can't reproduce the error with the demo. I'd really like a crash log with NINE_DEBUG=all (and mesa built with --enable-debug)

axeldavy avatar Sep 09 '18 09:09 axeldavy

sorry I didn't answer before I ran the benchmark several times but with NINE_DEBUG=all it doesn't crash.

Macribit avatar Sep 10 '18 06:09 Macribit

I erased the logs because I thought they wouldn't be useful . I'll try to run the benchmark again. But I clearly remember spending a whole day trying to make it crash but with NINE_DEBUG=all, I couldn't make it crash.

Macribit avatar Sep 10 '18 06:09 Macribit

Maybe debug build doesn't trigger the bug. Could you run with csmt_force=0 NINE_DEBUG=all then when you are at a point of the benchmark where you know it would crash, you kill the app (alt+f4 usually). That way I know the log would have been hit at about the end of the log. csmt_force=0 removes the internal multithreading, thus logs are in-order and easier to read.

axeldavy avatar Sep 10 '18 09:09 axeldavy