Unity ошибка d3d11

Every time I open unity, I try and open the project it takes like an hour and then this error happens:

Unity failed to present D3D11 swapchain due to device reset/removed.

It happens for all branches of the project and as far as I’m aware I didn’t do anything just checked out a later commit.

Thanks

asked Nov 17, 2020 at 18:12

MaxCulley's user avatar

Make sure D3Dcompiler_47.dll file is present in «C:Program FilesUnityHubEditorYour unity versionEditorDataTools» or «C:Program FilesUnityHubEditorYour unity versionEditor».

answered Nov 18, 2020 at 8:48

Easwar Chinraj's user avatar

Easwar ChinrajEaswar Chinraj

4361 gold badge4 silver badges10 bronze badges

1

Hi here is the solution.
This error comes due high load of graphics in the project.
step1: open your project in unity
step2:click «Edit» and then click «Project Settings»
step3:click»Quality»
step4:Then change levels to «low» then save it
step5:Exit from unity
step6:Restart your pc

watch vedio till end thanx

answered Oct 13, 2022 at 12:06

BILAL BILAL's user avatar

1


Go to unity


Unity keeps on crashing: failed to present d3d11 swapchain

Hey there. I’ve only gotten into Unity recently, and was until today working my way through the Pathways for learning. But it has now started crashing, pretty much constantly. It did so during my attempt to install Visual Studio, and it now does immediately upon opening the project I was working on for the guides.

I dumped about 2 hours of research into google, which suggested a variety of solutions that I tried and did not help:

— Updated my graphics drivers, or rather, made sure I had the current ones. I use a Geforce GTX 1660.

— Cleaned out my PC to counter potential heating problems (It was quite dusty, but it didnt help in the end)

— Downloaded and added a d3d11.dll file and dropped it into the unity editor folder. It was indeed missing, but re-adding it did not help.

— Checked if there is an additional graphics adapter running (Multiple videos suggested disabling any onboard adapters) but as far as I can see, it only shows my nvidia adapter.

— Tried adding registry entries, one called Tdrdelay and the ohter Tdrlevel, and setting them to various values between 0-3 (Different people reported they could only work on different numbers), but that seemingly did nothing.

Just to mention it again: It worked mostly fine up until the essentials guide reached visual studio and coding. I’ve had a crash or two before, but only rarely. Now I can’t open a project without it immediately crashing. If it matters, I had to change a color setting from «linear» to «gamma» for a step that required me to publish a Web GL project. Since I can’t enter the editor anymore, I can’t change it back to see if that helps.

I realize this is not a support forum, but I’ve exhausted my options (and willingness) to randomly try stuff from forumposts that were written years ago. I greatly appreciate any help anyone is willing to share.

Search Issue Tracker

Fixed in 2018.1.X

Fixed in 5.6.X, 2017.1.X, 2017.2.X, 2017.3.X

Steps to reproduce:

1. Download and open the attached project

2. Enter Playmode

3. Press «Play offline —> Tutorial»

4. Continue with the panels until the 11th one starting «Europe is divided into two subregions.»

Result: freeze leading to a crash

Reproduced 2017.1.2f1, 2017.2.0f3, 2017.3.0b4 on DirectX 11 and OpenGL

Not reproduced on 5.6.3p4* and on any version on DirectX 9

Regression introduced in 2017.1

Notes:

*-The bug was originally submitted as a dissapearance of UI elements. That appears to not happen, but instead the freeze happens right after

Verified FIXED 5.6.5f1, 2017.2.0p4, 2017.1.2p4, 2017.3.0f3, 2018.1.0a7

Copied from Discord:

«Hello, everyone. I am a Gaia Pro customer working on a newly built computer (Ryzen 5600X 6 core @3.9ghz, 128gb ddr4, 1tb M.2, Radeon RX 6700XT 12gb). I am receiving an error about a D3D11 swapchain when I try to follow the tutorial. I have tried using the very newest version of Unity, and I have also tried the LTS version 2020.3.25f1. I have poked around online, and it seems like this is a pretty common error that is thrown in a lot of situations, but the only one I encounter it in is when using Gaia Pro, specifically when spawning the biome.»

After posting this message in the discord, I continued to troubleshoot using the many fixes I found elsewhere online until I came on the one that worked, which I was later asked to document here for the benefit of the community. Here’s what I learned today.

