-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Description
Certain keys in Khmer keyboard layout crashes the app.
Reproduction:
- Run
flutter run -d macOS
in an app that contains a text field - Switch to macOS Khmer keyboard
- Press 2
Expected result: The text field has text "2"
Actual result: The app crashes with the following log:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/services/hardware_keyboard.dart': Failed assertion: line 798 pos 16: 'data.physical != 0 && data.logical != 0': is not true.
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2 KeyEventManager.handleKeyData (package:flutter/src/services/hardware_keyboard.dart:798:16)
#3 PlatformDispatcher._keyDataListener.<anonymous closure>.<anonymous closure> (dart:ui/platform_dispatcher.dart:408:41)
#4 _invoke1 (dart:ui/hooks.dart:165:13)
#5 PlatformDispatcher._keyDataListener.<anonymous closure> (dart:ui/platform_dispatcher.dart:406:7)
#6 _invoke2 (dart:ui/hooks.dart:184:13)
#7 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:40:5)
#8 _Channel.push (dart:ui/channel_buffers.dart:130:31)
#9 ChannelBuffers.push (dart:ui/channel_buffers.dart:327:17)
#10 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:605:22)
#11 _dispatchPlatformMessage (dart:ui/hooks.dart:87:31)
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2009, on macOS 12.5 21G72 darwin-x64, locale en-US) • Flutter version 3.1.0-0.0.pre.2009 on channel master at /Users/tongmu/dev/flutter • Upstream repository git@github.com:flutter/flutter.git • Framework revision 9d96c7b8be (7 hours ago), 2022-08-01 00:39:06 -0400 • Engine revision cf0db3e546 • Dart version 2.19.0 (build 2.19.0-49.0.dev) • DevTools version 2.16.0[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/tongmu/Library/Android/sdk
✗ cmdline-tools component is missing
Runpath/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Runflutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13E500a
• CocoaPods version 1.11.2[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome[✓] Android Studio
• Android Studio at /Applications/Android Studio with Blaze Beta.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)[✓] VS Code (version 1.69.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.44.0[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 12.5 21G72 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.134[✓] HTTP Host Availability
• All required HTTP hosts are available! Doctor found issues in 1 category.