syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.55k stars 756 forks source link

[Crash!!!] Some data may cause the App to crash on iOS #1980

Closed iStarEternal closed 2 weeks ago

iStarEternal commented 2 months ago

Bug description

Only crash on iOS,Android is not affected.

Steps to reproduce

Banana you a Guava.

Code sample

Code sample ```dart import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_charts/charts.dart'; class ChartBugPage extends StatelessWidget { const ChartBugPage({super.key}); @override Widget build(BuildContext context) { final jsonStr = testJson3(); // It's crash data var jsonData = jsonDecode(jsonStr)['outputPower'] as List; // jsonData = jsonData.sublist(0, jsonData.length - 1); // There is no crash data. return Scaffold( appBar: AppBar(), body: Container( height: 300, width: double.infinity, alignment: Alignment.center, child: SfCartesianChart( primaryXAxis: DateTimeAxis(), // primaryXAxis: NumericAxis(), primaryYAxis: NumericAxis(), trackballBehavior: TrackballBehavior(enable: true), series: [ AreaSeries( name: 'test', dataSource: jsonData, xValueMapper: (v, i) => DateTime.fromMillisecondsSinceEpoch(v['ts']), // xValueMapper: (v, i) => v['ts'], yValueMapper: (v, i) => v['value'], ) ], ), ), ); } String testJson3() { return ''' { "outputPower": [ { "value": 797.0, "ts": 1721007900000 }, { "value": 796.0, "ts": 1721008200000 }, { "value": null, "ts": 1721008500000 }, { "value": null, "ts": 1721008800000 }, { "value": null, "ts": 1721009100000 }, { "value": null, "ts": 1721009400000 }, { "value": null, "ts": 1721009700000 }, { "value": null, "ts": 1721010000000 }, { "value": null, "ts": 1721010300000 }, { "value": null, "ts": 1721010600000 }, { "value": null, "ts": 1721010900000 }, { "value": null, "ts": 1721011200000 }, { "value": 0.0, "ts": 1721011500000 }, { "value": 0.0, "ts": 1721011800000 }, { "value": 0.0, "ts": 1721012100000 }, { "value": 0.0, "ts": 1721012400000 }, { "value": 0.0, "ts": 1721012700000 }, { "value": 0.0, "ts": 1721013000000 }, { "value": null, "ts": 1721013300000 }, { "value": 0.0, "ts": 1721013600000 }, { "value": 0.0, "ts": 1721013900000 }, { "value": 0.0, "ts": 1721014200000 }, { "value": 0.0, "ts": 1721014500000 }, { "value": 0.0, "ts": 1721014800000 }, { "value": 0.0, "ts": 1721015100000 }, { "value": null, "ts": 1721015400000 }, { "value": 0.0, "ts": 1721015700000 } ] } '''; } } ```

Screenshots or Video

Banana you a Guava.

Stack Traces

Lost connection to device. Error: Unable to terminate com.things-x.a on 23CA6A35-D352-4CEE-A992-21A64C4D454C: ProcessException: Process exited abnormally with exit code 3: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3): Simulator device returned an error for the requested operation. found nothing to terminate Underlying error (domain=NSPOSIXErrorDomain, code=3): The request to terminate "com.things-x.a" failed. found nothing to terminate found nothing to terminate Command: /usr/bin/arch -arm64e xcrun simctl terminate 23CA6A35-D352-4CEE-A992-21A64C4D454C com.things-x.a the Dart compiler exited unexpectedly.

On which target platforms have you observed this bug?

iOS

Flutter Doctor output

[✓] Flutter (Channel stable, 3.22.2, on macOS 13.5 22G74 darwin-arm64, locale zh-Hans-CN) • Flutter version 3.22.2 on channel stable at /Users/star/flutter/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 761747bfc5 (6 weeks ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/star/Library/Android/sdk • Platform android-34, build-tools 33.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C500b • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.1) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin version 74.0.4 • Dart plugin version 231.9065

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

[✓] Connected device (5 available) • 23113RKC6C (mobile) • 2e2ea35 • android-arm64 • Android 14 (API 34) • iPhone 15 (mobile) • 23CA6A35-D352-4CEE-A992-21A64C4D454C • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.5 22G74 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 13.5 22G74 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127

[✓] Network resources • All expected network resources are available.

• No issues found!

ghost commented 1 month ago

Hi @iStarEternal,

We have validated your query and replicated the reported issue on the iOS platform. However, the issue did not occur when we disabled Impeller and ran the sample on the iOS platform. We are currently investigating possible solutions to fix this issue. Further details will be provided within two business days on July 23, 2024. In the meantime, you can resolve this issue by disabling Impeller using the steps provided in the link below.

Link: https://docs.flutter.dev/perf/impeller#ios

Regards, Lokesh P.

Yuvaraj-Gajaraj commented 1 month ago

Hi @iStarEternal ,

We have tried to find the root cause for this rendering issue to create an issue in the framework unfortunately we weren't able to find the root cause. Then we have to check with the latest Flutter SDK version 3.22.3 and now the AreaSeries in SfCartesianChart is rendered properly and the application is not crashed.

We have shared the screen recording of Flutter SDK 3.22.2 and 3.22.3 versions, so we recommend you upgrade the Flutter SDK version to the latest 3.22.3. In the latest Flutter SDK version 3.22.3 they have fixed the iOS-related rendering issue and we have shared the related link below for your reference.

3.22.2 3.22.3
ScreenRecording2024-07-23at6 32 18PM-ezgif com-video-to-gif-converter ScreenRecording2024-07-23at6 39 14PM-ezgif com-video-to-gif-converter

3.22.3 release update: https://groups.google.com/g/flutter-announce/c/zThj7-7rQhs

Regards, Yuvaraj.