Skip to content

Flutter 3.29 Fatal crash with java.lang.AssertionError #164626

Closed

Description

@mil-ast

Steps to reproduce

1 Create new android project
flutter create --org com.example --platforms=android -a kotlin hello

2 Run on Android device with a physical keyboard, example Urovo RT40

3 Press and hold the ALT button
PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039")

Expected results

nothing

Actual results

Crash

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 MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('You have pushed the button this many times:'),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}

Screenshots or Video

UROVO RT40 ![Image](https://github.com/user-attachments/assets/b45c83a7-5361-42fd-986f-2c929c1c5c27)
vid.webm

Logs

Logs
E/InputEventSender( 4705): Exception dispatching finished signal.
E/MessageQueue-JNI( 4705): Exception in MessageQueue callback: handleReceiveCallback
E/MessageQueue-JNI( 4705): java.lang.AssertionError: The key was empty
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyEmbedderResponder.updatePressingState(KeyEmbedderResponder.java:116)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyEmbedderResponder.synthesizeEvent(KeyEmbedderResponder.java:390)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyEmbedderResponder.lambda$synchronizePressingKey$1$io-flutter-embedding-android-KeyEmbedderResponder(KeyEmbedderResponder.java:185)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyEmbedderResponder$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyEmbedderResponder.handleEventImpl(KeyEmbedderResponder.java:375)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyEmbedderResponder.handleEvent(KeyEmbedderResponder.java:431)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.KeyboardManager.handleEvent(KeyboardManager.java:229)
E/MessageQueue-JNI( 4705): 	at io.flutter.embedding.android.FlutterView.dispatchKeyEvent(FlutterView.java:881)
3
E/MessageQueue-JNI( 4705): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
E/MessageQueue-JNI( 4705): 	at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:453)
E/MessageQueue-JNI( 4705): 	at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1839)
E/MessageQueue-JNI( 4705): 	at android.app.Activity.dispatchKeyEvent(Activity.java:3972)
E/MessageQueue-JNI( 4705): 	at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:367)

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.29.0, on Ubuntu 24.04.2 LTS 6.8.0-54-generic, locale ru_RU.UTF-8) [86ms]
    • Flutter version 3.29.0 on channel stable at /usr/local/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 35c388afb5 (3 недели назад), 2025-02-10 12:48:41 -0800
    • Engine revision f73bfc4522
    • Dart version 3.7.0
    • DevTools version 2.42.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1 094ms]
    • Android SDK at /home/pavel/Android/Sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /usr/local/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [13ms]
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop [140ms]
    • Ubuntu clang version 18.1.3 (1ubuntu1)
    • cmake version 3.28.3
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2024.2) [11ms]
    • Android Studio at /usr/local/android-studio
    • 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 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.97.2) [10ms]
    • VS Code at /usr/share/code
    • Flutter extension version 3.106.0

[✓] Connected device (3 available) [190ms]
    • RT40 (mobile)   • 4932d4d1 • android-arm64  • Android 10 (API 29)
    • Linux (desktop) • linux    • linux-x64      • Ubuntu 24.04.2 LTS 6.8.0-54-generic
    • Chrome (web)    • chrome   • web-javascript • Google Chrome 133.0.6943.141

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

• No issues found!

