Skip to content

a11y android semanticsValue causes screen to freeze #182491

@zywek123

Description

@zywek123

Steps to reproduce

  1. flutter create --sample=material.CircularProgressIndicator.1
  2. madd semanticsValue: "someval" to the CircularProgressIndicator

Expected results

The progress bar should be correctly visible to talkback. So should the other controls on the screen.

Actual results

Talkback can't see any control on progress bar screen

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(
      debugShowCheckedModeBanner: false,
      // Setting this to true will help you instantly see the semantics crash!
      showSemanticsDebugger: true, 
      home: ProgressIndicatorExample(),
    );
  }
}

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

  @override
  State<ProgressIndicatorExample> createState() => _ProgressIndicatorExampleState();
}

class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample> with SingleTickerProviderStateMixin {
  bool year2023 = false;
  late AnimationController controller;

  @override
  void initState() {
    super.initState();
    // Creates a dummy progress value that loops from 0.0 to 1.0
    controller = AnimationController(
      vsync: this,
      duration: const Duration(seconds: 2),
    )..addListener(() {
        setState(() {});
      })..repeat();
  }

  @override
  void dispose() {
    controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Semantics Crash Repro')),
      body: Center(
        child: Column(
          spacing: 16.0,
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('Determinate CircularProgressIndicator'),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 16),
              child: CircularProgressIndicator(
                // ignore: deprecated_member_use
                year2023: year2023,
                // BUG TRIGGER: The "%" symbol here causes the crash when Semantics tries to parse it
                semanticsValue: "${controller.value}%", 
                value: controller.value,
              ),
            ),
            const Text('Indeterminate CircularProgressIndicator'),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 16),
              // ignore: deprecated_member_use
              child: CircularProgressIndicator(year2023: year2023),
            ),
            SwitchListTile(
              value: year2023,
              title: year2023
                  ? const Text('Switch to latest M3 style')
                  : const Text('Switch to year2023 M3 style'),
              onChanged: (bool value) {
                setState(() {
                  year2023 = !year2023;
                });
              },
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY
╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
Progress bar value, minValue, and maxValue must be valid numbers. value:
"0.2517312%", minValue:
"0", maxValue: "100"

When the exception was thrown, this was the stack:
#0      SemanticsNode._addToUpdate.<anonymous closure>
(package:flutter/src/semantics/semantics.dart:4014:9)
#1      SemanticsNode._addToUpdate
(package:flutter/src/semantics/semantics.dart:4017:6)
#2      SemanticsOwner.sendSemanticsUpdate
(package:flutter/src/semantics/semantics.dart:4987:14)
#3      PipelineOwner.flushSemantics
(package:flutter/src/rendering/object.dart:1516:24)
#4      PipelineOwner.flushSemantics
(package:flutter/src/rendering/object.dart:1518:15)
#5      RendererBinding.drawFrame
(package:flutter/src/rendering/binding.dart:636:25)
#6      WidgetsBinding.drawFrame
(package:flutter/src/widgets/binding.dart:1477:13)
#7      RendererBinding._handlePersistentFrameCallback
(package:flutter/src/rendering/binding.dart:495:5)
#8      SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1430:15)
#9      SchedulerBinding.handleDrawFrame
(package:flutter/src/scheduler/binding.dart:1345:9)
#10     SchedulerBinding._handleDrawFrame
(package:flutter/src/scheduler/binding.dart:1198:5)
#11     _invoke (dart:ui/hooks.dart:423:13)
#12     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:447:5)
#13     _drawFrame (dart:ui/hooks.dart:395:31)
════════════════════════════════════════════════════════════════════════════════
════════════════════

Flutter Doctor output

Doctor output main branch
[zywek@dell sample5]$ flutter doctor -v
[✓] Flutter (Channel main, 3.42.0-1.0.pre-151, on Arch Linux 6.18.5-arch1-1,
    locale pl_PL.UTF-8) [452ms]
    • Flutter version 3.42.0-1.0.pre-151 on channel main at
      /home/zywek/git/flutter
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision 9fa7f81be0 (2 godziny temu), 2026-02-17 05:03:31 -0500
    • Engine revision 9fa7f81be0
    • Dart version 3.12.0 (build 3.12.0-154.0.dev)
    • DevTools version 2.55.0
    • Feature flags: enable-web, enable-linux-desktop, no-enable-macos-desktop,
      no-enable-windows-desktop, enable-android, no-enable-ios,
      no-cli-animations, enable-native-assets, omit-legacy-version-file,
      enable-lldb-debugging, enable-uiscene-migration, enable-riscv64

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
    [973ms]
    • Android SDK at /opt/android-sdk
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-36.1, build-tools 36.1.0
    • ANDROID_HOME = /opt/android-sdk
    • ANDROID_SDK_ROOT = /opt/android-sdk
    • Java binary at: /usr/bin/java
      This JDK was found in the system PATH.
      To manually set the JDK path, use: `flutter config
      --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.17+10)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [5ms]
    • CHROME_EXECUTABLE = /opt/brave-bin/brave

[✓] Linux toolchain - develop for Linux desktop [215ms]
    • clang version 21.1.6
    • cmake version 4.2.1
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: Mesa Intel(R) Graphics (ARL) (X11)
    • OpenGL core version: 4.6 (Core Profile) Mesa 25.3.3-arch1.2 (X11)
    • OpenGL core shading language version: 4.60 (X11)
    • OpenGL ES renderer: Mesa Intel(R) Graphics (ARL) (X11)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 25.3.3-arch1.2 (X11)
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
    • GL_EXT_framebuffer_blit: yes (X11)
    • GL_EXT_texture_format_BGRA8888: yes (X11)

[✓] Connected device (3 available) [179ms]
    • SM G973F (mobile) • RF8M63XB4HA • android-arm64  • Android 15 (API 35)
    • Linux (desktop)   • linux       • linux-x64      • Arch Linux
      6.18.5-arch1-1
    • Chrome (web)      • chrome      • web-javascript • Brave Browser
      143.1.85.120 unknown

[✓] Network resources [218ms]
    • All expected network resources are available.

• No issues found!
[zywek@dell sample5]$ 
Doctor output stable branch
[zywek@dell sample5]$ flutter doctor -v
[✓] Flutter (Channel stable, 3.41.1, on Arch Linux 6.18.5-arch1-1, locale
    pl_PL.UTF-8) [17ms]
    • Flutter version 3.41.1 on channel stable at /home/zywek/git/flutter
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision 582a0e7c55 (4 dni temu), 2026-02-12 17:12:32 -0800
    • Engine revision 3452d735bd
    • Dart version 3.11.0
    • DevTools version 2.54.1
    • Feature flags: enable-web, enable-linux-desktop, no-enable-macos-desktop,
      no-enable-windows-desktop, enable-android, no-enable-ios,
      no-cli-animations, enable-native-assets, omit-legacy-version-file,
      enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
    [711ms]
    • Android SDK at /opt/android-sdk
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-36.1, build-tools 36.1.0
    • ANDROID_HOME = /opt/android-sdk
    • ANDROID_SDK_ROOT = /opt/android-sdk
    • Java binary at: /usr/bin/java
      This JDK was found in the system PATH.
      To manually set the JDK path, use: `flutter config
      --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.17+10)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [4ms]
    • CHROME_EXECUTABLE = /opt/brave-bin/brave

[✓] Linux toolchain - develop for Linux desktop [204ms]
    • clang version 21.1.6
    • cmake version 4.2.1
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: Mesa Intel(R) Graphics (ARL) (X11)
    • OpenGL core version: 4.6 (Core Profile) Mesa 25.3.3-arch1.2 (X11)
    • OpenGL core shading language version: 4.60 (X11)
    • OpenGL ES renderer: Mesa Intel(R) Graphics (ARL) (X11)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 25.3.3-arch1.2 (X11)
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
    • GL_EXT_framebuffer_blit: yes (X11)
    • GL_EXT_texture_format_BGRA8888: yes (X11)

[✓] Connected device (3 available) [182ms]
    • SM G973F (mobile) • RF8M63XB4HA • android-arm64  • Android 15 (API 35)
    • Linux (desktop)   • linux       • linux-x64      • Arch Linux
      6.18.5-arch1-1
    • Chrome (web)      • chrome      • web-javascript • Brave Browser
      143.1.85.120 unknown

[✓] Network resources [222ms]
    • All expected network resources are available.

• No issues found!
[zywek@dell sample5]$ 

I hope someone will take a peek at this sooner than this it is quite important to me as this error appeared in the app ready to be updated on google play

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions