- Home /
Unity Crash - Texture2D.ReadPixels - Only Occurs in Builds on certain Machines
Okay, so I'm working on a game that has a feature where the player can take photographs using a camera in a specific scene. These are saved into memory and can be viewed by the player in a window within this scene. In this window, they can also delete photos they have taken. When the player is satisfied, they can leave the scene and the photos they have taken, which are saved into memory, are saved into a folder within the project (if it is being tested in the editor) or a folder next to the executable (if it is a build). The issue I am having (And this issue is specific to my machine, the other people on my team have not encountered it) is that while this system works fine in the editor, in a build, the moment I click the mouse to take a photo, the game crashes. Here is the text from the error log right before the crash:
(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/Standalon>ePlayerGenerated/UnityEngineDebug.cpp Line: 49)
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 8400 [0x887A0005]
d3d11: failed to create index buffer of size 420 [0x887A0005]
d3d11: failed to create vertex buffer of size 9248 [0x887A0005]
d3d11: failed to create index buffer of size 1290 [0x887A0005]
d3d11: failed to create vertex buffer of size 9248 [0x887A0005]
d3d11: failed to create index buffer of size 1150 [0x887A0005]
d3d11: failed to create custom index buffer of size 63990 [887a0005]
Crash!!!
If anyone has some advice, even if it is just a place to start, I would greatly appreciate it. This scene and code aren't mine, but since it is only occurring on my machine it's kind of fallen to me to fix it for now.
Your answer
Follow this Question
Related Questions
Assets Usage: unity crashes because of too many Image Assets, how to deal with this? 3 Answers
iOS crash with "Memory pressure" error - too many sprites? 0 Answers
Editor Crashes when spawning 1k objects 2 Answers
Several Memory Optimization Questions 0 Answers
Why does Unity crash? (and other programs in general) 1 Answer