The fix: 

https://docs.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys

Either setting the TdrLevel registry key to 0, or creating it with a level of 0 stops this error if it is being thrown because Gaia Pro is sending heavy workloads to the GPU.

Please note, you may find some fixes online that reference the TdrDelay registry key. This did not have any effect on the issue I encountered.

The reason this works:

Since Windows 8, Microsoft developers have increasingly begun to tackle the problem of the operating system becoming unstable because of a crashed or infinitely looping program that is using resources on the GPU. In previous versions of Windows, the blocked GPU could not be used by the operating system when it wanted to render itself over the unresponsive program, resulting in those bad crashes you sometimes got when gaming that required you to hold the power button or flip the surge protector in order to get the computer running again. They decided to fix this by essentially resetting the graphics driver when it is detected that the underlying device has been unresponsive for too long. The default period of unresponsiveness is 2 seconds before Windows detects this fault and reacts, which is more than enough for an environment with primarily CPU-heavy tasks (like an office or a server room), but is not enough for some legitimate GPU-heavy tasks, like image editing, 3d modeling, and some generation tasks in packages like Gaia Pro. Gaia is capable of sending enough work to even a very fast modern GPU to occupy it for more than 2 seconds (large textures, complex shaders), even with the built-in pipeline selected. The TdrLevel registry key simply controls how Windows behaves regarding this condition, and the value of 0 simply means «don’t even try to detect it anymore, just let the GPU go.» While this could potentially expose your system to those hangs that result from real errors, it will definitely resolve the issue of Gaia crashing Unity because of a false positive in Windows’ GPU responsiveness test.

The reason this doesn’t seem to work for everybody, or for every manifestation of this problem:

Unity seems to throw an identical error at any time the graphics driver is reset in this way while it is running, no matter what was being done or what the cause was. The TDR behavior is not the only Windows behavior that can prompt a graphics driver reset, which can potentially be caused by the GPU being sent invalid instructions because it has old or incorrect drivers, or things like overheating, insufficient power or voltage from the PSU or wall, or other kinds of intermittent failure. The GPU may also be set up to do computational tasks, such as if it runs CUDA, or if there are compute shaders in the scene, and this can cause some unexpected behavior regarding the driver. There is also the possibility that there may be a cascading failure, such as a memory issue that causes the driver to require a reload. This could possibly be the case when running graphics card management services that need to be paged because the memory load is very high, or which have some management features which are designed to interact with TDR (such as some NVidia cards). Some people report resolving this error by doing even more esoteric things, like disabling a VPN, for instance, or copying over an older version of a specific DLL. Everyone seems to be at their wits end with it, everywhere I looked.

Hopefully this helps someone down the road, because it doesn’t seem like anyone at Gaia or Unity has much power over it, and I have no idea if it’s even on Microsoft’s radar. Though maybe some people with a little more clout than I have could put it there if it becomes enough of a problem. Either way, thanks to everyone who supports Gaia, I’m loving it so far, now that I have gotten past this one.


Edited December 27, 2021 by SevenLZ

add dll reference

Ошибка Failed to present D3D11 swapchain due to device..

Выскакивает она если я сделаю в своей 2д игре более менее требовательное действие(факел поставлю).
Версия Unity 2021.1.25f1
Видеокарта Nvidia GTS 450
Стоят самые свежие драйвера на эту видеокарту

Скрин ошибки по этой ссылке

36

Nukiesto
UNец
 
Сообщения: 2
Зарегистрирован: 29 июл 2020, 17:51

Re: Ошибка Failed to present D3D11 swapchain due to device..

Сообщение Jarico 23 окт 2021, 19:00

Причины: разгон, нехватка памяти, высокая нагрузка видеокарты или видеокарта просто неподдерживает dx11
Купи новую видеокарту т.к. на старых затычках в юнити невозможно сидеть уже (с версии 2017)

Аватара пользователя
Jarico
Адепт
 
Сообщения: 1075
Зарегистрирован: 06 янв 2019, 17:37
Откуда: 0xDEAD
Skype: none
  • Сайт


Вернуться в Общие вопросы

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 15



Понравилась статья? Поделить с друзьями:
  • Unity ошибка cs1513
  • Unity ошибка cs1022
  • Unity ошибка cs1003
  • Unity ошибка cs0234
  • Unity ошибка cs0101