FPlatformProcess::GetDllHandle causes deadlock when loading opencv_world

// 5.2.0
"48 89 5C 24 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 D9 48 81 EC C0 00 00 00 48 8B 05 F5 0A B3 00",
2 Likes

Could you desript how to get this string?

It’s tricky. Disassemble UnrealEditor-core.dll, find address of the GetDllHandle procedure (use UnrealEditor-core.pdb for proc. name), and copy bytes of native code from this address.

2 Likes
	#if ENGINE_PATCH_VERSION == 0
		"48 89 5C 24 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 D9 48 81 EC C0 00 00 00 48 8B 05 F5 0A B3 00", // 5.2.0
	#elif ENGINE_PATCH_VERSION == 1
		"48 89 5C 24 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 D9 48 81 EC C0 00 00 00 48 8B 05 55 0B B3 00", // 5.2.1
	#endif
1 Like

“48 89 5C 24 20 55 56 57 41 54 41 55 41 56 41 57 48 8B EC 48 81 EC 80 00 00 00 48 8B 05 D7 51 B9 00 48 33”, // 5.1.1

This string is applicable to 5.1.1

Is 5.3.2 also possible? I tried as you explained, but I couldn’t find it.

Just in case anybody still needs it

UE 5.4.4

	const char* Variants[] = {
		"48 89 5C 24 20 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 D9 48 81 EC A0 00 00 00 48 8B 05 7D 12 C1 00 48 33 C4 48 89 45 1F 4D 8B E0 4C 8B EA",
}

Instruction:

  1. Get some disassembler. For example, IDA Pro.
  2. Open in it UnrealEditor-Core.dll with default settings. Click “Yes” to load .pdb file as well.
  3. In functions window, find for FModuleTrace::OnDllLoaded.
  4. Switch second window from assembler to hex mode.
  5. Copy some machine code from first byte of the OnDllLoaded function, long enough to make this sequence unique.
  6. Paste it into FixDeadLock() function in the MediaPipeModule.cpp with respect to engine minor version and patch version.
1 Like