flutter icon indicating copy to clipboard operation
flutter copied to clipboard

[iOS 27] Debug mode very slow on first screen navigation on physical device (Flutter 3.50.1)

Open renneralexandre opened this issue 1 week ago • 2 comments

Steps to reproduce

  1. Physical iPhone 16 Pro on iOS 27.2.1, USB cable, Xcode 27.2 (27B52), macOS 27.2.1.
  2. Flutter 3.50.1 stable (Swift Package Manager disabled for the project).
  3. Run a medium-sized app in debug mode, either with flutter run or by launching from Xcode and then flutter attach.
  4. Open screens the app has not shown yet in this session.

Expected results

Debug-mode performance similar to iOS 26 on the same device and project: first navigation to a screen is reasonably fast.

Actual results

  • The first time any screen/menu is opened it is very slow (seconds); opening the same screen again is fast.
  • Heavier screens (a long list screen with many images) barely open.
  • Console repeatedly shows Gesture: System gesture gate timed out.
  • The same project on the same device was fine before updating to iOS 27 / macOS 27.

With flutter run (LLDB debugging enabled), the app also crashed during the session with EXC_BAD_ACCESS (SIGBUS), code 0x32 (code-signing), on unsymbolicated frames, which looks related to the JIT page handling discussed in #190307 / #184254.

With Flutter 3.41.6 on the same setup, the app paused at stop reason = trace in dyld4::ExternallyViewableState::triggerNotifications on a DartWorker thread and never resumed; 3.50.1 (which includes #191434) no longer does this.

Flutter Doctor output

[✓] Flutter (Channel stable, 3.50.1, on macOS 27.2.1 26B131 darwin-arm64)
[✓] Xcode - develop for iOS and macOS (Xcode 27.2), Build 27B52, CocoaPods 1.16.2
[✓] Connected device: iPhone 16 Pro (mobile) • ios • iOS 27.2.1 24B156
• No issues found!

renneralexandre avatar Nov 24 '26 03:11 renneralexandre

Possibly the same root cause as #175962 (per-page JIT handoff through the debugger; that report shows handle_new_rx_page taking ~250–1100 ms each). On iOS 27 the effect is much worse than it was on iOS 26 for the same project and device. The long-term fix appears to be tracked in dart-lang/sdk#61635.

renneralexandre avatar Nov 24 '26 03:11 renneralexandre

@renneralexandre Thanks for the report. This appears related to #175962, with the longer-term solution tracked in dart-lang/sdk#61635. Could you share a minimal reproducible example (MRE) and a short screen recording showing the slow first-time navigation and the faster subsequent navigation?

saurabh-mirajkar avatar Nov 24 '26 11:11 saurabh-mirajkar