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

crash when return to previous page in iOS #128018

Closed
2 tasks done
yinanwang1 opened this issue Jun 1, 2023 · 10 comments
Closed
2 tasks done

crash when return to previous page in iOS #128018

yinanwang1 opened this issue Jun 1, 2023 · 10 comments
Labels
r: invalid Issue is closed as not valid

Comments

@yinanwang1
Copy link

yinanwang1 commented Jun 1, 2023

Is there an existing issue for this?

Steps to reproduce

There are two pages A & B.

  1. A page navigate to B page.
  2. B page return to A page.
  3. Crash.

Expected results

It returns to A page and works well.

Actual results

It crashes when return to previous page.

Code sample

  1. Navigator.of(context).pushNamed("/customerService/search");
  2. Navigator.of(context).pop();

Screenshots or Video

image

Logs
* thread #1, queue = 'com.apple.main-thread', stop reason = hit Objective-C exception
    frame #0: 0x00000001bc8c2b1c libobjc.A.dylib`objc_exception_throw
    frame #1: 0x00000001a8f7bd98 CoreFoundation`_CFThrowFormattedException   112
    frame #2: 0x00000001a8f795c4 CoreFoundation`-[__NSArrayM insertObject:atIndex:].cold.1   48
    frame #3: 0x00000001a8df9ee0 CoreFoundation`-[__NSArrayM insertObject:atIndex:]   996
    frame #4: 0x000000010711d420 Flutter`___lldb_unnamed_symbol2231   5204
    frame #5: 0x00000001074c5800 Flutter`___lldb_unnamed_symbol16639   1340
    frame #6: 0x00000001074c5a58 Flutter`___lldb_unnamed_symbol16646   28
    frame #7: 0x00000001073ccae8 Flutter`___lldb_unnamed_symbol12781   72
    frame #8: 0x00000001074c5174 Flutter`___lldb_unnamed_symbol16638   296
    frame #9: 0x00000001074c69a0 Flutter`___lldb_unnamed_symbol16670   272
    frame #10: 0x00000001074c5c98 Flutter`___lldb_unnamed_symbol16654   448
    frame #11: 0x00000001074c6680 Flutter`___lldb_unnamed_symbol16661   148
    frame #12: 0x00000001073cb120 Flutter`___lldb_unnamed_symbol12748   568
    frame #13: 0x00000001073ce44c Flutter`___lldb_unnamed_symbol12824   32
    frame #14: 0x00000001a8e923d0 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__   28
    frame #15: 0x00000001a8e91fd4 CoreFoundation`__CFRunLoopDoTimer   1004
    frame #16: 0x00000001a8e914b4 CoreFoundation`__CFRunLoopDoTimers   324
    frame #17: 0x00000001a8e8b840 CoreFoundation`__CFRunLoopRun   1912
    frame #18: 0x00000001a8e8ab90 CoreFoundation`CFRunLoopRunSpecific   572
    frame #19: 0x00000001bf1ad598 GraphicsServices`GSEventRunModal   160
    frame #20: 0x00000001ab774638 UIKitCore`-[UIApplication _run]   1052
    frame #21: 0x00000001ab779bb8 UIKitCore`UIApplicationMain   164
  * frame #22: 0x0000000102290770 Dispatcher`main(argc=1, argv=0x000000016dc57760) at main.m:14:16
    frame #23: 0x00000001a8b69588 libdyld.dylib`start   4
Flutter Doctor output
[✓] Flutter (Channel stable, 3.10.2, on macOS 13.4 22F66 darwin-arm64, locale en-CN)
    • Flutter version 3.10.2 on channel stable at /Users/arthurwang/Public/Flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cd3d0d9ff (8 days ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1
    • 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.1)
    • Android SDK at /Users/arthurwang/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6 0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode14.2.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.2)
    • 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 17.0.6 0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Community Edition (version 2022.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhoneX (mobile) • f8c2808cdcb0ed85514012a6e1266dc0d3021ebf • ios            • iOS 14.2 18B92
    • macOS (desktop)  • macos                                    • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 113.0.5672.126
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Jun 1, 2023
@danagbemava-nc
Copy link
Member

Hi @yinanwang1, please provide a complete minimal reproducible code sample so that we can investigate this.

Are you by any chance using a platform view in your screens?

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 1, 2023
@danagbemava-nc danagbemava-nc added r: invalid Issue is closed as not valid and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels Jun 2, 2023
@yinanwang1
Copy link
Author

yinanwang1 commented Jun 2, 2023

It is difficult to create a demo and reproduce this issue. Now, I catch this crash stack in Xcode when I am running my own app. Please have a look.

2023-06-02 14:33:28.667253 0800 Dispatcher[848:128300] [Bugly] Trapped uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
(
0 CoreFoundation 0x00000001950899e8 96F8386D-D88A-3C89-A323-A17975C3317F 1157608
1 libobjc.A.dylib 0x00000001a8a3ab54 objc_exception_throw 56
2 CoreFoundation 0x00000001950f3d98 96F8386D-D88A-3C89-A323-A17975C3317F 1592728
3 CoreFoundation 0x00000001950f15c4 96F8386D-D88A-3C89-A323-A17975C3317F 1582532
4 CoreFoundation 0x0000000194f71ee0 96F8386D-D88A-3C89-A323-A17975C3317F 12000
5 Flutter 0x00000001096eeb4c _ZN7flutter23IOSExternalViewEmbedder11SubmitFrameEP15GrDirectContextNSt21_LIBCPP_ABI_NAMESPACE10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE 5232
6 Flutter 0x0000000109a98f24 _ZN7flutter10Rasterizer19DrawToSurfaceUnsafeERNS_20FrameTimingsRecorderERNS_9LayerTreeE 1348
7 Flutter 0x0000000109a999d4 _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIZN7flutter10Rasterizer13DrawToSurfaceERNS2_20FrameTimingsRecorderERNS2_9LayerTreeEE3$_1NS_9allocatorIS8_EEFvvEEclEv 28
8 Flutter 0x000000010999e864 _ZNK3fml10SyncSwitch7ExecuteERKNS0_8HandlersE 72
9 Flutter 0x0000000109a98880 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_20FrameTimingsRecorderERNS_9LayerTreeE 272
10 Flutter 0x0000000109a9a950 _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIZN7flutter10Rasterizer4DrawERKNS_10shared_ptrINS2_8PipelineINS2_13LayerTreeItemEEEEENS_8functionIFbRNS2_9LayerTreeEEEEE3$1NS_9allocatorISG_EEFvNS_10unique_ptrIS6_NS_14default_deleteIS6_EEEEEEclEOSM 312
11 Flutter 0x0000000109a99c20 _ZN7flutter10Rasterizer4DrawERKNSt21_LIBCPP_ABI_NAMESPACE10shared_ptrINS_8PipelineINS_13LayerTreeItemEEEEENS1_8functionIFbRNS_9LayerTreeEEEE 460
12 Flutter 0x0000000109a9a608 _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIN3fml8internal14CopyableLambdaIZN7flutter10Rasterizer4DrawERKNS_10shared_ptrINS5_8PipelineINS5_13LayerTreeItemEEEEENS_8functionIFbRNS5_9LayerTreeEEEEE3$_0EENS_9allocatorISK_EEFvvEEclEv 148
13 Flutter 0x000000010999ce9c _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE 568
14 Flutter 0x00000001099a0c98 ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0 32
15 CoreFoundation 0x000000019500a3d0 96F8386D-D88A-3C89-A323-A17975C3317F 635856
16 CoreFoundation 0x0000000195009fd4 96F8386D-D88A-3C89-A323-A17975C3317F 634836
17 CoreFoundation 0x00000001950094b4 96F8386D-D88A-3C89-A323-A17975C3317F 631988
18 CoreFoundation 0x0000000195003840 96F8386D-D88A-3C89-A323-A17975C3317F 608320
19 CoreFoundation 0x0000000195002b90 CFRunLoopRunSpecific 572
20 GraphicsServices 0x00000001ab325598 GSEventRunModal 160
21 UIKitCore 0x00000001978ec638 71B59F62-19DA-3CFF-89E1-DACF333BAB0D 11716152
22 UIKitCore 0x00000001978f1bb8 UIApplicationMain 164
23 Dispatcher 0x00000001047ebadc main 96
24 libdyld.dylib 0x0000000194ce1588 E31C0887-C999-3047-9B80-203248EC2396 5512
)

@yinanwang1
Copy link
Author

I have reproduced it in the AMAp demo.
But the crash code is not in the AMap project, is in the flutter project. SO I don't know who can help me!

@danagbemava-nc
Copy link
Member

Are you using impeller? If so, there was a similar report in #127489. It seems to have been fixed on the master channel. Can you check to see if you still have this issue on the master channel?

@yinanwang1
Copy link
Author

Thanks for your answer.
YES, I am using impeller.
OK, I will have a try in master channel.

@yinanwang1
Copy link
Author

NICE. Thanks for your advice.
It works well in master channel.

@blueeyestw
Copy link

Are you using impeller? If so, there was a similar report in #127489. It seems to have been fixed on the master channel. Can you check to see if you still have this issue on the master channel?

When will the fix come to the stable channel? I am using version 3.10.4 and still facing this issue. Strangely, it doesn't happen all the time and I can't get my app to consistently reproduce the crash. But from my crashlytics logs for iOS only (Android is fine), I can see that a lot of my users are experiencing crashes from my latest release which is my first release build using flutter 3.10.

I have also confirmed that this issue is fixed on the master channel but I don't want to release a version that is built using an unstable channel.

@yinanwang1
Copy link
Author

yinanwang1 commented Jun 16, 2023

Are you using impeller? If so, there was a similar report in #127489. It seems to have been fixed on the master channel. Can you check to see if you still have this issue on the master channel?

When will the fix come to the stable channel? I am using version 3.10.4 and still facing this issue. Strangely, it doesn't happen all the time and I can't get my app to consistently reproduce the crash. But from my crashlytics logs for iOS only (Android is fine), I can see that a lot of my users are experiencing crashes from my latest release which is my first release build using flutter 3.10.

I have also confirmed that this issue is fixed on the master channel but I don't want to release a version that is built using an unstable channel.

YES,You are right. I have the same question with you. And It still hasn't been resolved in the stable channel.
Other way, I have tried it in the beta channel. My app still crashes.
SO We have to wait the master channel merge to the stable channel. And it will be resolved finally.

@alexzzw1
Copy link

alexzzw1 commented Jun 28, 2023

/> > > Are you using impeller? If so, there was a similar report in #127489. It seems to have been fixed on the master channel. Can you check to see if you still have this issue on the master channel?

When will the fix come to the stable channel? I am using version 3.10.4 and still facing this issue. Strangely, it doesn't happen all the time and I can't get my app to consistently reproduce the crash. But from my crashlytics logs for iOS only (Android is fine), I can see that a lot of my users are experiencing crashes from my latest release which is my first release build using flutter 3.10.
I have also confirmed that this issue is fixed on the master channel but I don't want to release a version that is built using an unstable channel.

YES,You are right. I have the same question with you. And It still hasn't been resolved in the stable channel. Other way, I have tried it in the beta channel. My app still crashes. SO We have to wait the master channel merge to the stable channel. And it will be resolved finally.

i am also face this issue when ios page is turn back which has embed a ios UIView. so Have you solved the problem now

@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 Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

4 participants