'Memory error while running for iOS [AddressSanitizer CHECK failed] [FLUTTER] [IOS]

Scenario:

I have this app that I am building for quite a while now. But abruptly I started getting errors while running for the iOS version. I got errors on the local network connection which I did search for and found a solution online to create two files Info-debug.plist and Info-release.plist replacing info.plist. Which I resolved and got another issue (which is the main issue posting here). Just in case any need for what resolution I've gone through, please check below. Else, skip over the optional part to the Main Issue.

[OPTIONAL] Previous issue (local network connection) fix:

  1. Created two files Info-debug.plist and Info-release.plist replacing info.plist and configured the same in build settings in Xcode.

IMAGE:

Point 1 Image

  1. Added two new fields for Info-debug.plist -> NSBonjourServices key with _dartobservatory._tcp as value & secondly NSLocalNetworkUsageDescription key.

IMAGE:

Point 2 Image

Post this, I haven't got any errors related to the local network. But new issue arose, which I really TBH don't have any idea if it is related to the above fix or not [Added for reference]

Main issue:

There seems to be a memory issue which TBH I am not still able to relate to or understand with any online resources.

The error I am getting (see below):

Textual:

Launching lib/main.dart on iPhone in debug mode...
lib/main.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: 9B88DRXV3V
Xcode build done.                                           672.9s
Connecting to VM Service at ws://127.0.0.1:65213/J9NnVgwaIYY=/ws
fopen failed for data file: errno = 2 (No such file or directory)
Errors found! Invalidating cache...
fopen failed for data file: errno = 2 (No such file or directory)
Errors found! Invalidating cache...

==837==AddressSanitizer CHECK failed: /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-1300.0.29.30/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp:191 "((0)) == ((sigaltstack(&altstack, &oldstack)))" (0x0, 0xffffffffffffffff)
    <empty stack>
Warning: hit breakpoint while running function, skipping commands and conditions to prevent recursion.
AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report.
* thread #24, name = 'DartWorker'
    frame #0: 0x000000010a973328 libclang_rt.asan_ios_dynamic.dylib`__asan::AsanDie()
libclang_rt.asan_ios_dynamic.dylib`__asan::AsanDie:
->  0x10a973328 <+0>:  pacibsp
    0x10a97332c <+4>:  sub    sp, sp, #0x30             ; =0x30
    0x10a973330 <+8>:  stp    x20, x19, [sp, #0x10]
    0x10a973334 <+12>: stp    x29, x30, [sp, #0x20]

Target 0: (Runner) stopped.
Lost connection to device.
Exited (sigterm)

Image form (for better format understanding):

Image Form of ERROR


Things I've tried already:

  • Cleaning flutter project (flutter clean)
  • Removing podfile.lock file and re-running pod install

It was working well until last night but don't know what's the issue here is. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source