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

[iOS] NSInternalInconsistencyException Crash #20

Open
MPinto16 opened this issue Nov 12, 2024 · 1 comment
Open

[iOS] NSInternalInconsistencyException Crash #20

MPinto16 opened this issue Nov 12, 2024 · 1 comment

Comments

@MPinto16
Copy link

Our app is experiencing a crash on iOS devices, which appears to be related to the flutter_eco_mode package. The crash occurs when data is being sent through a method channel, leading to an NSInternalInconsistencyException.

Crash Details

We cannot reproduce the issue directly, but it has been reported multiple times on Crashlytics with the following stack trace:

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x8408c __exceptionPreprocess
1  libobjc.A.dylib                0x172e4 objc_exception_throw
2  Foundation                     0x8222fc -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:]
3  Flutter                        0x5d9658 WriteValueOfType(void const*, __CFData*, FlutterStandardCodecObjcType, void const*) + 341 (FlutterStandardCodec.mm:341)
4  Flutter                        0x5d92e0 -[FlutterStandardWriter writeValue:] + 351 (FlutterStandardCodec.mm:351)
5  Flutter                        0x5da528 -[FlutterStandardMethodCodec encodeSuccessEnvelope:] + 95 (FlutterStandardCodec.mm:95)
6  Flutter                        0x5d5ef8 invocation function for block in SetStreamHandlerMessageHandlerOnChannel(NSObject<FlutterStreamHandler>*, NSString*, NSObject<FlutterBinaryMessenger>*, NSObject<FlutterMethodCodec>*, NSObject<FlutterTaskQueue>*) + 398 (FlutterChannels.mm:398)
7  flutter_eco_mode               0x4364 thunk for @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () (<compiler-generated>)
8  flutter_eco_mode               0x4cb8 closure #1 in BatteryStateStreamHandler.batteryStateChanged(_:) + 196 (FlutterEcoModePlugin.swift:196)
9  flutter_eco_mode               0x4764 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
10 libdispatch.dylib              0x2370 _dispatch_call_block_and_release
11 libdispatch.dylib              0x40d0 _dispatch_client_callout
12 libdispatch.dylib              0x129e0 _dispatch_main_queue_drain
13 libdispatch.dylib              0x125fc _dispatch_main_queue_callback_4CF
14 CoreFoundation                 0x56f64 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
15 CoreFoundation                 0x54188 __CFRunLoopRun
16 CoreFoundation                 0x535b8 CFRunLoopRunSpecific
17 GraphicsServices               0x11c4 GSEventRunModal
18 UIKitCore                      0x3de2c0 -[UIApplication _run]
19 UIKitCore                      0x48cddc UIApplicationMain
20 UIKitCore                      0x7b9b20 block_destroy_helper.23
21 Runner                         0x8aa0 main (AppDelegate.swift)
22 ???                            0x1bc5e0d34 (Manquant)
        

Additional Context

Flutter Version: 3.24.4
flutter_eco_mode Version: 0.0.3
iOS Version: The crash has been observed from iOS 16 until 18.1.0

@apoichet
Copy link
Collaborator

apoichet commented Nov 12, 2024

Hi MPinto16, thank you for sharing your crash with this issue.

Honestly, it's a curious crash and it's never happened for us.
Regarding your stack trace, it concerns an event channel in iOS native code to listen the battery state changes.

Be sure that if we reproduce something like this, we'll notice you directly in this thread.
We can keep this issue open during this time.

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

2 participants