skip to Main Content

flutter run works but flutter run --release or flutter run --release --profile returns the error below:

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x0
version=2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "macos_simarm64"
pid=14192, thread=-1, isolate_group=isolate(0x7f910c011200), isolate=(nil)(0x0)
isolate_instructions=0, vm_instructions=0
Stack dump aborted because InitialRegisterCheck failed.
Dart snapshot generator failed with exit code -6

Here’s my pubspec.yaml dependencies:

version: 1.0.0+1
environment:
  sdk: ">=2.15.1 <3.0.0"

dependencies:
  
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flutter_native_splash: ^2.1.6
  table_calendar: ^3.0.8
  image_stack: ^2.1.1
  intl: ^0.17.0
  shimmer: ^2.0.0
  flutter_riverpod: ^1.0.4
  auto_route: ^5.0.4
  google_fonts: ^3.0.1
  pinput: ^2.2.9
  mask_text_input_formatter: ^2.3.0
  firebase_core: ^1.21.1
  dio: ^4.0.6
  dio_cache_interceptor: ^3.2.7
  dio_cache_interceptor_hive_store: ^3.1.1
  http: ^0.13.5
  enum_to_string: ^2.0.1
  mobile_scanner: ^2.1.0
  firebase_auth: ^3.3.19
  image_picker: ^0.8.5+3
  image_cropper: ^3.0.1
  firebase_storage: ^10.2.18
  fluttertoast: ^8.0.9
  firebase_messaging: ^13.0.1
  hive: ^2.2.1
  hive_flutter: ^1.1.0
  flutter_hooks: ^0.18.5+1
  hooks_riverpod: ^1.0.4
  local_auth: ^2.1.0
  lottie: ^2.1.0
  flutter_local_notifications: ^9.7.0
  device_info_plus: ^4.0.1
  timeago: ^3.2.2
  url_launcher: ^6.1.5
  focused_menu: ^1.0.5
  rxdart: ^0.27.7
  rate_my_app: ^1.1.3
  infinite_scroll_pagination: ^3.2.0
  flutter_offline: ^2.1.0
  webview_flutter: ^4.0.1
  shared_preferences: ^2.0.15
  web_socket_channel: ^2.2.0
  fl_chart: ^0.55.2

dev_dependencies:
  #flutter_gen_runner:
  auto_route_generator: ^5.0.2
  firebase_core_platform_interface: ^4.5.1
  build_runner: any
  flutter_lints: ^2.0.1
  flutter_launcher_icons: ^0.11.0
  flutter_test:
    sdk: flutter
flutter_icons:
    android: "launcher_icon"
    ios: true
    image_path: "assets/icons/b2b_logo.png"


flutter:
  uses-material-design: true
  generate: true
  assets:
    - assets/images/
    - assets/
    - assets/animations/
    - assets/icons/
  fonts:
    - family: SnagIcons
      fonts:
        - asset: assets/fonts/SnagIcons.ttf</summary>

The application from 2 months ago was building successfully but as of last week, I have been getting this issue and reverting the changes i still get the same issue.

3

Answers


  1. Chosen as BEST ANSWER

    So, after raising the issue on the flutter channel, the problem was caused by returning a late variable from a future method so there was a fix in the release of flutter 3.7 which will remedy this problem You can view the issue here on GitHub


  2. Try to switch to flutter dev channel and back to flutter stable.

    Do a flutter clean and flutter pub get and try it again.

    Login or Signup to reply.
  3. This occours because of the some updates in the packages

    Try entering the below code in the vs code terminal:

    1. flutter clean
    2. flutter pub get

    Your flutter code will work like a charm!

    Edit:

    There are github issues which address this,see if any works for you

    1. https://github.com/flutter/flutter/issues/43707
    2. https://github.com/flutter/flutter/issues/109818
    3. https://github.com/flutter/flutter/issues/43597
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search