-
Notifications
You must be signed in to change notification settings - Fork 6k
Check for a null pressure range for motion events #7986
Conversation
test? |
flutter/engine@3e4e6f5c5 Provide batching for semantics updates (flutter/engine#7988) flutter/engine@0852795bf Roll src/third_party/skia ff84d8a900d4..67d87128fd00 (7 commits) (flutter/engine#7987) flutter/engine@1089b5c9f Check for a null pressure range for motion events (flutter/engine#7986) flutter/engine@b7d512949 [macos] Add hover support to FLEViewController (flutter/engine#7975) flutter/engine@a82c7ee73 Add async events to pipeline flows. (flutter/engine#7985) flutter/engine@c3eb7aea8 Roll src/third_party/skia ab3f8674c9d2..ff84d8a900d4 (1 commits) (flutter/engine#7983) flutter/engine@15793288e Roll src/third_party/dart 9450c6d829..40bab34fbd (8 commits) flutter/engine@b324969c1 Roll src/third_party/dart e94e797d7b..9450c6d829 (8 commits) flutter/engine@3f3e4ec90 Roll src/third_party/skia f6faf2fcea7b..ab3f8674c9d2 (2 commits) (flutter/engine#7980) flutter/engine@d162ad842 Roll src/third_party/skia 4dbb96dfaa04..f6faf2fcea7b (7 commits) (flutter/engine#7977) flutter/engine@5deb15cdf Roll src/third_party/dart 05bba46133..e94e797d7b (5 commits) flutter/engine@4db7c3050 Android Embedding PR 10: Add system channels to FlutterEngine. (flutter/engine#7960) flutter/engine@9f92324fd Suppress deprecation warning for usage of Configuration.locale (flutter/engine#7973) flutter/engine@9b21ea857 Roll src/third_party/dart 385be0cf31..05bba46133 (6 commits) flutter/engine@e3f1bdc4d Roll src/third_party/skia adfc6e40df30..4dbb96dfaa04 (6 commits) (flutter/engine#7970) flutter/engine@e32531f0e Switch flutter's dart sdk to full and add dartdevc libraries (flutter/engine#7968) flutter/engine@fb1c543dd Link dart:* sources into engine for debugger source support (flutter/engine#7908) flutter/engine@dd3656a51 Roll src/third_party/dart 0f9a5198bd..385be0cf31 (14 commits) flutter/engine@4434a39c7 Add api 21 check to LocalizationChannel.java (flutter/engine#7967)
flutter/engine@3e4e6f5c5 Provide batching for semantics updates (flutter/engine#7988) flutter/engine@0852795bf Roll src/third_party/skia ff84d8a900d4..67d87128fd00 (7 commits) (flutter/engine#7987) flutter/engine@1089b5c9f Check for a null pressure range for motion events (flutter/engine#7986) flutter/engine@b7d512949 [macos] Add hover support to FLEViewController (flutter/engine#7975) flutter/engine@a82c7ee73 Add async events to pipeline flows. (flutter/engine#7985) flutter/engine@c3eb7aea8 Roll src/third_party/skia ab3f8674c9d2..ff84d8a900d4 (1 commits) (flutter/engine#7983) flutter/engine@15793288e Roll src/third_party/dart 9450c6d829..40bab34fbd (8 commits) flutter/engine@b324969c1 Roll src/third_party/dart e94e797d7b..9450c6d829 (8 commits) flutter/engine@3f3e4ec90 Roll src/third_party/skia f6faf2fcea7b..ab3f8674c9d2 (2 commits) (flutter/engine#7980) flutter/engine@d162ad842 Roll src/third_party/skia 4dbb96dfaa04..f6faf2fcea7b (7 commits) (flutter/engine#7977) flutter/engine@5deb15cdf Roll src/third_party/dart 05bba46133..e94e797d7b (5 commits) flutter/engine@4db7c3050 Android Embedding PR 10: Add system channels to FlutterEngine. (flutter/engine#7960) flutter/engine@9f92324fd Suppress deprecation warning for usage of Configuration.locale (flutter/engine#7973) flutter/engine@9b21ea857 Roll src/third_party/dart 385be0cf31..05bba46133 (6 commits) flutter/engine@e3f1bdc4d Roll src/third_party/skia adfc6e40df30..4dbb96dfaa04 (6 commits) (flutter/engine#7970) flutter/engine@e32531f0e Switch flutter's dart sdk to full and add dartdevc libraries (flutter/engine#7968) flutter/engine@fb1c543dd Link dart:* sources into engine for debugger source support (flutter/engine#7908) flutter/engine@dd3656a51 Roll src/third_party/dart 0f9a5198bd..385be0cf31 (14 commits) flutter/engine@4434a39c7 Add api 21 check to LocalizationChannel.java (flutter/engine#7967)
flutter/engine@4434a39...3e4e6f5 git log 4434a39..3e4e6f5 --no-merges --oneline 3e4e6f5 Provide batching for semantics updates (flutter/engine#7988) 0852795 Roll src/third_party/skia ff84d8a900d4..67d87128fd00 (7 commits) (flutter/engine#7987) 1089b5c Check for a null pressure range for motion events (flutter/engine#7986) b7d5129 [macos] Add hover support to FLEViewController (flutter/engine#7975) a82c7ee Add async events to pipeline flows. (flutter/engine#7985) c3eb7ae Roll src/third_party/skia ab3f8674c9d2..ff84d8a900d4 (1 commits) (flutter/engine#7983) 1579328 Roll src/third_party/dart 9450c6d829..40bab34fbd (8 commits) b324969 Roll src/third_party/dart e94e797d7b..9450c6d829 (8 commits) 3f3e4ec Roll src/third_party/skia f6faf2fcea7b..ab3f8674c9d2 (2 commits) (flutter/engine#7980) d162ad8 Roll src/third_party/skia 4dbb96dfaa04..f6faf2fcea7b (7 commits) (flutter/engine#7977) 5deb15c Roll src/third_party/dart 05bba46133..e94e797d7b (5 commits) 4db7c30 Android Embedding PR 10: Add system channels to FlutterEngine. (flutter/engine#7960) 9f92324 Suppress deprecation warning for usage of Configuration.locale (flutter/engine#7973) 9b21ea8 Roll src/third_party/dart 385be0cf31..05bba46133 (6 commits) e3f1bdc Roll src/third_party/skia adfc6e40df30..4dbb96dfaa04 (6 commits) (flutter/engine#7970) e32531f Switch flutter's dart sdk to full and add dartdevc libraries (flutter/engine#7968) fb1c543 Link dart:* sources into engine for debugger source support (flutter/engine#7908) dd3656a Roll src/third_party/dart 0f9a5198bd..385be0cf31 (14 commits) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff (garyq@google.com), and stop the roller if necessary.
I still have this problem, my current version is 1.2.1, I already have this modification record, but it doesn't work. |
@fishyer would you mind filing another bug, including your Flutter doctor output, along with your current crash log? |
@matthew-carroll this is my flutter doctor output : this is my crash log
this is my layout.xml
the fr_flutter is my FlutterView's parent |
@matthew-carroll When I pull down, hold it down and slide it up for a while, it will definitely crash. |
@fishyer Comparing your crash log with the current code in Can you please try this same situation with the latest version of master and report back with an updated crash log, or let us know if the issue is resolved? |
Same here when start FlutterActivity:device: Xiaomi5 running Android6.0
crash log:
|
Virtual device is only for keyboard sources, not mouse or touchscreen sources. Here is the value of InputDevice.getDevice(-1).toString(): Input Device -1: Virtual Descriptor: ... Generation: 2 Location: built-in Keyboard Type: alphabetic Has Vibrator: false Has mic: false Sources: 0x301 ( keyboard dpad ) InputDevice.getDeviceId() documentation says: > An id of zero indicates that the event didn't come from a physical > device and maps to the default keymap. <https://developer.android.com/reference/android/view/InputEvent#getDeviceId()> However, injecting events with a device id of 0 causes event.getDevice() to be null on the client-side. Commit 26529d3 used -1 as a workaround to avoid a NPE on a specific Android TV device. But this is a bug in the device system, which wrongly assumes that input device may not be null. A similar issue was present in Flutter, but it is now fixed: - <flutter/flutter#30665> - <flutter/engine#7986> On the other hand, using an id of -1 for touchscreen events (which is invalid) causes issues for some apps: <#2125 (comment)> Therefore, use a device id of 0. An alternative could be to find an existing device matching the source, like "adb shell input" does. See getInputDeviceId(): <https://android.googlesource.com/platform/frameworks/base.git/+/master/cmds/input/src/com/android/commands/input/Input.java> But it seems better to indicate that the event didn't come from a physical device, and it would not solve #962 anyway, because an Android TV has no touchscreen. Refs #962 <#962> Fixes #2125 <#2125>
Virtual device is only for keyboard sources, not mouse or touchscreen sources. Here is the value of InputDevice.getDevice(-1).toString(): Input Device -1: Virtual Descriptor: ... Generation: 2 Location: built-in Keyboard Type: alphabetic Has Vibrator: false Has mic: false Sources: 0x301 ( keyboard dpad ) InputDevice.getDeviceId() documentation says: > An id of zero indicates that the event didn't come from a physical > device and maps to the default keymap. <https://developer.android.com/reference/android/view/InputEvent#getDeviceId()> However, injecting events with a device id of 0 causes event.getDevice() to be null on the client-side. Commit 26529d3 used -1 as a workaround to avoid a NPE on a specific Android TV device. But this is a bug in the device system, which wrongly assumes that input device may not be null. A similar issue was present in Flutter, but it is now fixed: - <flutter/flutter#30665> - <flutter/engine#7986> On the other hand, using an id of -1 for touchscreen events (which is invalid) causes issues for some apps: <#2125 (comment)> Therefore, use a device id of 0. An alternative could be to find an existing device matching the source, like "adb shell input" does. See getInputDeviceId(): <https://android.googlesource.com/platform/frameworks/base.git/+/master/cmds/input/src/com/android/commands/input/Input.java> But it seems better to indicate that the event didn't come from a physical device, and it would not solve #962 anyway, because an Android TV has no touchscreen. Refs #962 <#962> Fixes #2125 <#2125>
Fixes flutter/flutter#28490