首页 > 解决方案 > Flutter 应用程序在 iPhone Xr (iOS 13) 上崩溃,但在 Android(物理和模拟器)、旧 iPhone 或 iOS 模拟器上从未崩溃

问题描述

Flutter 应用程序在物理 iPhone Xr (iOS 13) 上随机崩溃,并出现“io.flutter.1.gpu (8): signal SIGABRT”,但在 Android、旧 iPhone 或 iOS 模拟器上从来没有。

当我在应用程序中导航时(在随机屏幕上)发生崩溃。

堆栈跟踪是:

2020-02-05 18:46:41.225735+0100 Runner[30726:12308684]  - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-02-05 18:46:41.387987+0100 Runner[30726:12308605] Metal API Validation Enabled
2020-02-05 18:46:41.632361+0100 Runner[30726:12308605] Configuring the default Firebase app...
2020-02-05 18:46:41.632786+0100 Runner[30726:12308706] flutter: Observatory listening on http://127.0.0.1:60139/AuOqNpK5gxY=/
2020-02-05 18:46:41.633329+0100 Runner[30726:12308688] 6.15.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
2020-02-05 18:46:41.694350+0100 Runner[30726:12308693] 6.15.0 - [GoogleUtilities/AppDelegateSwizzler][I-SWZ001011] App Delegate Proxy is disabled.
2020-02-05 18:46:41.694417+0100 Runner[30726:12308693] 6.15.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60201000 started
2020-02-05 18:46:41.694445+0100 Runner[30726:12308693] 6.15.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2020-02-05 18:46:41.700683+0100 Runner[30726:12308710] 6.15.0 - [Firebase/Analytics][I-ACS025036] App Delegate Proxy is disabled
2020-02-05 18:46:41.715063+0100 Runner[30726:12308605] Configured the default Firebase app __FIRAPP_DEFAULT.
2020-02-05 18:46:42.004500+0100 Runner[30726:12308684] 6.15.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
validateFunctionArguments:3485: failed assertion `Vertex Function(#main): argument vertexBuffer.0[0] from buffer(15) with offset(32756) and length(32768) has space for 12 bytes, but argument has a length(60).'

颤振医生-v

[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.2 19C57, locale en-CH)
    • Flutter version 1.12.13+hotfix.7 at /Users/isaak/Developer/flutter
    • Framework revision 9f5ff2306b (11 days ago), 2020-01-26 22:38:26 -0800
    • Engine revision a67792536c
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/isaak/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.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

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

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

[✓] Connected device (2 available)
    • My iPhone Xr • 00008020-001A49861A83002E            • ios • iOS 13.3
    • iPhone 11 Pro Max                        • A801E977-723C-44AB-8525-88B0DEAC4063 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

• No issues found!

我不知道如何解决这个问题,因为我没有看到我的颤振/飞镖代码与错误之间的相关性。

我将非常感谢任何可能的原因/修复或如何解决它的指导的解释。

标签: flutterios13

解决方案


他们说 iOS 13 在读取应用程序的文件和日志方面有一些变化。Flutter 团队正在努力使未来的升级保持稳定。新的更新“Flutter 1.12.13+hotfix.7”更加稳定。即使在处理多个 api 时它会抛出“n”条错误行,它也会完成构建并使其响应

尝试使用升级颤振Flutter Upgrade


推荐阅读