Activity

  1. maheshj01 commented on Mar 6, 2025

    @maheshj01
    Member

    Hi @mil-ast, Thanks for filing the issue. Looks like this issue is specific to this device, I haven't been able to reproduce this on a regular android device (Pixel 6 emulator) or desktop apps. Labelling for further investigation from the team.

    flutter doctor -v
    [✓] Flutter (Channel stable, 3.29.0, on macOS 15.1.1 24B2091 darwin-arm64, locale en-US) [881ms]
        • Flutter version 3.29.0 on channel stable at /Users/mahesh/Development/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 35c388afb5 (3 weeks ago), 2025-02-10 12:48:41 -0800
        • Engine revision f73bfc4522
        • Dart version 3.7.0
        • DevTools version 2.42.2
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [3.0s]
        • Android SDK at /Users/mahesh/Library/Android/sdk
        • Platform android-35, build-tools 34.0.0
        • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [1,583ms]
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 16A242d
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [148ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2024.1) [148ms]
        • 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 17.0.11+0-17.0.11b1207.24-11852314)
    
    [✓] IntelliJ IDEA Community Edition (version 2021.2.1) [146ms]
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin version 61.2.4
        • Dart plugin version 212.5080.8
    
    [✓] VS Code (version 1.96.2) [26ms]
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.102.0
    
    [✓] Connected device (4 available) [7.0s]
        • iPhone 16 Pro (mobile)          • 34497AEA-B6B0-4F79-99A3-6E40007745A3 • ios            •
          com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
        • macOS (desktop)                 • macos                                • darwin-arm64   • macOS
          15.1.1 24B2091 darwin-arm64
        • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS
          15.1.1 24B2091 darwin-arm64
        • Chrome (web)                    • chrome                               • web-javascript •
          Google Chrome 131.0.6778.265
    
    [✓] Network resources [375ms]
        • All expected network resources are available.
    
    • No issues found!
    
    [!] Flutter (Channel master, 3.30.0-1.0.pre.330, on macOS 15.1.1 24B2091 darwin-arm64, locale en-US)
        [3.5s]
        • Flutter version 3.30.0-1.0.pre.330 on channel master at
          /Users/mahesh/Development/flutter_master
        ! Warning: `flutter` on your path resolves to /Users/mahesh/Development/flutter/bin/flutter,
          which is not inside your current Flutter SDK checkout at
          /Users/mahesh/Development/flutter_master. Consider adding
          /Users/mahesh/Development/flutter_master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/mahesh/Development/flutter/bin/dart, which is
          not inside your current Flutter SDK checkout at /Users/mahesh/Development/flutter_master.
          Consider adding /Users/mahesh/Development/flutter_master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 99e1a0652c (8 days ago), 2025-02-25 16:59:54 -0800
        • Engine revision 99e1a0652c
        • Dart version 3.8.0 (build 3.8.0-133.0.dev)
        • DevTools version 2.43.0
        • If those were intentional, you can disregard the above warnings; however it is recommended to
          use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [1,885ms]
        • Android SDK at /Users/mahesh/Library/Android/sdk
        • Platform android-35, build-tools 34.0.0
        • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [1,258ms]
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 16A242d
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [132ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2024.1) [131ms]
        • 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 17.0.11+0-17.0.11b1207.24-11852314)
    
    [✓] IntelliJ IDEA Community Edition (version 2021.2.1) [130ms]
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin version 61.2.4
        • Dart plugin version 212.5080.8
    
    [✓] VS Code (version 1.96.2) [19ms]
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.102.0
    
    [✓] Connected device (3 available) [6.6s]
        • iPhone 16 Pro (mobile) • 34497AEA-B6B0-4F79-99A3-6E40007745A3 • ios            •
          com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
        • macOS (desktop)        • macos                                • darwin-arm64   • macOS 15.1.1
          24B2091 darwin-arm64
        • Chrome (web)           • chrome                               • web-javascript • Google Chrome
          131.0.6778.265
    
    [✓] Network resources [304ms]
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
  2. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: fatal crashCrashes that terminate the process
    team-androidOwned by Android platform team
    platform-androidAndroid applications specifically
    and removed
    in triagePresently being triaged by the triage team
    on Mar 6, 2025
  3. bleroux commented on Mar 6, 2025

    @bleroux
    Contributor

    @mil-ast Thanks for filing this issue.
    It would be great if you can run your sample after enabling keyboard logs.
    Because the failure is in the engine side, framework logs won't show the exact key event which leads to this failure but it might give a hint.

    To enable the logs set the debugPrintKeyboardEvents to true:

    void main() {
      debugPrintKeyboardEvents = true;
      runApp(const MyApp());
    }
  4. mil-ast commented on Mar 6, 2025

    @mil-ast
    Author

    To enable the logs set the debugPrintKeyboardEvents to true:

    void main() {
    debugPrintKeyboardEvents = true;
    runApp(const MyApp());
    }

    Logs
    <!-- short press on the button -->
    I/flutter ( 5200): KEYBOARD: Key event received: KeyDownEvent#2c73e(physicalKey: PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"), logicalKey: LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left"), character: null, timeStamp: 0:00:00.560994)
    I/flutter ( 5200): KEYBOARD: Pressed state before processing the event:
    I/flutter ( 5200):     Empty
    I/flutter ( 5200): KEYBOARD: Pressed state after processing the event:
    I/flutter ( 5200):     PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"): LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left")
    I/flutter ( 5200): KEYBOARD: Key event received: KeyUpEvent#ab477(physicalKey: PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"), logicalKey: LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left"), character: null, timeStamp: 0:00:00.560994, synthesized)
    I/flutter ( 5200): KEYBOARD: Pressed state before processing the event:
    I/flutter ( 5200):     PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"): LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left")
    I/flutter ( 5200): KEYBOARD: Pressed state after processing the event:
    I/flutter ( 5200):     Empty
    
    <!-- long press on the button -->
    
    I/flutter ( 5200): KEYBOARD: Key event received: KeyDownEvent#b680c(physicalKey: PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"), logicalKey: LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left"), character: null, timeStamp: 0:00:00.732393)
    I/flutter ( 5200): KEYBOARD: Pressed state before processing the event:
    I/flutter ( 5200):     Empty
    I/flutter ( 5200): KEYBOARD: Pressed state after processing the event:
    I/flutter ( 5200):     PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"): LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left")
    I/flutter ( 5200): KEYBOARD: Key event received: KeyUpEvent#a392a(physicalKey: PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"), logicalKey: LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left"), character: null, timeStamp: 0:00:00.732393, synthesized)
    I/flutter ( 5200): KEYBOARD: Pressed state before processing the event:
    I/flutter ( 5200):     PhysicalKeyboardKey#91568(usbHidUsage: "0x1100000039", debugName: "Key with ID 0x1100000039"): LogicalKeyboardKey#e5ce6(keyId: "0x200000104", keyLabel: "Alt Left", debugName: "Alt Left")
    I/flutter ( 5200): KEYBOARD: Pressed state after processing the event:
    I/flutter ( 5200):     Empty
    E/InputEventSender( 5200): Exception dispatching finished signal.
    E/MessageQueue-JNI( 5200): Exception in MessageQueue callback: handleReceiveCallback
    E/MessageQueue-JNI( 5200): java.lang.AssertionError: The key was empty
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.updatePressingState(KeyEmbedderResponder.java:116)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.synthesizeEvent(KeyEmbedderResponder.java:390)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.lambda$synchronizePressingKey$1$io-flutter-embedding-android-KeyEmbedderResponder(KeyEmbedderResponder.java:185)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.handleEventImpl(KeyEmbedderResponder.java:375)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.handleEvent(KeyEmbedderResponder.java:431)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.KeyboardManager.handleEvent(KeyboardManager.java:229)
    E/MessageQueue-JNI( 5200): 	at io.flutter.embedding.android.FlutterView.dispatchKeyEvent(FlutterView.java:881)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
    E/MessageQueue-JNI( 5200): 	at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:453)
    E/MessageQueue-JNI( 5200): 	at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1839)
    E/MessageQueue-JNI( 5200): 	at android.app.Activity.dispatchKeyEvent(Activity.java:3972)
    E/MessageQueue-JNI( 5200): 	at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:367)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5944)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5812)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5319)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5372)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5338)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5478)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5346)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5535)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5319)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5372)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5338)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5346)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5319)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5372)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5338)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5511)
    E/MessageQueue-JNI( 5200): 	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:5672)
    E/MessageQueue-JNI( 5200): 	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3065)
    E/MessageQueue-JNI( 5200): 	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2608)
    E/MessageQueue-JNI( 5200): 	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2599)
    E/MessageQueue-JNI( 5200): 	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3042)
    E/MessageQueue-JNI( 5200): 	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:143)
    E/MessageQueue-JNI( 5200): 	at android.os.MessageQueue.nativePollOnce(Native Method)
    E/MessageQueue-JNI( 5200): 	at android.os.MessageQueue.next(MessageQueue.java:336)
    E/MessageQueue-JNI( 5200): 	at android.os.Looper.loop(Looper.java:174)
    E/MessageQueue-JNI( 5200): 	at android.app.ActivityThread.main(ActivityThread.java:7397)
    E/MessageQueue-JNI( 5200): 	at java.lang.reflect.Method.invoke(Native Method)
    E/MessageQueue-JNI( 5200): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    E/MessageQueue-JNI( 5200): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
    D/AndroidRuntime( 5200): Shutting down VM
    E/AndroidRuntime( 5200): FATAL EXCEPTION: main
    E/AndroidRuntime( 5200): Process: com.example.hello, PID: 5200
    E/AndroidRuntime( 5200): java.lang.AssertionError: The key was empty
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.updatePressingState(KeyEmbedderResponder.java:116)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.synthesizeEvent(KeyEmbedderResponder.java:390)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.lambda$synchronizePressingKey$1$io-flutter-embedding-android-KeyEmbedderResponder(KeyEmbedderResponder.java:185)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.handleEventImpl(KeyEmbedderResponder.java:375)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyEmbedderResponder.handleEvent(KeyEmbedderResponder.java:431)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.KeyboardManager.handleEvent(KeyboardManager.java:229)
    E/AndroidRuntime( 5200): 	at io.flutter.embedding.android.FlutterView.dispatchKeyEvent(FlutterView.java:881)
    E/AndroidRuntime( 5200): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
    E/AndroidRuntime( 5200): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
    E/AndroidRuntime( 5200): 	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
    E/AndroidRuntime( 5200): 	at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:453)
    E/AndroidRuntime( 5200): 	at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1839)
    E/AndroidRuntime( 5200): 	at android.app.Activity.dispatchKeyEvent(Activity.java:3972)
    E/AndroidRuntime( 5200): 	at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:367)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5944)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5812)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5319)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5372)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5338)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5478)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5346)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5535)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5319)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5372)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5338)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5346)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5319)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5372)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5338)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5511)
    E/AndroidRuntime( 5200): 	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:5672)
    E/AndroidRuntime( 5200): 	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3065)
    E/AndroidRuntime( 5200): 	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2608)
    E/AndroidRuntime( 5200): 	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2599)
    E/AndroidRuntime( 5200): 	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3042)
    E/AndroidRuntime( 5200): 	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:143)
    E/AndroidRuntime( 5200): 	at android.os.MessageQueue.nativePollOnce(Native Method)
    E/AndroidRuntime( 5200): 	at android.os.MessageQueue.next(MessageQueue.java:336)
    E/AndroidRuntime( 5200): 	at android.os.Looper.loop(Looper.java:174)
    E/AndroidRuntime( 5200): 	at android.app.ActivityThread.main(ActivityThread.java:7397)
    E/AndroidRuntime( 5200): 	at java.lang.reflect.Method.invoke(Native Method)
    E/AndroidRuntime( 5200): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    E/AndroidRuntime( 5200): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
    I/Process ( 5200): Sending signal. PID: 5200 SIG: 9
    Lost connection to device.
    
    Exited.
  5. mil-ast commented on Mar 6, 2025

    @mil-ast
    Author

    I was able to reproduce the error in the emulator:

    adb shell input keyevent 7
    adb shell input keyevent --longpress 57
  6. bleroux commented on Mar 6, 2025

    @bleroux
    Contributor

    I was able to reproduce the error in the emulator:

    adb shell input keyevent 7
    adb shell input keyevent --longpress 57

    Great! I will investigate a fix for this issue.

  7. self-assigned this
    on Mar 6, 2025
  8. moved this from To do to In progress in Nevercodeon Mar 6, 2025
  9. moved this from In progress to PR submitted in Nevercodeon Mar 17, 2025
  10. moved this from PR submitted to Done (PR merged) in Nevercodeon Mar 18, 2025
  11. added
    r: fixedIssue is closed as already fixed in a newer version
    on Mar 18, 2025
  12. github-actions commented on Apr 1, 2025

    @github-actions

    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 -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsc: fatal crashCrashes that terminate the processe: device-specificOnly manifests on certain devicesframeworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform team

Type

No type

Projects

  • Status
    Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions