Editor performance issue - too many threads spawned

Since 4.14 I’ve noticed sometimes when I load up the editor the performance drops down to unusable levels and I have to restart. It’s hit or miss as to whether it happens, but when it does it’s always right away.

This time I broke into the debugger and found that the editor process had over 3000 threads. A look at the output window showed heaps of ‘The thread 0x5410 has exited with code 0 (0x0).’ messages, so it looks like something is constantly spawning short-lived threads.

All the extra threads are listed as follows:

[ID]	0	Worker Thread	ntdll.dll thread	ntdll.dll!00007ffd872998a4	Normal

They are all at the same memory location in ntdll.dll.

The output window shows the following just after map check completes, and it looks like this doesn’t show up on the times the editor runs without issue:

Exception thrown at 0x00007FFD84337788 in UE4Editor.exe: Microsoft C++ exception: wil::ResultException at memory location 0x000000CA5473DC80.
Exception thrown at 0x00007FFD84337788 in UE4Editor.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFD84337788 in UE4Editor.exe: Microsoft C++ exception: wil::ResultException at memory location 0x000000CA5473D950.
Exception thrown at 0x00007FFD84337788 in UE4Editor.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

Hello ,

Thank you for reporting this issue. I’ll start looking into this but I wanted to ask a couple questions first. Does this issue occur in any project that you use in the editor or is it only with your main project? Does it happen before you even open a project, such as when the Unreal Project Browser is opened?

Actually the thread spawning is also triggered again when hitting ‘Stop’, so it seems it’s in some more core section of code than map load.

Hi Matthew. I’ve managed to track this down.
I have Microsoft’s Japanese IME installed on my system as an alternative input method. The thread spawning problem occurs only when this is active.

Certain context changes in the editor cause slate widgets to be rebuilt, and the issue is within the FSlateEditableTextLayout constructor which is invoked for every SEditableText in the editor at this time. This call here, and then specifically this line, will create a new thread when the IME is active, but otherwise does not.

I have that enabled as well but haven’t noticed this; What version of Windows are you on? I do know that the majority of issues that we run into with Microsoft IME are usually OS specific so it may be this case with this one as well.

I’m using Windows 10, and it looks like this happens every time the editor is started with Japanese input enabled (it has to be selected currently in the language bar, not merely installed).

Thank you for that information. I’m still looking into this but having to get this all setup on a Windows 10 machine so it’s taking me a while. I’ll let you know when I have more information.

Hello , I apologize for not responding here sooner but I was not able to reproduce the issue that you were reporting. Are you still experiencing this issue on the latest version of the editor?