Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listdependency: dartDart team may need to help usDart team may need to help usteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
Steps to reproduce
Use https://github.com/flutter/flutter/tree/master/dev/integration_tests/flutter_gallery on an iOS 27 beta 4 physical iOS device.
Do flutter run repetitively and eventually I it crashes. I've gotten it multiple times, usually within 20 runs
I had gemini write a little script to run flutter run until it fails:
Script to run until fails
import 'dart:async';
import 'dart:convert';
import 'dart:io';
Process? currentProcess;
Future<void> main(List<String> args) async {
if (args.contains('-h') || args.contains('--help')) {
print('Usage: dart tool/run_until_fail.dart [flutter run arguments...]');
print('');
print(
'Runs "flutter run" on /Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery in a loop until it fails.',
);
print(
'An attempt succeeds when "The Flutter DevTools debugger and profiler" is printed to stdout.',
);
print('An attempt fails if the process exits before printing that line.');
print('');
print('Example:');
print(' dart tool/run_until_fail.dart -d Victoria -v');
return;
}
ProcessSignal.sigint.watch().listen((_) {
print('\n[run_until_fail] Received SIGINT. Terminating current process...');
currentProcess?.kill(ProcessSignal.sigint);
exit(0);
});
if (!Platform.isWindows) {
ProcessSignal.sigterm.watch().listen((_) {
print('\n[run_until_fail] Received SIGTERM. Terminating current process...');
currentProcess?.kill();
exit(0);
});
}
final String? flutterRootPath = Platform.environment['FLUTTER_ROOT'];
if (flutterRootPath == null) {
print('FLUTTER_ROOT is not set. Please set it to the root of your Flutter SDK.');
exit(1);
}
final targetDirectory = '$flutterRootPath/dev/integration_tests/flutter_gallery';
var attempt = 1;
while (true) {
print('========================================================================');
print('[run_until_fail] Starting attempt #$attempt...');
print('Command: flutter run ${args.join(" ")}');
print('========================================================================');
final Process process = await Process.start('flutter', <String>[
'run',
...args,
], workingDirectory: targetDirectory);
currentProcess = process;
final devToolsCompleter = Completer<void>();
var sawDevTools = false;
final StreamSubscription<String> stdoutSub = process.stdout
.transform(const Utf8Decoder(allowMalformed: true))
.transform(const LineSplitter())
.listen((String line) {
print(line);
if (line.contains('The Flutter DevTools debugger and profiler') && !sawDevTools) {
sawDevTools = true;
devToolsCompleter.complete();
}
});
final StreamSubscription<String> stderrSub = process.stderr
.transform(const Utf8Decoder(allowMalformed: true))
.transform(const LineSplitter())
.listen((String line) {
stderr.writeln(line);
});
var didExit = false;
int? exitCode;
unawaited(
process.exitCode.then((int code) {
didExit = true;
exitCode = code;
}),
);
await Future.any(<Future<void>>[devToolsCompleter.future, process.exitCode]);
if (!didExit) {
print(
'\n[run_until_fail] Attempt #$attempt succeeded ("The Flutter DevTools debugger and profiler" detected).',
);
print('[run_until_fail] Stopping process with "q"...');
process.stdin.writeln('q');
try {
await process.exitCode.timeout(const Duration(seconds: 15));
} on TimeoutException {
print('[run_until_fail] Process did not exit cleanly after 15s. Killing process...');
process.kill(ProcessSignal.sigkill);
await process.exitCode;
}
}
await stdoutSub.cancel();
await stderrSub.cancel();
currentProcess = null;
if (!sawDevTools) {
print('\n========================================================================');
print(
'[run_until_fail] FAILURE on attempt #$attempt: Process exited with code ${exitCode ?? "unknown"} before "The Flutter DevTools debugger and profiler" was printed to stdout.',
);
print('========================================================================');
exit(exitCode != 0 && exitCode != null ? exitCode! : 1);
}
print('[run_until_fail] Attempt #$attempt complete. Starting next attempt in 3 seconds...\n');
await Future<void>.delayed(const Duration(seconds: 3));
attempt++;
}
}
Expected results
No crash
Actual results
App crashes
[ +4 ms] executing: /usr/bin/arch -arm64e xcrun lldb
[ +145 ms] [lldb]: (lldb) device select 00008112-0006112A3C03401E
[ +716 ms] [lldb]: (lldb) breakpoint set --func-regex '^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$'
[ ] [lldb]: Breakpoint 1: no locations (pending).
[ ] [lldb]: Breakpoint set in dummy target, will get copied into future targets.
[ ] [lldb]: (lldb) breakpoint command add --script-type python 1
[ +48 ms] [lldb]: (lldb) script lldb.debugger.SetAsync(False)
[ ] [lldb]: (lldb) device process attach --pid 11464
[+1419 ms] [lldb]: Process 11464 stopped
[ ] [lldb]: * thread #1, stop reason = signal SIGSTOP
[ ] [lldb]: frame #0: 0x0000000100f21b10 dyld`_dyld_start
[ ] [lldb]: dyld`_dyld_start:
[ ] [lldb]: -> 0x100f21b10 <+0>: mov x0, sp
[ ] [lldb]: 0x100f21b14 <+4>: and sp, x0, #0xfffffffffffffff0
[ ] [lldb]: 0x100f21b18 <+8>: mov x29, #0x0 ; =0
[ ] [lldb]: 0x100f21b1c <+12>: mov x30, #0x0 ; =0
[ ] [lldb]: Target 0: (Flutter Gallery) stopped.
[ ] [lldb]: (lldb) target stop-hook add -o "thread backtrace all" -o "detach"
[ +2 ms] [lldb]: Stop hook #1 added.
[ ] [lldb]: (lldb) process continue
[+1674 ms] [lldb]: 1 location added to breakpoint 1
[ ] Application launched on the device. Waiting for Dart VM Service url.
[ +1 ms] Checking for advertised Dart VM Services...
[+13874 ms] Dart execution mode: JIT
[ +180 ms] 2026-07-30 11:53:35.610474-0500 Flutter Gallery[11464:950246] [IMPORTANT:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(45)] Using the Impeller rendering backend (Metal).
[ +623 ms] VM Service URL on device: http://127.0.0.1:60134/wwRKeVWvstM=/
[ +4 ms] Attempting to forward device port 60134 to host port 51808
[ ] executing: /Users/vashworth/Development/flutter/bin/cache/artifacts/libusbmuxd/iproxy 51808:60134 --udid 00008112-0006112A3C03401E --debug
[ +84 ms] 2026-07-30 11:53:36.326994-0500 Flutter Gallery[11464:950246] [UIFocus] FlutterView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen.
[ ] 2026-07-30 11:53:36.327221-0500 Flutter Gallery[11464:950246] This FlutterEngine was already invoked.
[ +19 ms] 2026-07-30 11:53:36.348836-0500 Flutter Gallery[11464:950246] [XPCErrors] non-launching port is incompatible with service identifier "com.apple.PointerUI.pointeruid.default-service"
[ +906 ms] Forwarded port ForwardedPort HOST:51808 to DEVICE:60134
[ ] Forwarded host port 51808 to device port 60134 for VM Service
[ +27 ms] Installing and launching... (completed in 22.2s)
[ +2 ms] executing: [/Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/ios/Pods/Pods.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -alltargets -sdk iphonesimulator -project /Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/ios/Pods/Pods.xcodeproj -showBuildSettings BUILD_DIR=/Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/build/ios OBJROOT=/Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/build/ios
[ ] executing: [/Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/ios/Pods/Pods.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -alltargets -sdk iphonesimulator -project /Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/ios/Pods/Pods.xcodeproj -showBuildSettings BUILD_DIR=/Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/build/ios OBJROOT=/Users/vashworth/Development/flutter/dev/integration_tests/flutter_gallery/build/ios
[ +199 ms] Checking for available port on io.flutter.examples.gallery._dartVmService._tcp.local
[ ] Checking for authentication code for io.flutter.examples.gallery._dartVmService._tcp.local
[ +2 ms] Attempting to forward device port 60134 to host port 51815
[ ] executing: /Users/vashworth/Development/flutter/bin/cache/artifacts/libusbmuxd/iproxy 51815:60134 --udid 00008112-0006112A3C03401E --debug
[+1005 ms] Forwarded port ForwardedPort HOST:51815 to DEVICE:60134
...
[ +22 ms] Caching compiled dill
[ +59 ms] Connecting to service protocol: http://127.0.0.1:51808/wwRKeVWvstM=/
[+1263 ms] -- Thread 1
[ ] * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
[ ] * frame #0: 0x0000000104063a14 Flutter`NOTIFY_DEBUGGER_ABOUT_RX_PAGES
[ ] frame #1: 0x0000000104063b54 Flutter`dart::VirtualMemory::AllocateAligned(long, long, bool, char const*) + 316
[ ] frame #2: 0x00000001040872fc Flutter`dart::Page::Allocate(dart::Cage*, long, unsigned long) + 40
[ ] frame #3: 0x0000000104087d34 Flutter`dart::PageSpace::AllocatePage(bool, bool) + 160
[ ] frame #4: 0x0000000104087ad4 Flutter`dart::PageSpace::TryAllocateInFreshPage(long, dart::FreeList*, bool, dart::PageSpace::GrowthPolicy, bool) + 276
[ ] frame #5: 0x000000010407dc94 Flutter`dart::Heap::AllocateOld(dart::Thread*, long, bool) + 1300
[ ] frame #6: 0x0000000103f4d848 Flutter`dart::Object::Allocate(long, long, dart::Heap::Space, bool, unsigned long, unsigned long) + 484
[ ] frame #7: 0x0000000103f9c0ec Flutter`dart::Code::FinalizeCode(dart::FlowGraphCompiler*, dart::compiler::Assembler*, dart::Code::PoolAttachment, bool, dart::CodeStatistics*) + 632
[ ] frame #8: 0x0000000104066250 Flutter`dart::CompileParsedFunctionHelper::FinalizeCompilation(dart::compiler::Assembler*, dart::FlowGraphCompiler*, dart::FlowGraph*) + 4820
[ ] frame #9: 0x00000001040690d4 Flutter`dart::LambdaCallable<dart::CompileParsedFunctionHelper::Compile()::$_0>::Call() + 72
[ ] frame #10: 0x0000000103f0b638 Flutter`dart::IsolateGroup::RunWithStoppedMutatorsCallable(dart::Callable*) + 404
[ ] frame #11: 0x0000000104068ca0 Flutter`dart::CompileParsedFunctionHelper::Compile() + 6012
[ ] frame #12: 0x000000010406a0ac Flutter`dart::CompileFunctionHelper(dart::Function const&, bool, long) + 1640
[ ] frame #13: 0x0000000104069910 Flutter`dart::Compiler::CompileFunction(dart::Thread*, dart::Function const&) + 340
[ ] frame #14: 0x0000000103f92ec0 Flutter`dart::Function::EnsureHasCodeNoThrow() const + 100
[ ] frame #15: 0x0000000103f92ddc Flutter`dart::Function::EnsureHasCode() const + 92
[ ] frame #16: 0x0000000104001db0 Flutter`dart::TrySwitchInstanceCall(dart::Thread*, dart::StackFrame*, dart::Code const&, dart::Function const&, dart::ICData const&, dart::Function const&) + 276
[ ] frame #17: 0x0000000104001324 Flutter`dart::PatchableCallHandler::ResolveSwitchAndReturn(dart::Object const&) + 1832
[ ] frame #18: 0x00000001040023e8 Flutter`dart::InlineCacheMissHandler(dart::Thread*, dart::Zone*, dart::GrowableArray<dart::Instance const*> const&, dart::ICData const&, dart::NativeArguments) + 368
[ ] frame #19: 0x0000000103ff80c4 Flutter`DRT_InlineCacheMissHandlerOneArg + 628
[ ] frame #20: 0x000000011040348c
[ ] frame #21: 0x0000000110404a28
[ ] frame #22: 0x000000011697fb20
[ ] frame #23: 0x000000011697ce40
[ ] frame #24: 0x0000000116975834
[ ] frame #25: 0x0000000116966308
[ ] frame #26: 0x000000011694cdcc
[ ] frame #27: 0x000000011694c06c
[ ] frame #28: 0x0000000116955c30
[ ] frame #29: 0x0000000116954314
[ ] frame #30: 0x0000000116953b08
[ ] frame #31: 0x0000000116950b94
[ ] frame #32: 0x000000011694cdcc
[ ] frame #33: 0x000000011694c06c
[ ] frame #34: 0x0000000116955c30
[ ] frame #35: 0x0000000116955354
[ ] frame #36: 0x0000000116954314
[ ] frame #37: 0x0000000116953b08
[ ] frame #38: 0x0000000116951a5c
[ ] frame #39: 0x0000000116950b94
[ ] frame #40: 0x000000011694cdcc
[ ] frame #41: 0x000000011694c06c
[ ] frame #42: 0x000000011694ab74
[ ] frame #43: 0x00000001169480a8
[ ] frame #44: 0x0000000116947ed8
[ ] frame #45: 0x0000000116945ca4
[ ] frame #46: 0x0000000116942de0
[ ] frame #47: 0x00000001169425fc
[ ] frame #48: 0x0000000116941c98
[ ] frame #49: 0x0000000116941b00
[ ] frame #50: 0x00000001169419cc
[ ] frame #51: 0x0000000116940ac0
[ ] frame #52: 0x000000011693e830
[ ] frame #53: 0x000000011693e510
[ ] frame #54: 0x0000000110c412d0
[ ] frame #55: 0x0000000110c404e4
[ ] frame #56: 0x0000000110403a84
[ ] frame #57: 0x0000000103ee4f9c Flutter`dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&) + 612
[ ] frame #58: 0x0000000103f06194 Flutter`dart::IsolateMessageHandler::HandleMessage(std::__fl::unique_ptr<dart::Message, std::__fl::default_delete<dart::Message>>) + 1468
[ ] frame #59: 0x0000000103f3678c Flutter`dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) + 328
[ ] frame #60: 0x000000010430db70 Flutter`Dart_HandleMessage + 308
[ ] frame #61: 0x0000000103a66390 Flutter`std::__fl::__function::__func<tonic::DartMessageHandler::OnMessage(tonic::DartState*)::$_0, std::__fl::allocator<tonic::DartMessageHandler::OnMessage(tonic::DartState*)::$_0>, void ()>::operator()() + 404
[ ] frame #62: 0x0000000103e47644 Flutter`std::__fl::__function::__func<flutter::DartIsolate::SetMessageHandlingTaskRunner(fml::RefPtr<fml::TaskRunner> const&, bool)::$_1::operator()(std::__fl::function<void ()>) const::'lambda'(), std::__fl::allocator<flutter::DartIsolate::SetMessageHandlingTaskRunner(fml::RefPtr<fml::TaskRunner> const&, bool)::$_1::operator()(std::__fl::function<void ()>) const::'lambda'()>, void ()>::operator()() + 56
[ ] frame #63: 0x00000001039cc710 Flutter`fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 336
[ ] frame #64: 0x00000001039d1964 Flutter`fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
[ ] frame #65: 0x00000001864738d0 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
[ ] frame #66: 0x0000000186473180 CoreFoundation`__CFRunLoopDoTimer + 624
[ ] frame #67: 0x0000000186472e5c CoreFoundation`__CFRunLoopDoTimers + 284
[ ] frame #68: 0x000000018642d874 CoreFoundation`__CFRunLoopRun + 1924
[ ] frame #69: 0x000000018642e700 CoreFoundation`_CFRunLoopRunSpecificWithOptions + 344
[ ] frame #70: 0x00000002307e4f24 GraphicsServices`GSEventRunModal + 120
[ ] frame #71: 0x000000018a6d0860 UIKitCore`UIApplicationMain + 336
[ ] frame #72: 0x0000000100e0011c Flutter Gallery`main(argc=4, argv=0x000000016f003990) at main.m:11:16
[ ] frame #73: 0x000000018627f630 dyld`start + 6616
[ ] thread #2
[ ] frame #0: 0x000000023dcb9a80 libsystem_kernel.dylib`__workq_kernreturn + 8
[ ] thread #3
[ ] frame #0: 0x000000023dcb9a80 libsystem_kernel.dylib`__workq_kernreturn + 8
[ ] thread #4
[ ] frame #0: 0x000000023dcb9a80 libsystem_kernel.dylib`__workq_kernreturn + 8
[ ] thread #5, queue = 'AXBundleLoadQueue', stop reason = shared-library-event
[ ] frame #0: 0x0000000186297550 dyld`lldb_image_notifier
[ ] frame #1: 0x00000001862972fc dyld`dyld4::ExternallyViewableState::triggerNotifications(dyld_image_mode, unsigned int, dyld_image_info const*) + 160
[ ] frame #2: 0x00000001862a0ca4 dyld`dyld4::ExternallyViewableState::addImages(lsl::Allocator&, lsl::Allocator&, std::__1::span<dyld4::ExternallyViewableState::ImageInfo, 18446744073709551615ul> const&) + 1184
[ ] frame #3: 0x00000001862a0760 dyld`dyld4::RuntimeState::notifyDebuggerLoad(std::__1::span<dyld4::Loader const*, 18446744073709551615ul> const&) + 596
[ ] frame #4: 0x00000001862b36c0 dyld`dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const::'lambda'()::operator()() const + 2132
[ ] frame #5: 0x000000018628d0b0 dyld`void dyld4::RuntimeLocks::withLoadersWriteLockAndProtectedStack<dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const::'lambda'()>(dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const::'lambda'())::'lambda'()::operator()() const + 184
[ ] frame #6: 0x00000001862c5d4c dyld`dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const (.cold.3) + 364
[ ] frame #7: 0x00000001862b4c2c dyld`dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const + 2380
[ ] frame #8: 0x00000001862c6344 dyld`dyld4::APIs::dlopen_from(char const*, int, void*) (.cold.4) + 364
[ ] frame #9: 0x00000001862acc4c dyld`dyld4::APIs::dlopen_from(char const*, int, void*) + 816
[ ] frame #10: 0x00000001864c981c CoreFoundation`_CFBundleDlfcnLoadBundle + 164
[ ] frame #11: 0x00000001864b99e0 CoreFoundation`_CFBundleLoadExecutableAndReturnError + 612
[ ] frame #12: 0x0000000186a76e20 Foundation`-[NSBundle loadAndReturnError:] + 248
[ ] frame #13: 0x00000001c1eafb6c UIAccessibility`-[NSBundleAccessibility loadAndReturnError:] + 56
[ ] frame #14: 0x000000018f86c080 AXCoreUtilities`__50-[AXCodeItem loadWithStrategy:onQueue:completion:]_block_invoke_2 + 204
[ ] frame #15: 0x00000001b5040ccc libdispatch.dylib`_dispatch_call_block_and_release + 32
[ ] frame #16: 0x00000001b505afd4 libdispatch.dylib`_dispatch_client_callout + 16
[ ] frame #17: 0x00000001b504987c libdispatch.dylib`_dispatch_lane_serial_drain + 644
[ ] frame #18: 0x00000001b504a470 libdispatch.dylib`_dispatch_lane_invoke + 312
[ ] frame #19: 0x00000001b5054c98 libdispatch.dylib`_dispatch_root_queue_drain_deferred_wlh + 248
[ ] frame #20: 0x00000001b50546bc libdispatch.dylib`_dispatch_workloop_worker_thread + 640
[ ] frame #21: 0x0000000186333238 libsystem_pthread.dylib`_pthread_wqthread + 292
[ ] thread #6
[ ] frame #0: 0x000000023dcb9a80 libsystem_kernel.dylib`__workq_kernreturn + 8
[ ] thread #7
[ ] frame #0: 0x000000023dcb9a80 libsystem_kernel.dylib`__workq_kernreturn + 8
[ ] thread #8
[ ] frame #0: 0x0000000000000000
[ ] thread #9, name = 'io.flutter.1.raster'
[ ] frame #0: 0x000000023dcb9cd4 libsystem_kernel.dylib`mach_msg2_trap + 8
[ ] frame #1: 0x000000023dcbd308 libsystem_kernel.dylib`mach_msg2_internal + 76
[ ] frame #2: 0x000000023dcbd228 libsystem_kernel.dylib`mach_msg_overwrite + 424
[ ] frame #3: 0x000000023dcbd074 libsystem_kernel.dylib`mach_msg + 24
[ ] frame #4: 0x000000018642e378 CoreFoundation`__CFRunLoopServiceMachPort + 136
[ ] frame #5: 0x000000018642d344 CoreFoundation`__CFRunLoopRun + 596
[ ] frame #6: 0x000000018642e700 CoreFoundation`_CFRunLoopRunSpecificWithOptions + 344
[ ] frame #7: 0x00000001039d1a54 Flutter`fml::MessageLoopDarwin::Run() + 92
[ ] frame #8: 0x00000001039d04c0 Flutter`std::__fl::__function::__func<fml::Thread::Thread(std::__fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::__fl::allocator<fml::Thread::Thread(std::__fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()() + 196
[ ] frame #9: 0x00000001039d014c Flutter`fml::ThreadHandle::ThreadHandle(std::__fl::function<void ()>&&)::$_0::__invoke(void*) + 36
[ ] frame #10: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #10, name = 'io.flutter.1.io'
[ ] frame #0: 0x000000023dcb9cd4 libsystem_kernel.dylib`mach_msg2_trap + 8
[ ] frame #1: 0x000000023dcbd308 libsystem_kernel.dylib`mach_msg2_internal + 76
[ ] frame #2: 0x000000023dcbd228 libsystem_kernel.dylib`mach_msg_overwrite + 424
[ ] frame #3: 0x000000023dcbd074 libsystem_kernel.dylib`mach_msg + 24
[ ] frame #4: 0x000000018642e378 CoreFoundation`__CFRunLoopServiceMachPort + 136
[ ] frame #5: 0x000000018642d344 CoreFoundation`__CFRunLoopRun + 596
[ ] frame #6: 0x000000018642e700 CoreFoundation`_CFRunLoopRunSpecificWithOptions + 344
[ ] frame #7: 0x00000001039d1a54 Flutter`fml::MessageLoopDarwin::Run() + 92
[ ] frame #8: 0x00000001039d04c0 Flutter`std::__fl::__function::__func<fml::Thread::Thread(std::__fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::__fl::allocator<fml::Thread::Thread(std::__fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()() + 196
[ ] frame #9: 0x00000001039d014c Flutter`fml::ThreadHandle::ThreadHandle(std::__fl::function<void ()>&&)::$_0::__invoke(void*) + 36
[ ] frame #10: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #11, name = 'io.flutter.1.profiler'
[ ] frame #0: 0x000000023dcb9cd4 libsystem_kernel.dylib`mach_msg2_trap + 8
[ ] frame #1: 0x000000023dcbd308 libsystem_kernel.dylib`mach_msg2_internal + 76
[ ] frame #2: 0x000000023dcbd228 libsystem_kernel.dylib`mach_msg_overwrite + 424
[ ] frame #3: 0x000000023dcbd074 libsystem_kernel.dylib`mach_msg + 24
[ ] frame #4: 0x000000018642e378 CoreFoundation`__CFRunLoopServiceMachPort + 136
[ ] frame #5: 0x000000018642d344 CoreFoundation`__CFRunLoopRun + 596
[ ] frame #6: 0x000000018642e700 CoreFoundation`_CFRunLoopRunSpecificWithOptions + 344
[ ] frame #7: 0x00000001039d1a54 Flutter`fml::MessageLoopDarwin::Run() + 92
[ ] frame #8: 0x00000001039d04c0 Flutter`std::__fl::__function::__func<fml::Thread::Thread(std::__fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::__fl::allocator<fml::Thread::Thread(std::__fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()() + 196
[ ] frame #9: 0x00000001039d014c Flutter`fml::ThreadHandle::ThreadHandle(std::__fl::function<void ()>&&)::$_0::__invoke(void*) + 36
[ ] frame #10: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #12, name = 'io.worker.1'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333da4 libsystem_pthread.dylib`_pthread_cond_wait + 980
[ ] frame #2: 0x00000001039c979c Flutter`void* std::__fl::__thread_proxy[abi:nn210000]<std::__fl::tuple<std::__fl::unique_ptr<std::__fl::__thread_struct, std::__fl::default_delete<std::__fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 336
[ ] frame #3: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #13, name = 'io.worker.2'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333da4 libsystem_pthread.dylib`_pthread_cond_wait + 980
[ ] frame #2: 0x00000001039c979c Flutter`void* std::__fl::__thread_proxy[abi:nn210000]<std::__fl::tuple<std::__fl::unique_ptr<std::__fl::__thread_struct, std::__fl::default_delete<std::__fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 336
[ ] frame #3: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #14, name = 'io.worker.3'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333da4 libsystem_pthread.dylib`_pthread_cond_wait + 980
[ ] frame #2: 0x00000001039c979c Flutter`void* std::__fl::__thread_proxy[abi:nn210000]<std::__fl::tuple<std::__fl::unique_ptr<std::__fl::__thread_struct, std::__fl::default_delete<std::__fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 336
[ ] frame #3: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #15, name = 'io.worker.4'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333da4 libsystem_pthread.dylib`_pthread_cond_wait + 980
[ ] frame #2: 0x00000001039c979c Flutter`void* std::__fl::__thread_proxy[abi:nn210000]<std::__fl::tuple<std::__fl::unique_ptr<std::__fl::__thread_struct, std::__fl::default_delete<std::__fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 336
[ ] frame #3: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #16, name = 'dart:io EventHandler'
[ ] frame #0: 0x000000023dcc08f4 libsystem_kernel.dylib`kevent + 8
[ ] frame #1: 0x0000000103e0a158 Flutter`dart::bin::EventHandlerImplementation::EventHandlerEntry(unsigned long) + 368
[ ] frame #2: 0x0000000103e428b0 Flutter`dart::bin::ThreadStart(void*) + 88
[ ] frame #3: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #17, name = 'Dart Profiler ThreadInterrupter'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333dd0 libsystem_pthread.dylib`_pthread_cond_wait + 1024
[ ] frame #2: 0x0000000103e922ac Flutter`dart::ConditionVariable::WaitMicros(dart::Mutex*, long long) + 116
[ ] frame #3: 0x000000010404e424 Flutter`dart::ThreadInterrupter::ThreadMain(unsigned long) + 432
[ ] frame #4: 0x0000000103fd8f34 Flutter`dart::ThreadStart(void*) + 272
[ ] frame #5: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #18, name = 'DartWorker'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333dd0 libsystem_pthread.dylib`_pthread_cond_wait + 1024
[ ] frame #2: 0x0000000103e922ac Flutter`dart::ConditionVariable::WaitMicros(dart::Mutex*, long long) + 116
[ ] frame #3: 0x000000010404f418 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 712
[ ] frame #4: 0x0000000103fd8f34 Flutter`dart::ThreadStart(void*) + 272
[ ] frame #5: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #19, name = 'DartWorker'
[ ] frame #0: 0x0000000104040dec Flutter`dart::Symbols::FromUTF8(dart::Thread*, unsigned char const*, long) + 788
[ ] frame #1: 0x000000010426392c Flutter`dart::kernel::TranslationHelper::DartSymbolPlain(dart::kernel::StringIndex) const + 308
[ ] frame #2: 0x0000000103f29330 Flutter`dart::kernel::KernelLoader::LookupLibrary(dart::kernel::NameIndex) + 144
[ ] frame #3: 0x0000000104263494 Flutter`dart::kernel::TranslationHelper::ManglePrivateName(dart::kernel::NameIndex, dart::String*, bool, bool) + 224
[ ] frame #4: 0x0000000103f2fb0c Flutter`dart::kernel::KernelLoader::GenerateFieldAccessors(dart::Class const&, dart::Field const&, dart::kernel::FieldHelper*, unsigned int) + 268
[ ] frame #5: 0x0000000103f31904 Flutter`dart::kernel::KernelLoader::FinishClassLoading(dart::Class const&, dart::Library const&, dart::Class const&, long, dart::kernel::ClassIndex const&, dart::kernel::ClassHelper*) + 1856
[ ] frame #6: 0x0000000103f335b0 Flutter`dart::kernel::KernelLoader::FinishLoading(dart::Class const&) + 1152
[ ] frame #7: 0x0000000103ed97f8 Flutter`dart::ClassFinalizer::FinalizeClass(dart::Class const&) + 344
[ ] frame #8: 0x0000000103ed9954 Flutter`dart::ClassFinalizer::FinalizeClass(dart::Class const&) + 692
[ ] frame #9: 0x0000000103ed9954 Flutter`dart::ClassFinalizer::FinalizeClass(dart::Class const&) + 692
[ ] frame #10: 0x0000000103ed9954 Flutter`dart::ClassFinalizer::FinalizeClass(dart::Class const&) + 692
[ ] frame #11: 0x0000000103eda994 Flutter`dart::ClassFinalizer::LoadClassMembers(dart::Class const&) + 208
[ ] frame #12: 0x0000000103f7f04c Flutter`dart::Class::EnsureIsFinalized(dart::Thread*) const + 508
[ ] frame #13: 0x000000010421339c Flutter`dart::kernel::StreamingFlowGraphBuilder::BuildConstructorInvocation(dart::TokenPosition*) + 628
[ ] frame #14: 0x0000000104221818 Flutter`dart::kernel::StreamingFlowGraphBuilder::BuildVariable(dart::TokenPosition*) + 284
[ ] frame #15: 0x000000010421d7f8 Flutter`dart::kernel::StreamingFlowGraphBuilder::BuildStatement(dart::TokenPosition*) + 8508
[ ] frame #16: 0x000000010422fbd4 Flutter`dart::kernel::StreamingFlowGraphBuilder::BuildGraphOfFunction(bool) + 4512
[ ] frame #17: 0x0000000104239380 Flutter`dart::kernel::FlowGraphBuilder::BuildGraph() + 2764
[ ] frame #18: 0x0000000104067d5c Flutter`dart::CompileParsedFunctionHelper::Compile() + 2104
[ ] frame #19: 0x000000010406a0ac Flutter`dart::CompileFunctionHelper(dart::Function const&, bool, long) + 1640
[ ] frame #20: 0x0000000104069910 Flutter`dart::Compiler::CompileFunction(dart::Thread*, dart::Function const&) + 340
[ ] frame #21: 0x0000000103f92ec0 Flutter`dart::Function::EnsureHasCodeNoThrow() const + 100
[ ] frame #22: 0x0000000103f92ddc Flutter`dart::Function::EnsureHasCode() const + 92
[ ] frame #23: 0x0000000103ffa7c8 Flutter`DRT_CompileFunction + 472
[ ] frame #24: 0x000000010338348c
[ ] frame #25: 0x0000000103383510
[ ] frame #26: 0x000000010caa75f4
[ ] frame #27: 0x000000010caf484c
[ ] frame #28: 0x000000010caf43f0
[ ] frame #29: 0x000000010caf3e78
[ ] frame #30: 0x000000010caf37e8
[ ] frame #31: 0x000000010caf32a0
[ ] frame #32: 0x000000010caf2e48
[ ] frame #33: 0x0000000116e19f30
[ ] frame #34: 0x0000000116e0fa5c
[ ] frame #35: 0x0000000116e08214
[ ] frame #36: 0x0000000116e072e8
[ ] frame #37: 0x0000000116e070f0
[ ] frame #38: 0x000000010caa75f4
[ ] frame #39: 0x000000010caf484c
[ ] frame #40: 0x000000010caf43f0
[ ] frame #41: 0x000000010caf3e78
[ ] frame #42: 0x000000010caf37e8
[ ] frame #43: 0x000000010caf32a0
[ ] frame #44: 0x000000010caf2e48
[ ] frame #45: 0x0000000116e02894
[ ] frame #46: 0x0000000116e025a0
[ ] frame #47: 0x000000010caa75f4
[ ] frame #48: 0x000000010caf484c
[ ] frame #49: 0x000000010caf43f0
[ ] frame #50: 0x000000010caf3e78
[ ] frame #51: 0x000000010caf37e8
[ ] frame #52: 0x000000010caf32a0
[ ] frame #53: 0x000000010caf2e48
[ ] frame #54: 0x0000000116e024a0
[ ] frame #55: 0x000000010caeb9f8
[ ] frame #56: 0x000000010caa3b7c
[ ] frame #57: 0x000000010caa3670
[ ] frame #58: 0x000000010caa3548
[ ] frame #59: 0x000000010caa01c8
[ ] frame #60: 0x000000010ca8b198
[ ] frame #61: 0x0000000103383a84
[ ] frame #62: 0x0000000103ee4f9c Flutter`dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&) + 612
[ ] frame #63: 0x0000000103f06194 Flutter`dart::IsolateMessageHandler::HandleMessage(std::__fl::unique_ptr<dart::Message, std::__fl::default_delete<dart::Message>>) + 1468
[ ] frame #64: 0x0000000103f3678c Flutter`dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) + 328
[ ] frame #65: 0x0000000103f36464 Flutter`dart::MessageHandler::TaskCallback() + 508
[ ] frame #66: 0x000000010404f2ec Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 412
[ ] frame #67: 0x0000000103fd8f34 Flutter`dart::ThreadStart(void*) + 272
[ ] frame #68: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #20, name = 'DartWorker'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333dd0 libsystem_pthread.dylib`_pthread_cond_wait + 1024
[ ] frame #2: 0x0000000103e922ac Flutter`dart::ConditionVariable::WaitMicros(dart::Mutex*, long long) + 116
[ ] frame #3: 0x000000010404f418 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 712
[ ] frame #4: 0x0000000103fd8f34 Flutter`dart::ThreadStart(void*) + 272
[ ] frame #5: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] thread #21, name = 'DartWorker'
[ ] frame #0: 0x000000023dcbf5f8 libsystem_kernel.dylib`__psynch_cvwait + 8
[ ] frame #1: 0x0000000186333dd0 libsystem_pthread.dylib`_pthread_cond_wait + 1024
[ ] frame #2: 0x0000000103e922ac Flutter`dart::ConditionVariable::WaitMicros(dart::Mutex*, long long) + 116
[ ] frame #3: 0x000000010404f418 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 712
[ ] frame #4: 0x0000000103fd8f34 Flutter`dart::ThreadStart(void*) + 272
[ ] frame #5: 0x000000018633603c libsystem_pthread.dylib`_pthread_start + 136
[ ] -- Thread 5
[ ] Process 11464 resuming
[ ] Process 11464 is running.
[ ] * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
[ ] frame #0: 0x0000000104063a14 Flutter`NOTIFY_DEBUGGER_ABOUT_RX_PAGES
[ ] error: error reading data from section __text
[ ] Target 0: (Flutter Gallery) stopped.
[ +43 ms] Failed to make initial connection to VM Service (attempt 1 of 3). Retrying in 100ms...
[ +4 ms] App terminated due to signal 10.
[ +2 ms] Script started, output file is /dev/null
[ ] Script done, output file is /dev/null
[ ] lldb exited with code 1
[ +98 ms] Fail to connect to service protocol: http://127.0.0.1:51808/wwRKeVWvstM=/: HttpException: Connection reset by peer, uri = http://127.0.0.1:51808/wwRKeVWvstM=/ws
[ +502 ms] Error connecting to the service protocol: failed to connect to http://127.0.0.1:51808/wwRKeVWvstM=/ HttpException: Connection reset by peer, uri = http://127.0.0.1:51808/wwRKeVWvstM=/ws
[ ] "flutter run" took 52,318ms.
Code sample
Screenshots or Video
No response
Logs
Xcode crash log: Flutter Gallery-2026-07-30-115341.txt
Flutter Doctor output
Doctor output
[✓] Flutter (Channel main, 3.47.0-1.0.pre-284, on macOS 26.5.2 25F84 darwin-arm64, locale en) [1,925ms]
• Flutter version 3.47.0-1.0.pre-284 on channel main at xxx
• Upstream repository [email protected]:flutter/flutter.git
• Framework revision d0da476734 (66 minutes ago), 2026-07-30 11:34:07 -0400
• Engine revision aad7ccb119
• Dart version 3.14.0 (build 3.14.0-76.0.dev)
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file,
enable-lldb-debugging, enable-uiscene-migration, enable-riscv64, enable-macos-arm64-only
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,585ms]
[✓] Xcode - develop for iOS and macOS (Xcode 27.0) [1,387ms]
• Xcode at /Applications/Xcode-beta-4.app/Contents/Developer
• Build 27A5228h
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [7ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (4 available) [11.8s]
• iPad (mobile) • xxx • ios • iOS 27.0 24A5390f
• macOS (desktop) • macos • darwin-arm64 • macOS 26.5.2 25F84 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 150.0.7871.187
[✓] Network resources [301ms]
• All expected network resources are available.
• No issues found!Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listdependency: dartDart team may need to help usDart team may need to help usteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Type
Projects
- StatusShow more project fieldsDone
Activity
mraleph commentedon Jul 30, 2026
Possibly a bug in the JIT (or GC) given that it SIGBUSes with a stack trace like this - which means JIT compiled code.
vashworth commentedon Jul 30, 2026
@mraleph "Possibly a bug in the JIT (or GC)" - does that mean you think it's an iOS issue rather than something on either Flutter or Dart's side of things? Do you think there's any way to fix / investigate further?
mraleph commentedon Jul 31, 2026
@vashworth no, I mean it's a possible bug in Dart VMs JIT or GC. Though hard to say without debugging further.
I have been trying to repro it today using my iPhone 16e (2025), running iOS 27, XCode 27 and flutter HEAD of main branch. Unfortunately, it did not crash a single time after 72 iterations.
We'll need some way to reproduce this to debug :-/
mraleph commentedon Jul 31, 2026
Actually looking at the stack - it is extremely similar to #184254 (comment) so I am wondering if it is the same type of issue (e.g. JIT workaround did not trigger properly for some reason, for example because of some other race in LLDB).
Can you try to repro the bug - but modify LLDB script and Dart sources (will require engine rebuild):
This should reveal if there is again some issue with the debugger.
vashworth commentedon Aug 11, 2026
I built the Dart SDK and got this:
I do not see a
LLDB script did not intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGESlogI'm not 100 certain I hooked up Flutter correctly to the custom build dart sdk. @mraleph How do you usually do it? I symlinked the version I built into
flutter/bin/cache/dart-sdkI think it's using the right version because when I do
flutter --versionI getTools • Dart 3.14.0 (build 3.14.0-edge) • DevTools 2.61.0-dev.0. Is there a way to verify?mraleph commentedon Aug 12, 2026
These parts don't come from dart-sdk, they are linked into engine framework. This means you have to rebuild engine and use it via
--local-engine. I usually do this:engine/src/flutter/third_party/dart.et build -c host_debug && et build -c ios_debugflutter clean, sometimes newly build engine is not picked up correctly byflutter run --local-engine ...for some reason, so I am forced to clean before trying to use it.flutter-dev run -d ... -v -t lib/main.dart --local-engine ios_debug --local-engine-host host_debughost_debugconfiguration and only build target engine (e.g.ios_debugin this case) for my subsequent changes.vashworth commentedon Aug 12, 2026
Okay I got it working properly this time:
mraleph commentedon Aug 12, 2026
@vashworth well, bad news for us :-/ I guess, it's a LLDB bug of some sort again just like we had it before.
We could try to apply previous variant of the workaround (with manual resume - instead of
SetAsync(false)) and see if it makes it go away. If we can't find a workaround then we need to collect LLDB traces for breakpoint behavior (e.g.log enable gdb-remote break) and see if we can reduce this to some minimal example which we can report upstream to LLDB.vashworth commentedon Aug 18, 2026
I've verified that manual resuming does indeed make the error go away. I'll go forward with that for now.
On iOS 27+ devices, manually process lldb stops (flutter#191434)
github-actions commentedon Sep 7, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.