Unreal freezes on creating blueprint from an Actor

Hey there @BARISINCIR! Welcome to the community! The workaround Cuppelli mentioned in this comment seems to be working, I’ll translate it to Turkish below, this translation was automated so there may be errors.


Bu çeviri otomatik olduğundan hatalar olabilir.

Merhaba @BARISINCIR! Topluluğumuza hoş geldin! Cuppelli’nin bu yorumda bahsettiği çözüm işe yarıyor gibi görünüyor, aşağıda bunu Türkçe’ye çevireceğim.

Konu hakkında önemli bilgilere sahibim. Minimum gereksinimleri büyük ölçüde karşılayabilen bir dizüstü bilgisayara sahibim. Sorunla karşılaştım ve çözümleri İnternet’te araştırmaya çalıştım.

Sonunda, burada bazı kişilerin dizüstü bilgisayarlarla aynı sorunu yaşadığını gördüm ve sorunu çözenlerden birinin harici bir monitör kullanarak sorunu çözdüğünü gördüm.

Dizüstü bilgisayarların mimarisi, harici grafik kartının dizüstü bilgisayarın kendi monitöründe şeyleri göstermek için CPU’daki entegre olanla BİRLİKTE çalışmasına izin vermek üzere tasarlanmıştır (bu çoğu dizüstü bilgisayar için bir zorunluluktur). Ancak, dizüstü bilgisayarımın anakartında MUX Anahtarı adı verilen bir özellik bulunmaktadır. Bu özellik, grafik kartının entegre GPU olmadan dizüstü bilgisayarın monitörünü kullanmasına olanak tanır.

Yukarıdaki kişilerden biri, sorunu harici bir monitör kullanarak çözdü (bu zorunluluğu tamamen ortadan kaldırır) ve ben de bahsettiğim GPU’nun zorunluluğundan kaynaklanan bir sorun olabileceğini düşündüm. Ayrıca, dizüstü bilgisayarımın MUX Anahtarını açtım ve bir nesnenin viewport üzerinde bir sınıf oluşturmayı denedim ve sorun çözüldü.

Merhabalar, Şu an FBX dosyasını da içeri aktarırken sorun yaşıyorum ve aynı şekilde donmaya neden oluyor, Epic dosyasını tamamen baştan kurmama rağmen sorun halen aynı devam ediyor

@SupportiveEntity I’m also experiencing this same issue on a brand new Microsoft Surface Laptop Studio 2 with the RTX 4050. Thank you @TheyCallMeTej for the fix. With that being said, it’s also happening on other windows as well, but appears to be due to the same bug.

From my understanding, it seems to be happening on computers using a display of non-standard resolutions. For example, this laptops native resolution is 2,400x1,600. I wonder if Unreal Engine is thinking there is a second monitor, when there isn’t. This is making work with Unreal Engine quite cumbersome.

Merhabalar, eğer bu doğru bir adım olacaksa sizin için de ben sorunu çözdüm.
Şöyle ki ben en son sürümü kullanıyordum 5.3.2 ve bu kaldırıp 5.2.1 sürümünü indirdim ve hata tamamen kalktı bilginiz olsun

thank you so much for the solution

I spent a long time looking into this, and I just opened a PR to UnrealEngine with a patch that fixes this issue on my end: https://github.com/EpicGames/UnrealEngine/pull/11316 - we’ll see if Epic takes a look! I’ll need some help from them to determine if this is an acceptable solution.

In short, it appears that this bug occurs on the DX12 side when one thread is trying to create the swap chain, and thread is trying to destroy a window’s back buffer. I’m honestly not certain of the root cause though, as these are dark magicks I do not meddle with often.

For me, I was only able to replicate this consistently when creating a new GameMode blueprint, but it occured every time. As many of you identified, the bug appears when creating a new window and can be circumvented by simply configuring your editor to open in a new tab instead. But because this occurs in the DX12 world, another workaround is to change your project’s config to not use DX12 in Project Settings → Platform → Windows → Default RHI.

During a freeze, I saw in my debugger one thread was already frozen on a mutex that was added to the back buffer destruction, so I knew at the very least another thread was attempting this. There was some nearby code to this swap chain creation that already claimed that window association cannot happen when the back buffer is freed - and my theory was that swap chain creation cannot happen for a similar reason. You have to pass a window reference after all, so I figured it could do a similar operation under the hood. So, I basically threw in another mutex when we create the swap chain - and it worked!

As for the underlying cause for why these two things cannot occur, it appears in the original commit that introduced this mutex that it could be a bug in the DX12 DGGI, which would require a fix from Microsoft. Until then, this is working for me, but I’d understand if there is a larger scale fix that Epic may prefer instead.

Anyway, hope someone found this helpful or interesting! I’ll send an email to someone on the Epic side who works on DX12 and hopefully they can look into a hotfix for this - it really is an annoying bug.

1 Like

Oh fantastic work! Hopefully the PR gets reviewed soon as this issue has been rather persistent and my handful work workarounds only work in some scenarios. Do you mind if I pass around the PR link for users to implement on their own in the meantime?

1 Like

Go for it, but of course it’s only relevant for those who wish to build the engine from source - since this issue appears to affects a lot of new users, they may not wish to go to all the trouble.

So it appears the best solution is to recommend people to do is one of the following:

  • Option 1 (Easy): Set “Asset Editor Open Location” to “Main Window” in Editor Preferences.
  • Option 2 (Easy): Change the Default RHI in Project Settings → Platform → Windows to be something other than DX12, DX11 appears to work.
  • Option 3 (Hard): Build Unreal from source with this patch applied: https://github.com/EpicGames/UnrealEngine/pull/11316
2 Likes

I use a Dell XPS 15 with Ubuntu 22.04 (GNOME). I experienced the same issue, but noticed it works correctly when Unreal runs with the dedicated card. As I use VSCode as my IDE, what I found out to work fine for me is to run VS Code with my NVidia card (right click and press on “Launch using Discrete Graphics Card”), so then any process it spawns inherits the config and runs on the discrete GPU, including running UnrealEngine 5. This is so far the cleanest solution I found to get it to work without needing to care about these details too much :blush:

option1 works! and it’s so easy, thank you so much!

Update: this should now be fixed in Unreal 5.4.0, the code patch I linked to previously was included in this release. If possible, update your project to 5.4.0+ and this should be resolved, otherwise see the above workarounds.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.