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

Fatal NSInternalInconsistencyException when terminating application #13

Closed
Maatteogekko opened this issue Jan 23, 2023 · 4 comments
Closed

Comments

@Maatteogekko
Copy link

I am getting this error on iOS. So far got 3 reports, all on the iPhone 12 mini

NSInternalInconsistencyException
Sending a message before the FlutterEngine has been run.

Stacktrace:
02fd7c2211694d7dad91337afbe2d033-symbolicated.crash.zip

@mrcendre
Copy link
Owner

mrcendre commented Feb 7, 2023

Hello, thanks for the report !

Can you please paste the output of flutter doctor -v ?

Also, are you experiencing this crash within the sample app our your own app ?

@Maatteogekko
Copy link
Author

I am receiving this as a report of my app in production. I haven't tried to replicate it yet (only a few crashes so far)

flutter doctor -v
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale en-IT)
    • Flutter version 3.3.10 on channel stable at /Users/gekko/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (8 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/gekko/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • 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 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] 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)

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

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 13.1 22C65 darwin-arm
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@seceba
Copy link

seceba commented Feb 16, 2023

Hello, I have the same problem. I received 676 crash reports in 10 days.

I was using it for the background to be animated on the homepage, I think that's why I'm getting a lot of crashes.

crashreport.crash.zip

@mrcendre
Copy link
Owner

Hello everyone, thanks for reporting this bug. According to the crash stacktrace, it is a race between threads after the FlutterEngine has been detached due to the app being closed. Motion events may still be sent to the engine at that point, causing the Flutter framework to throw this NSInternalInconsistencyException.

This is fixed as of version 1.4.0 by cleaning up all stream handlers when the plugin is detached from the engine and try/catching the event sending logic.

Closing this for now, please update to motion: ^1.4.0 and let me know if the issue persists, in which case we can reopen it.

@mrcendre mrcendre changed the title NSInternalInconsistencyException Fatal NSInternalInconsistencyException when terminating application Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants