Closed yaochangliang159 closed 1 month ago
when i downgrade flutter sdk from master 3.26 to stable 3.22,it works well on huawei mate 60,there have no crash! why? Does it means the future flutter sdk stable version will still crash on huawei mate 60????
This device is a harmony OS device, right? Do you know what Android api level it is running on?
It looks like the application is crashing on something in the Vulkan driver. Flutter now uses Vulkan on devices that support it.
Its not possible for me to say by looking at the obfuscated stack trace whether this is caused by a bug in the flutter engine or a bug in this particular device/vulkan driver. To start with you could try running with --enable-vulkan-validation. That will show some valudation messages if there is API misuse.
Another path to try would be to disable the android surface control. That can be done with the AndroidManifest setting
<meta-data
android:name="ioio.flutter.embedding.android.DisableSurfaceControl"
android:value="true" />
If that doesn't work you could opt back into the old Skia renderer:
<meta-data
android:name="ioio.flutter.embedding.android.EnableImpeller"
android:value="false" />
However we will eventually remove this option as long term we only plan to support one rendering backend.
EDIT: I forgot to include the manifest configuration in "```" so it didn't show up, fixed now.
@yaochangliang159
i Expected that flutter 3.26 build an android app can work well on huawei mate60、huawei mate X5
Huawei Mate60 and Huawei Mate X5 are HarmonyOS devices outside Europe (links: 1, 2) and flutter doesn't support HarmonyOS
so the correct approach should be a custom embedder
@jonahwilliams YES it is harmony OS device,you can test this device on this web site: 泽众云真机,click me! this web site Free use for 30 minutes for new register user
@iapicca you say "flutter doesn't support HarmonyOS",but why i downgrade flutter to 3.22.4,it can run app to huawei mate60 works well? it happens on flutter 3.26,app crashed,you can try it on this web site: https://atc.alltesting.cn:8888/atc/debug/test
@yaochangliang159 @iapicca lets keep this discussion focused on the bug report.
Waiting on:
@jonahwilliams i add this code to manifest node,but app still crash :
<meta-data
android:name="io.flutter.embedding.android.DisableSurfaceControl"
android:value="true" />
<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false" />
@jonahwilliams
i add device_info_plus: ^11.0.0 in yaml file and i add this code in initState method:
Future<void> printDeviceInfo() async {
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
String result =androidInfo.toString();
print('androidInfo: ${androidInfo.toString()}');
}
this is my print:
BaseDeviceInfo{data: {product: ALN-AL80, supportedAbis: [arm64-v8a, armeabi-v7a, armeabi], serialNumber: unknown, supported32BitAbis: [armeabi-v7a, armeabi], display: ALN-AL80 4.2.0.120(SP5C00E100R4P16), type: user, isPhysicalDevice: true, version: {baseOS: , securityPatch: 2021-10-05, sdkInt: 31, release: 12, codename: REL, previewSdkInt: 0, incremental: 104.2.0.120SP5C00}, systemFeatures: [android.hardware.sensor.proximity, android.hardware.sensor.accelerometer, android.software.controls, android.hardware.faketouch, android.hardware.usb.accessory, android.software.backup, android.hardware.touchscreen, android.hardware.touchscreen.multitouch, android.software.print, android.hardware.consumerir, com.huawei.emui.api.23, com.huawei.software.features.full, android.software.activities_on_secondary_displays, android.software.voice_recognizers, android.software.picture_in_picture, android.hardware.fingerprint, android.hardware.sensor.gyroscope, android.hardware.audio.low_latency, android.software.vulkan.deqp.level, android.software.cant_save_state, android.hardware.security.model.compatible, android.hardware.opengles.aep, android.hardware.bluetooth, android.hardware.camera.autofocus, android.hardware.telephony.gsm, android.hardware.telephony.ims, android.software.incremental_delivery, android.hardware.se.omapi.ese, android.software.opengles.deqp.level, android.hardware.usb.host, android.hardware.audio.output, android.software.verified_boot, android.hardware.camera.flash, android.hardware.camera.front, android.hardware.se.omapi.uicc, android.hardware.screen.portrait, android.hardware.nfc, com.nxp.mifare, android.hardware.sensor.stepdetector, android.software.home_screen, com.huawei.system.feature, android.hardware.microphone, com.huawei.software.features.huawei, android.software.autofill, android.software.securely_removes_users, android.hardware.bluetooth_le, android.hardware.sensor.compass, android.hardware.touchscreen.multitouch.jazzhand, android.hardware.sensor.barometer, android.software.app_widgets, android.software.input_methods, android.hardware.sensor.light, android.hardware.vulkan.version, android.software.companion_device_setup, android.software.device_admin, android.hardware.wifi.passpoint, android.hardware.camera, android.hardware.screen.landscape, android.hardware.ram.normal, android.software.managed_users, android.software.webview, android.hardware.sensor.stepcounter, android.hardware.camera.capability.manual_post_processing, android.hardware.camera.any, android.hardware.vulkan.compute, com.huawei.software.features.china, android.software.connectionservice, android.hardware.touchscreen.multitouch.distinct, android.hardware.location.network, android.software.cts, android.software.app_enumeration, android.hardware.wifi.direct, android.software.live_wallpaper, android.software.ipsec_tunnels, android.software.freeform_window_management, android.hardware.nfc.hcef, android.hardware.nfc.uicc, android.hardware.location.gps, android.software.midi, android.hardware.nfc.any, android.hardware.nfc.hce, com.huawei.software.features.handset, android.hardware.wifi, android.hardware.location, android.hardware.vulkan.level, android.software.secure_lock_screen, huawei.android.hardware.stylus, android.hardware.telephony, android.software.file_based_encryption], manufacturer: HUAWEI, tags: release-keys, supported64BitAbis: [arm64-v8a], bootloader: unknown, fingerprint: HUAWEI/ALN-AL80/HWALN:12/HUAWEIALN-AL80/104.2.0.120SP5C00:user/release-keys, host: cn-west-hcd-5a-d4f16f6941713243224288-589f66ffbd-l75dx, isLowRamDevice: false, model: ALN-AL80, id: HUAWEIALN-AL80, brand: HUAWEI, device: HWALN, board: ALN, hardware: kirin9000s}}
I tried to symbolicate as below but it seems to be coming back with same info:
dart pub global run symbolizer:symbolize https://github.com/flutter/flutter/issues/156623#issue-2582243695 "flutter#ee624bc arm64 debug force android"
dhs@Dhss-MacBook-Pro ~ % dart pub global run symbolizer:symbolize https://github.com/flutter/flutter/issues/156623#issue-2582243695 "flutter#ee624bc arm64 debug force android"
INFO: 2024-10-15 11:22:38.909128: checking for llvm-{symbolizer,readobj,objdump} in $PATH
INFO: 2024-10-15 11:22:38.935906: checking for llvm-{symbolizer,readobj,objdump} in tools/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/
INFO: 2024-10-15 11:22:38.967790: checking for llvm-{symbolizer,readobj,objdump} in /Users/dhs/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/
INFO: 2024-10-15 11:22:40.293778: downloading /var/folders/w0/6j3m5z913hbd94smbfmz6y6h0000gn/T/symbols-cache/059e4e6d8ff6de39c29441c53e949bfb0bf17972-android-arm64 for EngineBuild(engineHash: 059e4e6d8ff6de39c29441c53e949bfb0bf17972, variant: EngineVariant(os: android, arch: arm64, mode: debug))
INFO: 2024-10-15 11:22:40.296135: gsutil cp gs://flutter_infra_release/flutter/059e4e6d8ff6de39c29441c53e949bfb0bf17972/android-arm64/symbols.zip /var/folders/w0/6j3m5z913hbd94smbfmz6y6h0000gn/T/kuJjrM/symbols.zip
INFO: 2024-10-15 11:23:00.078290: Symbolizing using /var/folders/w0/6j3m5z913hbd94smbfmz6y6h0000gn/T/symbols-cache/059e4e6d8ff6de39c29441c53e949bfb0bf17972-android-arm64/libflutter.so
--------------------------------------------------------------------------------
symbolized using symbols for 059e4e6d8ff6de39c29441c53e949bfb0bf17972 android-arm64-debug
#00 0000000000000000 <unknown>
#01 0000000000165c5c /vendor/lib64/hw/vulkan.hvgr_v200.so (BuildId: 44d3bc026e1dcb7c91763d53eabba274)
#02 00000000002f9e68 /vendor/lib64/hw/vulkan.hvgr_v200.so (BuildId: 44d3bc026e1dcb7c91763d53eabba274)
#03 00000000002fb4f0 /vendor/lib64/hw/vulkan.hvgr_v200.so (BuildId: 44d3bc026e1dcb7c91763d53eabba274)
#04 0000000000234210 /vendor/lib64/hw/vulkan.hvgr_v200.so (BuildId: 44d3bc026e1dcb7c91763d53eabba274)
#05 00000000000fc370 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+176) (BuildId: 82f181b5d9da8999785cca84af3dad4b)
#06 000000000009a4fc /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+40) (BuildId: 82f181b5d9da8999785cca84af3dad4b)
--------------------------------------------------------------------------------
dhs@Dhss-MacBook-Pro ~ %
I will keep the issue open for team's tracking.
@yaochangliang159 does you app still have an Android Manifest? If so, please confirm where you added this data. It needs to be metadata under the <application>
tag
Also please try them one at a time.
@jonahwilliams i add this code under application tag in manifest
<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />
thank you very much!!!!! thank you very much!!! thank you very much!!!
@yaochangliang159 can you separately try the other flag? Like I mentioned, we will eventually remove Skia support too, so any hints as to why its crashing would be helpful
@jonahwilliams when i only add this code under application tag,App Crash:
<meta-data android:name="io.flutter.embedding.android.DisableSurfaceControl" android:value="true" />
when i only add this code under application tag,App Works Well:
<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />
Thank you @yaochangliang159 ! one more flag if you have time to check. This one will only work in debug mode:
<meta-data android:name="io.flutter.embedding.android.ImpellerBackend" android:value="opengles" />
This will switch the app to using the Impeller OpenGLES backend.
@jonahwilliams
yes, you are right!when i only add this code under application tag:
<meta-data android:name="io.flutter.embedding.android.ImpellerBackend" android:value="opengles" />
Thanks again @yaochangliang159 . So the situation is:
Using Skia OpenGL works (via opting out of Impeller) Using the Impeller OpenGL backend works (via debug opt in) - but this isn't supported in release builds as its just a debug flag.
It seems like a reasonable short term change is to add this driver to the denylist so that it continues to use Skia OpenGL, and later when we finish the Impeller OpenGL backend it can use that. In the meantime, you can opt out of impeller with the EnableImpeller
manifest flag.
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.
Steps to reproduce
1.create new flutter project with flutter sdk 3.26 2.run app to huawei mate60 or mate x5 3.APP crash
Expected results
i Expected that flutter 3.26 build an android app can work well on huawei mate60、huawei mate X5
Actual results
Code sample
this is my demo code(720KB),it is jush a new flutter project test001.zip
Screenshots or Video
No response
Logs
Flutter Doctor output
Last login: Fri Oct 11 20:50:04 on ttys000 yaochangliang@yaochangliang ~ % flutter doctor