Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard Freezing on Samsung Galaxy J Max Tab - 32bit device with beta v1.12.13+hotfix.2 #46159

Closed
iampawan opened this issue Dec 5, 2019 · 38 comments
Assignees
Labels
a: text input Entering text in a text field or keyboard related problems customer: product engine flutter/engine repository. See also e: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Milestone

Comments

@iampawan
Copy link

iampawan commented Dec 5, 2019

@timsneath

Steps to Reproduce

  1. Open the app.
  2. Start typing on any text field.
  3. After some inputs, the keyboard freezes, you can still hear the ticking sound but it freezes with the OS at least for few mins.

The problem is happening with the Samsung Galaxy J Max tab with Android 5.1.1. Just FYI It has 32 Bit ARM-based CPUs.

I tried it with other channels. The build is working fine then.

Logs

[✓] Flutter (Channel beta, v1.12.13+hotfix.2, on Mac OS X 10.15.1 19B88, locale
en-GB)
• Flutter version 1.12.13+hotfix.2 at /Users/pawankumar/flutter
• Framework revision 4f54e46 (22 hours ago), 2019-12-04 09:20:18 -0800
• Engine revision 6955b06
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/pawankumar/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.8.4

[✓] Android Studio
• Android Studio at /Applications/Android Studio 3.6 Preview.app/Contents
• Flutter plugin version 41.2.3
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)

[✓] Android Studio
• Android Studio at /Applications/Android Studio 4.0 Preview.app/Contents
• Flutter plugin version 41.2.3
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.4)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 41.1.4
• Dart plugin version 192.7761

[✓] VS Code (version 1.40.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.6.0

[!] Connected device
! No devices available

! Doctor found issues in 1 category.

@tvolkert
Copy link
Contributor

tvolkert commented Dec 5, 2019

@dnfield

@kf6gpe kf6gpe added a: text input Entering text in a text field or keyboard related problems engine flutter/engine repository. See also e: labels. severe: customer critical customer: product labels Dec 5, 2019
@dnfield
Copy link
Contributor

dnfield commented Dec 5, 2019

Have a couple devices that seem close, going to try to reproduce.

@dnfield
Copy link
Contributor

dnfield commented Dec 5, 2019

Tried on a Samsung Galaxy Tab S 10.5, did not reproduce.

Tried on Samsung Galaxy Tab 3 Lite, also didn't reproduce.

@iampawan the app I'm trying is just our default app from Flutter create with a text field added. I'm selecting the text field and just typing a bunch of random letters quickly for a minute. I'll try to track down the exact device you're on, but it'd be helpful to know if I'm just not using the right test :)

@dnfield
Copy link
Contributor

dnfield commented Dec 5, 2019

Also, FWIW, the devices I'm testing are on Android 4.4.2 (API 19) and 4.2.2 (API 17).

They're both armv7/32-bit.

@dnfield
Copy link
Contributor

dnfield commented Dec 5, 2019

I'm not able to track down a Galaxy Tab J Max either in our device lab, a bigger lab at Google, or on eBay :(

@iampawan
Copy link
Author

iampawan commented Dec 5, 2019

@dnfield no problem. Give me some time. I'll go to the office tomorrow morning IST and I will grab the device and try to perform the same thing with my other apps. Right now, I don’t have the device with me But I actually tried running the same app with the different channel and it started working fine.

@dnfield
Copy link
Contributor

dnfield commented Dec 5, 2019

@iampawan - it would be super helpful if you could bisect this issue since I'm not able to reproduce it. You should be able to do something like this on beta:

$ git bisect bad
$ git checkout stable
$ git bisect good

You'll then get walked through a bunch of commits by git. Run your app, try typing, if it freezes use git bisect bad, if not git bisect good. Eventually you should find the commit where things went wrong (probably an engine roll). That would help us narrow down things a bit more. If it's an engine roll, it may also be helpful to try all the engine commits in that roll to find out which one was bad.

@iampawan
Copy link
Author

iampawan commented Dec 5, 2019

@dnfield That's a very helpful suggestion. I'll definitely update you as soon as possible.

@tvolkert
Copy link
Contributor

tvolkert commented Dec 6, 2019

Note that I'm not marking this as a release blocker since we haven't been able to reproduce yet.

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

Hi, @tvolkert @dnfield This is what I could get using the above process.
Screenshot 2019-12-06 at 12 33 40 PM

