Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Crash: ACCESS_VIOLATION c0000005 in `FlutterPlatformNodeDelegate::ChildAtIndex` during rapid UIA tree traversal

Đang mở Phù hợp với người mới
#195,399 10 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
73/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart
Lĩnh vực
accessibility, desktop

Hướng nghiên cứu

Bắt đầu với flutter_platform_node_delegate.cc:90, nơi có báo cáo rằng FlutterPlatformNodeDelegate::ChildAtIndex giải tham chiếu kết quả của GetUnignoredChildAtIndex. Kiểm tra mã trợ năng Windows ở gần đó và các bài kiểm thử về hành vi tra cứu nút con cũng như ID nút không hợp lệ được mong đợi. Tái hiện lỗi bằng cách cập nhật ngữ nghĩa nhanh trong khi duyệt UI Automation; hoàn thành khi việc tra cứu nút con xử lý an toàn một nút con đã bị vô hiệu hóa và sự cố không còn xảy ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

in triage
Steps to reproduce
  1. Run a Flutter Windows desktop application (release build on Windows 11 x64, 10.0.22621).
  2. Have active UI Automation (UIA) tree traversal or an accessibility tool / screen reader inspecting or walking the UIA tree.
  3. Rapidly trigger UI / semantics tree mutations (e.g., continuous slider adjustments or rapid layout rebuilds that mutate semantics nodes).
  4. As the accessibility client queries child nodes via UI Automation during continuous updates, the engine crashes with an access violation in FlutterPlatformNodeDelegate::ChildAtIndex.
Expected results

The engine should safely handle child queries during semantics tree mutations without crashing. If a child node is null or invalidated concurrently, it should return a safe fallback/error (e.g., ui::kInvalidAXNodeID) rather than dereferencing a nullptr.

Actual results

The application crashes with an ACCESS_VIOLATION c0000005:

  • Crash Exception: ACCESS_VIOLATION c0000005 at flutter_windows!ui::AXNode::id inlined in flutter_windows!flutter::FlutterPlatformNodeDelegate::ChildAtIndex+0x3f
  • Engine Location: flutter_platform_node_delegate.cc:90
  • Environment: Flutter 3.44.4 (channel stable), Engine revision 700aebeca4c0e610f109a3979ee3e71b69d666bc, Windows 11 x64 (10.0.22621), release build
Root Cause

In flutter_platform_node_delegate.cc:90 (FlutterPlatformNodeDelegate::ChildAtIndex):

ui::AXNode* child = GetUnignoredChildAtIndex(index);
return child->id();

GetUnignoredChildAtIndex(index) returns nullptr during a UIA tree walk while semantics are actively mutating, resulting in an immediate null pointer dereference on ->id().

Suggested Engine Fix

Add a nullptr check before dereferencing id():

ui::AXNode* child = GetUnignoredChildAtIndex(index);
if (!child) {
  return ui::kInvalidAXNodeID;
}
return child->id();
Application-Level Workarounds / Mitigations
  • Wrapping rapidly updating widgets (e.g., continuous sliders) in ExcludeSemantics.
  • Debouncing continuous slider adjustments / rapid state changes to mitigate frequent semantics mutations.
Code sample
Code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(child: SliderCrashRepro()),
      ),
    );
  }
}

class SliderCrashRepro extends StatefulWidget {
  const SliderCrashRepro({super.key});

  @override
  State<SliderCrashRepro> createState() => _SliderCrashReproState();
}

class _SliderCrashReproState extends State<SliderCrashRepro> {
  double _value = 0.0;

  @override
  Widget build(BuildContext context) {
    // When UIA tree is actively traversed by Windows accessibility services,
    // rapid continuous updates to this slider without ExcludeSemantics triggers the crash.
    return Slider(
      value: _value,
      min: 0.0,
      max: 100.0,
      onChanged: (val) {
        setState(() {
          _value = val;
        });
      },
    );
  }
}
Screenshots or Video
Screenshots / Video demonstration

[Upload media here]

Logs
Logs
Exception: ACCESS_VIOLATION (0xc0000005) reading address 0x0000000000000000
Fault Module: flutter_windows.dll
Location: flutter_platform_node_delegate.cc:90

Stack trace:
00 flutter_windows!ui::AXNode::id (inlined in flutter_windows!flutter::FlutterPlatformNodeDelegate::ChildAtIndex+0x3f) [flutter\shell\platform\windows\flutter_platform_node_delegate.cc:90]
01 flutter_windows!flutter::FlutterPlatformNodeDelegate::ChildAtIndex+0x3f
02 flutter_windows!ui::AXPlatformNodeWin::GetChildAtIndex+0x...
03 UIAutomationCore!UiaNodeFromProvider+0x...
... Windows UI Automation provider tree walk ...
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.44.4, on Microsoft Windows [Version 10.0.22621.4317], locale en-US)
    • Flutter version 3.44.4 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ...
    • Engine revision 700aebeca4c0e610f109a3979ee3e71b69d666bc
    • Dart version 3.4.4
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is Windows 11 [10.0.22621])

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Windows 10/11 SDK version 10.0.22621.0

[√] Connected device (1 available)
    • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621]

• No issues found!
Ngôn ngữ chính
Dart
Star
181k
Fork
33.3k
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
267

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flutter/flutter

Tất cả issue của flutter/flutter

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.