[UE 5.8.3][Editor] Apple Silicon Mac: iOS device detection never backs off, because FDeviceQueryTask resets RetryQuery on every pass

Summary

FDeviceQueryTask::QueryDevices (Engine/Source/Developer/IOS/IOSTargetPlatformControls/Private/IOSDeviceHelper.cpp) is meant to stop querying after five empty results from idevice_id. It decrements RetryQuery (line 379). Once the counter drops below zero, it logs “IOS device listing is disabled for 1 minute (too many failed attempts)!” and calls Enable(false). On an Apple Silicon editor that never happens:

  • Under PLATFORM_MAC_ARM64, HasOtherDevices is set to true for the local-Mac dummy device (line 353).
  • So the empty-output branch does not return (lines 391-394), and execution falls through to RetryQuery = 5; (line 396).
  • That resets the counter, which goes 5, 4, 5, 4 and never drops below zero.

On x86_64 Macs HasOtherDevices is false, the branch returns before the reset, and the backoff works.

The result is that an arm64 editor launches idevice_id every 10 seconds for its whole session, however often it fails. When the launch itself fails, each poll logs two warnings. That happens with the x86_64-only binaries on a Mac without Rosetta, reported here: [UE 5.8.3][Editor] Apple Silicon Mac: the Mac libimobiledevice tools are x86_64-only, so the editor logs a failed idevice_id launch every 10 seconds when Rosetta is not installed
One session logged 1,240 warning lines in 103 minutes, where the backoff should have stopped after 12 (six failed polls).

Suggested fix: reset the counter only after a non-empty result:

if (OutStdOut.Len() == 0)
{
    RetryQuery--;
    // ... unchanged ...
}
else
{
    RetryQuery = 5;
}

What Type of Bug are you experiencing?

Platform Mobile

Steps to Reproduce

Reading the code is the shortest route (the line numbers above). To observe it:

  1. Use an Apple Silicon Mac where idevice_id produces no output, for example one without Rosetta 2 (see the linked report).
  2. Install Xcode with the iOS platform, so the device poll starts.
  3. Open any project in the UE 5.8.3 editor from the launcher.
  4. Watch the Output Log for longer than a minute.

Expected Result

After five consecutive empty results the query is disabled, as it is on x86_64 Macs. The log then shows at most six polls’ worth of failures.

Observed Result

Polling continues every 10 seconds for the whole session: 1,240 warning lines in a 103-minute session, with no sign of the backoff.

Tested on UE 5.8.3 (launcher build, CL 58210709), macOS 27.0.1, Xcode 27.1, Apple Silicon.

Affects Versions

5.8

Platform(s)

Mac

Additional Notes

The Verbose message says listing is disabled “for 1 minute”. But nothing in FDeviceQueryTask turns it back on: bCheckDevices changes only through Enable(), and from outside the class only through FIOSDeviceHelper::EnableDeviceCheck. If one minute is the intent, the fix needs a re-enable timer too.

Not measured here, but it follows from the same code: on an Apple Silicon Mac with Rosetta and no iOS device connected, idevice_id succeeds with empty output. That takes the same branch, so it is launched every 10 seconds indefinitely, though nothing is logged.