[c382b8e] Roll engine 3dc233f..5540684 (5 commits) (#38756)

Wait ... I didn't complete it. I'll share a new one.

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

Also, it's not happening with normal text fields but it happens when I have text fields with focus nodes and I unfocus and request focus on other text fields. It's just my assumption though. I can make a video if you need.

@tvolkert
Copy link
Contributor

tvolkert commented Dec 6, 2019

Thanks for your help!

So did the bisect identify c382b8e as the commit that introduced this? If you sync to the commit before that commit (2200e58), does the problem go away? That commit is also in v1.9.1, so that would mean the bug is in stable right now...

What would be very helpful is if you could write a minimal sample app whose text field demonstrates this problem, so we can all agree on the code that we're testing against.

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

@tvolkert Actually I didn't complete it. I am doing it right now but it is taking time because with every commit I need to download the sdk again and again.

@tvolkert
Copy link
Contributor

tvolkert commented Dec 6, 2019

Ah, gotcha. Thanks again!

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

Hi, @tvolkert @dnfield I found the commit. Also, thanks for recommending these commands. I didn't know about it. Also, is there any way of doing this without downloading the SDK and build tools and running the app again and again.

6b66d79 is the first bad commit
commit 6b66d79
Author: Gary Qian garyq@google.com
Date: Wed Nov 20 16:37:10 2019 -0800

Track and use fallback TextAffinity for null affinity platform TextSelections. (#44622)

.../flutter/lib/src/painting/text_painter.dart | 9 +++--
packages/flutter/lib/src/rendering/editable.dart | 35 ++++++++++++++++++--
.../flutter/lib/src/services/text_editing.dart | 4 +--
packages/flutter/lib/src/services/text_input.dart | 5 ++-
.../flutter/test/painting/text_painter_test.dart | 38 ++++++++++++++++++++++
packages/flutter/test/rendering/editable_test.dart | 25 ++++++++++++++
.../flutter/test/services/text_input_test.dart | 31 ++++++++++++++++++
7 files changed, 139 insertions(+), 8 deletions(-)

Screenshot 2019-12-06 at 2 29 22 PM

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

I hope it helps. Let me know if you want anything else from my side.

@dnfield
Copy link
Contributor

dnfield commented Dec 6, 2019

@iampawan - just to be clear, if you checkout beta and revert 6b66d79, the issue goes away right?

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019 via email

@dnfield
Copy link
Contributor

dnfield commented Dec 6, 2019

/cc @gspencergoog or @GaryQian - that commit doesn't strike me as especially fishy, but maybe one of you know something more about Focus nodes and TextAffinity...

@tvolkert
Copy link
Contributor

tvolkert commented Dec 6, 2019

@iampawan any luck in getting a minimal app & repro steps in the app that demonstrates the problem?

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

@tvolkert I was out. Working on that just right now

@tvolkert
Copy link
Contributor

tvolkert commented Dec 6, 2019

Thanks!

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

Hi, @tvolkert @dnfield Pardon me for the worst code 😅I had to write to minimally reproduce it. https://gist.github.com/iampawan/efeff11154c6eba795ddf37730263968

Let me know if it works.

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019

Also, the implementation might be very poorly done by my team mate but it was working for some reason without this weird issue but today because I checked it, may be I would be able to fix it (not sure though) by trying few things in the code. But even if it has any exception or something it should give that error rather than freezing. And it should not work on other commits then. Let me know if you need any other information from my side.

@dnfield
Copy link
Contributor

dnfield commented Dec 6, 2019

When I try this I can't type anything at all...

@iampawan
Copy link
Author

iampawan commented Dec 6, 2019 via email

@cbracken
Copy link
Member

cbracken commented Dec 9, 2019

@iampawan once you've got a repro that works for you on other devices but not on the device in question, please post the code and we'll give it a look. It sounds like right now it's not working for us on any device.

@cbracken cbracken added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 9, 2019
@cbracken
Copy link
Member

cbracken commented Dec 9, 2019

@kf6gpe can we get this labelled with affected customers to better understand the impact here?

@cbracken cbracken added waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Dec 9, 2019
@dnfield
Copy link
Contributor

dnfield commented Dec 9, 2019

I missed what the code was doing there - I'm still not able to reproduce the keyboard freezing on the 32 bit Samsung tablets I have access to.

@kf6gpe
Copy link
Contributor

kf6gpe commented Dec 9, 2019

cc @timsneath, who should know which of the customers reported this.

@timsneath
Copy link
Contributor

timsneath commented Dec 9, 2019 via email

@Hixie
Copy link
Contributor

Hixie commented Dec 11, 2019

cc @GaryQian I took a guess and assigned this to you with a guess at the target milestone, please reassign if you're not the appropriate person. Thanks!

@Hixie Hixie added this to the February 2020 milestone Dec 11, 2019
@GaryQian
Copy link
Contributor

This was indeed introduced by 6b66d79

It is currently rolled back, pending a rewrite to avoid this and a few other flickering bugs this caused.

I will close this as I do not expect to reland without significant reworks.

@GaryQian
Copy link
Contributor

This may require a hotfix to fix it in stable.

@GaryQian
Copy link
Contributor

The following reverts are needed to hotfix this: #45698 as well as flutter/engine#14053 engine side

@GaryQian
Copy link
Contributor

cc @kf6gpe

@GaryQian
Copy link
Contributor

cc @tvolkert

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: text input Entering text in a text field or keyboard related problems customer: product engine flutter/engine repository. See also e: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

9 participants