-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Crash when switching screens on Android folding phone #114868
Comments
Triage reportI can reproduce this issue only on API 32. Seems to work correctly on API 33. Closing the device works for me while reopening it, crashes. Tested on the same emulator as OP mentioned above i.e. Error logsE/AndroidRuntime( 6745): java.lang.IllegalArgumentException: Bounds must be non zero
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.FoldingFeature.validateFeatureBounds(FoldingFeature.java:125)
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.FoldingFeature.<init>(FoldingFeature.java:95)
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.WindowLayoutComponentImpl.getDisplayFeatures(WindowLayoutComponentImpl.java:227)
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.WindowLayoutComponentImpl.getWindowLayoutInfo(WindowLayoutComponentImpl.java:176)
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.WindowLayoutComponentImpl.onDisplayFeaturesChanged(WindowLayoutComponentImpl.java:168)
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.WindowLayoutComponentImpl.$r8$lambda$XkTA_n58b4Cw9wT3LKS4oQrPVvA(Unknown Source:0)
E/AndroidRuntime( 6745): at androidx.window.extensions.layout.WindowLayoutComponentImpl$$ExternalSyntheticLambda0.run(Unknown Source:2)
E/AndroidRuntime( 6745): at androidx.window.util.BaseDataProducer.notifyDataChanged(BaseDataProducer.java:49)
E/AndroidRuntime( 6745): at androidx.window.util.PriorityDataProducer$$ExternalSyntheticLambda0.run(Unknown Source:2)
E/AndroidRuntime( 6745): at androidx.window.util.BaseDataProducer.notifyDataChanged(BaseDataProducer.java:49)
E/AndroidRuntime( 6745): at androidx.window.common.SettingsDevicePostureProducer.access$100(SettingsDevicePostureProducer.java:37)
E/AndroidRuntime( 6745): at androidx.window.common.SettingsDevicePostureProducer$SettingsObserver.onChange(SettingsDevicePostureProducer.java:92)
E/AndroidRuntime( 6745): at android.database.ContentObserver.onChange(ContentObserver.java:169)
E/AndroidRuntime( 6745): at android.database.ContentObserver.onChange(ContentObserver.java:187)
E/AndroidRuntime( 6745): at android.database.ContentObserver.onChange(ContentObserver.java:202)
E/AndroidRuntime( 6745): at android.database.ContentObserver.lambda$dispatchChange$0$ContentObserver(ContentObserver.java:282)
E/AndroidRuntime( 6745): at android.database.ContentObserver$$ExternalSyntheticLambda0.run(Unknown Source:10)
E/AndroidRuntime( 6745): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 6745): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6745): at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime( 6745): at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime( 6745): at android.app.ActivityThread.main(ActivityThread.java:7842)
E/AndroidRuntime( 6745): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 6745): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime( 6745): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
I/Process ( 6745): Sending signal. PID: 6745 SIG: 9
Lost connection to device. |
I have similar Firebase Crashlytics happening on product project, Android 12 Xiaomi MIX Fold error log
|
@SnowZero Just you need is to open the build.gradle, the path for this file is: android/app/build.gradle.
I found the solution on stack overflow, see at: https://stackoverflow.com/questions/74163927/flutter-chrash-in-android-12l-with-no-interface-method-addwindowlayoutinfoliste |
@SnowZero did the workaround mentioned by @PhRezende-eng work for you, or if not are you still able to reproduce this issue with the latest version of Flutter? |
This issue still exists in Flutter 3.13.1 |
@mariamhas Was this a reported issue for the Wonderous app as well when getting large screen Tier 2 certified? |
I was not able to reproduce this with Wonderous Android app running on an actual foldable phone, I suspect this may only happen in the emulator. |
Still reproducible in 3.22.1. More details from ADB in #149115
|
This seems to be an issue on native side with |
…0, and Fix test failures blocking androidx upgrade (#149204) PR to pave the way for flutter/engine#53001 to re-land Summary: - Enforces use of Kotlin >= `1.7.0` (please see below note) - Fixes ci failures that prevented the above PR from landing. Details: Because it landed initially, we are able to fake the roll in this PR to fix all the tests ([see my comment](#149204 (comment))). Fixes all the tests that failed: 1. `module_test` failing on multiple platforms (3/9 of the failures). Failure is ``` > Android resource linking failed ERROR:/b/s/w/ir/x/t/flutter_module_test.KECMXW/hello/.android/plugins_build_output/device_info/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found. ``` This is a rather unhelpful error message but some [folks online suggest](https://stackoverflow.com/a/69050529) that upgrading your `compileSdk` version fixes this. These resolve when I remove the dependency on the long discontinued [package_info](https://pub.dev/packages/package_info) and [device_info](https://pub.dev/packages/device_info) packages, perhaps because they are transitively pulling in low `compileSdk` versions? This is unclear to me. 2. `module_custom_host_app_name_test` was failing for the same reason (another 3/9, or cumulative 6/9). 3. `tool_integration_tests_3_4` was a flake ð��� (7/9) 4. `framework_tests_slow` needed a newer version of the Kotlin Gradle plugin (the flutter tool tells us this, so I just upgraded as suggested) and it resolved (8/9) 5.`android_preview_tool_integration_tests` needed newer AGP and KGP versions. I also refactored the tests, and bumped our error versions, fixing #142653. **Note that the bump to KGP is not in line with our policy** - we didn't warn for `1.5.0-1.6.x` for a release (or at all) before dropping support. But I think it might still be justified: - The bump to our androidx libraries unblocks ongoing Scribe work, and also includes a fix for a [memory leak](#129307 (comment)) and a [crash on folding phones](#114868 (comment)), among many other bug fixes. - Gradle [doesn't test on half of that range](https://docs.gradle.org/current/userguide/compatibility.html#kotlin), and so we implicitly can't claim to support it either. More generally, our Java and Kotlin support ranges should probably strictly fall within what Gradle tests.
Steps to Reproduce
7.6 Fold-in with outer display API 32
Demo
flutter doctor
The text was updated successfully, but these errors were encountered: