D3D11_BUFFER_DESC BufferDesc;
ZeroMemory(&BufferDesc, sizeof(BufferDesc));
BufferDesc.ByteWidth = Length * FormatSize;
BufferDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE;
BufferDesc.Usage = D3D11_USAGE_DEFAULT;
pD3DSys->pGetDevice()->CreateBuffer(&BufferDesc, &SRData, &pBuffer);
Where Length = 16384 and FormatSize = 4 meaning that BufferDesc.ByteWidth = 65536.
Please note that when Length = 8191 I do not get the same error.
I could swear I've created larger buffers than that in the past. And I would be very surprised if it means I'm running out of memory on my GPU as I have 1gb memory on it and the other buffers I create before that are small.
EDIT: the messages I am getting are like follows.
First-chance exception at 0x652d8c1a in 034.exe: 0xC0000005: Access violation reading location 0x002fe000.
Unhandled exception at 0x652d8c1a in 034.exe: 0xC0000005: Access violation reading location 0x002fe000.