Skip to content

segmentation fault with crossed exports #106332

Closed as not planned
Closed as not planned

Description

@a14n

While working on exporting public API types from services/*.dart library I faced a crash with segmentation fault related to mixed export. I managed to reduce the diff fo the PR to have a simpler reproduction I pasted below (I failed to reduce it only with dart).

Steps to Reproduce

  1. Checkout flutter main branch (on d4929bc for me)
  2. Apply the following diff
diff --git a/packages/flutter/lib/src/services/autofill.dart b/packages/flutter/lib/src/services/autofill.dart
index 22cde8eb0b..e1791c0a3c 100644
--- a/packages/flutter/lib/src/services/autofill.dart
+++ b/packages/flutter/lib/src/services/autofill.dart
@@ -5,6 +5,8 @@
 import 'package:flutter/foundation.dart';
 import 'text_input.dart';
 
+export 'text_input.dart' show TextEditingValue;
+
 /// A collection of commonly used autofill hint strings on different platforms.
 ///
 /// Each hint is pre-defined on at least one supported platform. See their
diff --git a/packages/flutter/lib/src/services/text_editing_delta.dart b/packages/flutter/lib/src/services/text_editing_delta.dart
index 07e57e93c6..80079b3677 100644
--- a/packages/flutter/lib/src/services/text_editing_delta.dart
+++ b/packages/flutter/lib/src/services/text_editing_delta.dart
@@ -7,6 +7,8 @@ import 'package:flutter/foundation.dart';
 import 'text_editing.dart';
 import 'text_input.dart' show TextEditingValue;
 
+export 'text_input.dart' show TextEditingValue;
+
 TextAffinity? _toTextAffinity(String? affinity) {
   switch (affinity) {
     case 'TextAffinity.downstream':
diff --git a/packages/flutter/lib/src/services/text_input.dart b/packages/flutter/lib/src/services/text_input.dart
index 85a3244107..7f98db51db 100644
--- a/packages/flutter/lib/src/services/text_input.dart
+++ b/packages/flutter/lib/src/services/text_input.dart
@@ -25,6 +25,9 @@ import 'text_editing_delta.dart';
 
 export 'dart:ui' show TextAffinity;
 
+export 'autofill.dart' show AutofillConfiguration;
+export 'text_editing_delta.dart' show TextEditingDelta;
+
 /// Indicates how to handle the intelligent replacement of dashes in text input.
 ///
 /// See also:
  1. Create a new flutter project with flutter create my_test
  2. Run tests via flutter test

Expected results: no errors

Actual results:

Logs
~/tmp/my_test$ flutter test
00:02 +0: Counter increments smoke test                                            
unhandled error during finalization of test:
/home/xxx/tmp/my_test/test/widget_test.dart
TestDeviceException(Shell subprocess crashed with segmentation fault.)
#0      FlutterTesterTestDevice.finished
(package:flutter_tools/src/test/flutter_tester_device.dart:241:5)
<asynchronous suspension>
#1      FlutterTesterTestDevice.kill
(package:flutter_tools/src/test/flutter_tester_device.dart:223:5)
<asynchronous suspension>
#2      FlutterPlatform._startTest.<anonymous closure>
(package:flutter_tools/src/test/flutter_platform.dart:485:9)
<asynchronous suspension>
#3      FlutterPlatform._startTest
(package:flutter_tools/src/test/flutter_platform.dart:538:11)
<asynchronous suspension>


00:02 +0: Counter increments smoke test - did not complete [E]                     
00:02 +0: Some tests failed.                                                       
No tests were found.
~/tmp/my_test$ flutter analyze
Analyzing my_test...                                                    
No issues found! (ran in 2.7s)
~/tmp/my_test$ flutter doctor -v
[✓] Flutter (Channel master, 3.1.0-0.0.pre.1317, on Ubuntu 20.04.4 LTS
    5.4.0-120-generic, locale fr_FR.UTF-8)
    • Flutter version 3.1.0-0.0.pre.1317 on channel master at
      /home/xxx/PERSONNEL/dev/dart/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d4929bc828 (il y a 9 heures), 2022-06-20 20:09:05 -0400
    • Engine revision ceac23d7a9
    • Dart version 2.18.0 (build 2.18.0-190.0.dev)
    • DevTools version 2.14.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/xxx/softwares/android-sdk-linux/
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = /home/xxx/softwares/android-sdk-linux/
    • Java binary at: /home/xxx/softwares/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/xxx/softwares/android-studio
    • Flutter plugin version 61.0.2
    • Dart plugin version 203.8430
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at /home/xxx/softwares/jetbrains/idea-IC-203.7148.57
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 203.6912

[✓] VS Code (version 1.68.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.42.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 20.04.4 LTS
      5.4.0-120-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 102.0.5005.115

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

• No issues found!

Activity

  1. maheshj01 commented on Jun 22, 2022

    @maheshj01
    Member

    Hi @a14n, Unfortunately, I can't reproduce it on my side, neither on a mac or Linux host. let me know if I am missing anything.

    Linux (logs)
    mahesh@mahesh:~/Development/dev$ git checkout d4929bc828ff32e23fa7230a91117acbe8fd2801
    fatal: reference is not a tree: d4929bc828ff32e23fa7230a91117acbe8fd2801
    mahesh@mahesh:~/Development/dev$ git checkout main
    error: pathspec 'main' did not match any file(s) known to git
    mahesh@mahesh:~/Development/dev$ git pull
    remote: Enumerating objects: 30321, done.
    remote: Counting objects: 100% (11175/11175), done.
    remote: Compressing objects: 100% (119/119), done.
    remote: Total 30321 (delta 11086), reused 11093 (delta 11043), pack-reused 19146
    Receiving objects: 100% (30321/30321), 24.98 MiB | 6.61 MiB/s, done.
    Resolving deltas: 100% (22509/22509), completed with 2496 local objects.
    From https://github.com/flutter/flutter
     + cfa5a7c452...38ea03e585 Hixie-patch-1                                       -> origin/Hixie-patch-1  (forced update)
     + dc896bb6b8...7a3fb4db42 Hixie-patch-2                                       -> origin/Hixie-patch-2  (forced update)
     + 8f1f9c10f0...f28e570c8c beta                                                -> origin/beta  (forced update)
     * [new branch]            cherry-pick-template                                -> origin/cherry-pick-template
     * [new branch]            covariant                                           -> origin/covariant
     + 8f1f9c10f0...f28e570c8c dev                                                 -> origin/dev  (forced update)
     * [new branch]            flutter-2.11-candidate.0                            -> origin/flutter-2.11-candidate.0
     * [new branch]            flutter-2.11-candidate.1                            -> origin/flutter-2.11-candidate.1
     * [new branch]            flutter-2.11-candidate.10                           -> origin/flutter-2.11-candidate.10
     * [new branch]            flutter-2.11-candidate.11                           -> origin/flutter-2.11-candidate.11
     * [new branch]            flutter-2.11-candidate.2                            -> origin/flutter-2.11-candidate.2
     * [new branch]            flutter-2.11-candidate.3                            -> origin/flutter-2.11-candidate.3
     * [new branch]            flutter-2.11-candidate.4                            -> origin/flutter-2.11-candidate.4
     * [new branch]            flutter-2.11-candidate.5                            -> origin/flutter-2.11-candidate.5
     * [new branch]            flutter-2.11-candidate.6                            -> origin/flutter-2.11-candidate.6
     * [new branch]            flutter-2.11-candidate.7                            -> origin/flutter-2.11-candidate.7
     * [new branch]            flutter-2.11-candidate.8                            -> origin/flutter-2.11-candidate.8
     * [new branch]            flutter-2.11-candidate.9                            -> origin/flutter-2.11-candidate.9
     * [new branch]            flutter-2.12-candidate.0                            -> origin/flutter-2.12-candidate.0
     * [new branch]            flutter-2.12-candidate.1                            -> origin/flutter-2.12-candidate.1
     * [new branch]            flutter-2.12-candidate.10                           -> origin/flutter-2.12-candidate.10
     * [new branch]            flutter-2.12-candidate.11                           -> origin/flutter-2.12-candidate.11
     * [new branch]            flutter-2.12-candidate.2                            -> origin/flutter-2.12-candidate.2
     * [new branch]            flutter-2.12-candidate.3                            -> origin/flutter-2.12-candidate.3
     * [new branch]            flutter-2.12-candidate.4                            -> origin/flutter-2.12-candidate.4
     * [new branch]            flutter-2.12-candidate.5                            -> origin/flutter-2.12-candidate.5
     * [new branch]            flutter-2.12-candidate.6                            -> origin/flutter-2.12-candidate.6
     * [new branch]            flutter-2.12-candidate.7                            -> origin/flutter-2.12-candidate.7
     * [new branch]            flutter-2.12-candidate.8                            -> origin/flutter-2.12-candidate.8
     * [new branch]            flutter-2.12-candidate.9                            -> origin/flutter-2.12-candidate.9
     * [new branch]            flutter-2.13-candidate.0                            -> origin/flutter-2.13-candidate.0
     * [new branch]            flutter-2.13-candidate.1                            -> origin/flutter-2.13-candidate.1
     * [new branch]            flutter-2.13-candidate.10                           -> origin/flutter-2.13-candidate.10
     * [new branch]            flutter-2.13-candidate.2                            -> origin/flutter-2.13-candidate.2
     * [new branch]            flutter-2.13-candidate.3                            -> origin/flutter-2.13-candidate.3
     * [new branch]            flutter-2.13-candidate.4                            -> origin/flutter-2.13-candidate.4
     * [new branch]            flutter-2.13-candidate.5                            -> origin/flutter-2.13-candidate.5
     * [new branch]            flutter-2.13-candidate.6                            -> origin/flutter-2.13-candidate.6
     * [new branch]            flutter-2.13-candidate.7                            -> origin/flutter-2.13-candidate.7
     * [new branch]            flutter-2.13-candidate.8                            -> origin/flutter-2.13-candidate.8
     * [new branch]            flutter-2.13-candidate.9                            -> origin/flutter-2.13-candidate.9
       95e555344d..5464c5bac7  flutter-2.8-candidate.16                            -> origin/flutter-2.8-candidate.16
     * [new branch]            flutter-2.8-candidate.18                            -> origin/flutter-2.8-candidate.18
     * [new branch]            flutter-2.8-candidate.19                            -> origin/flutter-2.8-candidate.19
     * [new branch]            flutter-2.8-candidate.20                            -> origin/flutter-2.8-candidate.20
     * [new branch]            flutter-3.0-candidate.0                             -> origin/flutter-3.0-candidate.0
     * [new branch]            flutter-3.1-candidate.0                             -> origin/flutter-3.1-candidate.0
     * [new branch]            flutter-3.1-candidate.1                             -> origin/flutter-3.1-candidate.1
     * [new branch]            flutter-3.1-candidate.10                            -> origin/flutter-3.1-candidate.10
     * [new branch]            flutter-3.1-candidate.11                            -> origin/flutter-3.1-candidate.11
     * [new branch]            flutter-3.1-candidate.2                             -> origin/flutter-3.1-candidate.2
     * [new branch]            flutter-3.1-candidate.3                             -> origin/flutter-3.1-candidate.3
     * [new branch]            flutter-3.1-candidate.4                             -> origin/flutter-3.1-candidate.4
     * [new branch]            flutter-3.1-candidate.5                             -> origin/flutter-3.1-candidate.5
     * [new branch]            flutter-3.1-candidate.6                             -> origin/flutter-3.1-candidate.6
     * [new branch]            flutter-3.1-candidate.7                             -> origin/flutter-3.1-candidate.7
     * [new branch]            flutter-3.1-candidate.8                             -> origin/flutter-3.1-candidate.8
     * [new branch]            flutter-3.1-candidate.9                             -> origin/flutter-3.1-candidate.9
     * [new branch]            main                                                -> origin/main
       bc54c2fdfe..9ccd74170e  master                                              -> origin/master
     * [new branch]            nuritzi-patch-1                                     -> origin/nuritzi-patch-1
     * [new branch]            revert-101460-b101416                               -> origin/revert-101460-b101416
     * [new branch]            revert-102092-revert-99146-xbl000225                -> origin/revert-102092-revert-99146-xbl000225
     * [new branch]            revert-102453-mouse_tracker_crash                   -> origin/revert-102453-mouse_tracker_crash
     * [new branch]            revert-103019-huan_platform_view_focus_in_framework -> origin/revert-103019-huan_platform_view_focus_in_framework
     * [new branch]            revert-103456-shortcuts_registry                    -> origin/revert-103456-shortcuts_registry
     * [new branch]            revert-104215-remove_shortcut_manager_of            -> origin/revert-104215-remove_shortcut_manager_of
     * [new branch]            revert-104958-xbl00053001                           -> origin/revert-104958-xbl00053001
     * [new branch]            revert-105247-revert-104274-handle-hide-toolbar     -> origin/revert-105247-revert-104274-handle-hide-toolbar
     + 77d935af4d...cd41fdd495 stable                                              -> origin/stable  (forced update)
     * [new branch]            test-plugin-ffi-run-ffigen                          -> origin/test-plugin-ffi-run-ffigen
     * [new tag]               2.10.0-0.0.pre                                      -> 2.10.0-0.0.pre
     * [new tag]               2.10.5                                              -> 2.10.5
     * [new tag]               2.11.0-0.1.pre                                      -> 2.11.0-0.1.pre
     * [new tag]               2.12.0-4.2.pre                                      -> 2.12.0-4.2.pre
     * [new tag]               3.0.2                                               -> 3.0.2
     * [new tag]               3.1.0                                               -> 3.1.0
     * [new tag]               3.1.0-9.0.pre                                       -> 3.1.0-9.0.pre
     * [new tag]               2.10.0                                              -> 2.10.0
     * [new tag]               2.10.0-0.1.pre                                      -> 2.10.0-0.1.pre
     * [new tag]               2.10.0-0.2.pre                                      -> 2.10.0-0.2.pre
     * [new tag]               2.10.0-0.3.pre                                      -> 2.10.0-0.3.pre
     * [new tag]               2.10.1                                              -> 2.10.1
     * [new tag]               2.10.2                                              -> 2.10.2
     * [new tag]               2.10.3                                              -> 2.10.3
     * [new tag]               2.10.4                                              -> 2.10.4
     * [new tag]               2.12.0-4.0.pre                                      -> 2.12.0-4.0.pre
     * [new tag]               2.12.0-4.1.pre                                      -> 2.12.0-4.1.pre
     * [new tag]               2.13.0-0.1.pre                                      -> 2.13.0-0.1.pre
     * [new tag]               2.13.0-0.2.pre                                      -> 2.13.0-0.2.pre
     * [new tag]               2.13.0-0.3.pre                                      -> 2.13.0-0.3.pre
     * [new tag]               2.13.0-0.4.pre                                      -> 2.13.0-0.4.pre
     * [new tag]               3.0.0                                               -> 3.0.0
     * [new tag]               3.0.0-0.0.pre                                       -> 3.0.0-0.0.pre
     * [new tag]               3.0.1                                               -> 3.0.1
    You are not currently on a branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.
    
        git pull <remote> <branch>
    
    mahesh@mahesh:~/Development/dev$ git checkout d4929bc828ff32e23fa7230a91117acbe8fd2801
    Previous HEAD position was f4abaa0735 [flutter_releases] Flutter Stable 2.2.3 Framework Cherrypicks (#85719)
    HEAD is now at d4929bc828 Roll Flutter Engine from 896c17bd63fa to ceac23d7a98f (1 revision) (#106318)
    mahesh@mahesh:~/Development/dev$ flutterd doctor -v
    Downloading Linux x64 Dart SDK from Flutter engine ceac23d7a98f9c9ac688075c2c38d4fd2c65a9a8...
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  212M  100  212M    0     0  7982k      0  0:00:27  0:00:27 --:--:-- 8174k
    Building flutter tool...
    Downloading Material fonts...                                      594ms
    Downloading package sky_engine...                                  115ms
    Downloading flutter_patched_sdk tools...                           236ms
    Downloading flutter_patched_sdk_product tools...                   311ms
    Downloading linux-x64 tools...                                      3.9s
    Downloading linux-x64/font-subset tools...                         434ms
    [!] Flutter (Channel unknown, 3.1.0-0.0.pre.1317, on Ubuntu 20.04.4 LTS 5.13.0-48-generic, locale en_GB.UTF-8)
        ! Flutter version 3.1.0-0.0.pre.1317 on channel unknown at /home/mahesh/Development/dev
        ! Upstream repository unknown
        • Framework revision d4929bc828 (30 hours ago), 2022-06-20 20:09:05 -0400
        • Engine revision ceac23d7a9
        • Dart version 2.18.0 (build 2.18.0-190.0.dev)
        • DevTools version 2.14.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /home/mahesh/Android/Sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /home/mahesh/Downloads/android-studio-2020.3.1.25-linux/android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at google-chrome
    
    [✓] Linux toolchain - develop for Linux desktop
        • clang version 10.0.0-4ubuntu1
        • cmake version 3.16.3
        • ninja version 1.10.0
        • pkg-config version 0.29.1
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /home/mahesh/Downloads/android-studio-2020.3.1.25-linux/android-studio
        • Flutter plugin version 67.1.2
        • Dart plugin version 212.5744
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    
    [✓] VS Code (version 1.68.0)
        • VS Code at /usr/share/code
        • Flutter extension version 3.42.0
    
    [✓] Connected device (2 available)
        • Linux (desktop) • linux  • linux-x64      • Ubuntu 20.04.4 LTS 5.13.0-48-generic
        • Chrome (web)    • chrome • web-javascript • Google Chrome 102.0.5005.115
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 1 category.
    mahesh@mahesh:~/Development/dev$ cd ~/Desktop/
    mahesh@mahesh:~/Desktop$ flutterd create my_test
    Creating project my_test...
    Running "flutter pub get" in my_test...                          1,779ms
    Wrote 127 files.
    
    All done!
    In order to run your application, type:
    
      $ cd my_test
      $ flutter run
    
    Your application code is in my_test/lib/main.dart.
    
    mahesh@mahesh:~/Desktop$ cd my_test/
    mahesh@mahesh:~/Desktop/my_test$ flutterd test
    00:06 +1: All tests passed!                                                                                                                                 
    mahesh@mahesh:~/Desktop/my_test$ 
    
    mac (logs)
    mahesh@Maheshs-MacBook-Air-M1 flutter_dev % git checkout d4929bc828ff32e23fa7230a91117acbe8fd2801
    Note: switching to 'd4929bc828ff32e23fa7230a91117acbe8fd2801'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:
    
      git switch -c <new-branch-name>
    
    Or undo this operation with:
    
      git switch -
    
    Turn off this advice by setting config variable advice.detachedHead to false
    
    HEAD is now at d4929bc828 Roll Flutter Engine from 896c17bd63fa to ceac23d7a98f (1 revision) (#106318)
    mahesh@Maheshs-MacBook-Air-M1 flutter_dev % flutterd doctor -v
    Downloading Darwin arm64 Dart SDK from Flutter engine ceac23d7a98f9c9ac688075c2c38d4fd2c65a9a8...
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  194M  100  194M    0     0  5971k      0  0:00:33  0:00:33 --:--:-- 5545k
    Building flutter tool...
    Downloading package sky_engine...                                1,007ms
    Downloading flutter_patched_sdk tools...                         1,244ms
    Downloading flutter_patched_sdk_product tools...                 1,062ms
    Downloading darwin-x64 tools...                                     6.5s
    Downloading darwin-x64/font-subset tools...                        519ms
    Could not load custom device from config index 0: Expected enabled to be a boolean.
    [!] Flutter (Channel unknown, 3.1.0-0.0.pre.1317, on macOS 12.4 21F79 darwin-arm, locale en-IN)
        ! Flutter version 3.1.0-0.0.pre.1317 on channel unknown at /Users/mahesh/Documents/flutter_dev
        ! Upstream repository unknown
        • Framework revision d4929bc828 (30 hours ago), 2022-06-20 20:09:05 -0400
        • Engine revision ceac23d7a9
        • Dart version 2.18.0 (build 2.18.0-190.0.dev)
        • DevTools version 2.14.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
        • Android SDK at /Users/mahesh/Library/Android/sdk
        • Platform android-32, build-tools 33.0.0-rc4
        • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 13C100
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840)
    
    [✓] IntelliJ IDEA Community Edition (version 2021.2.1)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin version 61.2.4
        • Dart plugin version 212.5080.8
    
    [✓] VS Code (version 1.67.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.43.20220621
    
    [✓] Connected device (3 available)
        • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
        • macOS (desktop)           • macos         • darwin-arm64   • macOS 12.4 21F79 darwin-arm
        • Chrome (web)              • chrome        • web-javascript • Google Chrome 102.0.5005.115
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 1 category.
    mahesh@Maheshs-MacBook-Air-M1 flutter_dev % cd ~/Desktop 
    mahesh@Maheshs-MacBook-Air-M1 Desktop % flutterd create flutter_test
    Signing iOS app for device deployment using developer identity: "Apple Development: [email protected] (8QBZ8V54QM)"
    Invalid project name: 'flutter_test' - this will conflict with Flutter package dependencies.
    mahesh@Maheshs-MacBook-Air-M1 Desktop % flutterd create my_tests    
    Signing iOS app for device deployment using developer identity: "Apple Development: [email protected] (8QBZ8V54QM)"
    Creating project my_tests...
    Running "flutter pub get" in my_tests...                         1,647ms
    Wrote 127 files.
    
    All done!
    In order to run your application, type:
    
      $ cd my_tests
      $ flutter run
    
    Your application code is in my_tests/lib/main.dart.
    
    mahesh@Maheshs-MacBook-Air-M1 Desktop % cd my_tests       
    mahesh@Maheshs-MacBook-Air-M1 my_tests % flutterd test
    00:07 +1: All tests passed! 
    
  2. added
    a: tests"flutter test", flutter_test, or one of our tests
    frameworkflutter/packages/flutter repository. See also f: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Jun 22, 2022
  3. a14n commented on Jun 22, 2022

    @a14n
    ContributorAuthor

    @maheshmnj Did you apply the diff I mentioned at step 2 of the Steps to Reproduce section?

  4. maheshj01 commented on Jun 22, 2022

    @maheshj01
    Member

    @a14n Looks like I missed that part initially, and now when I try to apply the patch I get an error (Perhaps I am doing something wrong) Heres is what I did

    1. I have a flutter SDK located at ~Documents/flutter_dev which has been checked out to above comment using
      git checkout d4929bc828ff32e23fa7230a91117acbe8fd2801 (logs in above comment)
    2. Copied your patch to a new file
    cd ~/Documents/flutter_dev
    vi patch.diff. // pasted the patch save and exit
    
    1. apply the patch git apply patch.diff
    2. I get an error, Please see the logs

    error: git diff header lacks filename information when removing 1 leading pathname component (line 2)

    logs

    mahesh@Maheshs-MacBook-Air-M1 flutter_dev % vi patch.diff 
    mahesh@Maheshs-MacBook-Air-M1 flutter_dev % git apply patch.diff 
    error: git diff header lacks filename information when removing 1 leading pathname component (line 2)
    mahesh@Maheshs-MacBook-Air-M1 flutter_dev % cd ..
    mahesh@Maheshs-MacBook-Air-M1 Documents % git apply flutter_dev/patch.diff 
    error: git diff header lacks filename information when removing 1 leading pathname component (line 2)
    mahesh@Maheshs-MacBook-Air-M1 Documents % 
  5. a14n commented on Jun 22, 2022

    @a14n
    ContributorAuthor

    I don't face any issue applying the patch with git apply patch.diff.txt locally with patch.diff.txt.

    Alternatively you can simply make those changes manually.

  6. added
    P2Important issues not at the top of the work list
    on Jun 22, 2022
  7. jason-simmons commented on Jun 22, 2022

    @jason-simmons
    Contributor

    Reproduced this and captured a stack trace. It looks like an infinite recursion:

    @a-siva

    * thread #1, name = 'flutter_tester', stop reason = signal SIGSEGV: invalid address (fault address: 0x7ffea1ec7ff8)
      * frame #0: 0x0000561ddfd789fa flutter_tester`dart::Object::HandleImpl(zone=0x00007ffea26c1e20, ptr=(tagged_pointer_ = 140667380845297), default_cid=5) at object.h:645:45
        frame #1: 0x0000561ddfd78b05 flutter_tester`dart::Class::Handle(zone=<unavailable>, ptr=<unavailable>) at object.h:1952:3 [artificial]
        frame #2: 0x0000561ddfe79844 flutter_tester`dart::Library::EnsureTopLevelClassIsFinalized(this=0x0000561de13d4960) const at object.cc:13018:22
        frame #3: 0x0000561ddfe7b4d0 flutter_tester`dart::Namespace::Lookup(this=0x0000561de13d4950, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:14188:7
        frame #4: 0x0000561ddfe7b284 flutter_tester`dart::Library::LookupReExport(this=0x0000561de13d4900, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:12838:14
        frame #5: 0x0000561ddfe7b72f flutter_tester`dart::Namespace::Lookup(this=0x0000561de13d48f0, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:14211:15
        frame #6: 0x0000561ddfe7b284 flutter_tester`dart::Library::LookupReExport(this=0x0000561de13d48a0, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:12838:14
        frame #7: 0x0000561ddfe7b72f flutter_tester`dart::Namespace::Lookup(this=0x0000561de13d4850, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:14211:15
        frame #8: 0x0000561ddfe7b284 flutter_tester`dart::Library::LookupReExport(this=0x0000561de13d4800, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:12838:14
        frame #9: 0x0000561ddfe7b72f flutter_tester`dart::Namespace::Lookup(this=0x0000561de13d47f0, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:14211:15
       ...
        frame #87062: 0x0000561ddfe7b284 flutter_tester`dart::Library::LookupReExport(this=0x0000561de0e001f0, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:12838:14
        frame #87063: 0x0000561ddfe7b72f flutter_tester`dart::Namespace::Lookup(this=0x0000561de0dfe680, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:14211:15
        frame #87064: 0x0000561ddfe7b284 flutter_tester`dart::Library::LookupReExport(this=0x0000561de0dfe5f0, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:12838:14
        frame #87065: 0x0000561ddfe7b72f flutter_tester`dart::Namespace::Lookup(this=0x0000561de0cc3820, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:14211:15
        frame #87066: 0x0000561ddfe7b284 flutter_tester`dart::Library::LookupReExport(this=0x0000561de0cc37b0, name=0x0000561de0cec210, trail=0x00007fefaf7629c8) const at object.cc:12838:14
        frame #87067: 0x0000561ddfe7b72f flutter_tester`dart::Namespace::Lookup(this=0x0000561de0cc3740, name=0x0000561de0cec210, trail=0x0000000000000000) const at object.cc:14211:15
        frame #87068: 0x0000561ddfe79da5 flutter_tester`dart::Library::LookupImportedObject(this=0x0000561de0cc36f0, name=0x0000561de0cec210) const at object.cc:13119:18
        frame #87069: 0x0000561ddfe7bfdf flutter_tester`dart::Library::LookupObjectAllowPrivate(this=<unavailable>, name=<unavailable>) const at object.cc:13105:10 [artificial]
        frame #87070: 0x0000561ddfe7c28a flutter_tester`dart::Library::LookupFunctionAllowPrivate(this=0x0000561de0cc36f0, name=0x0000561de0cec210) const at object.cc:13064:32
        frame #87071: 0x0000561de00c742b flutter_tester`dart::kernel::TranslationHelper::LookupStaticMethodByKernelProcedure(this=0x00007ffea26c13a8, procedure=<unavailable>, required=<unavailable>) at kernel_translation_helper.cc:649:37
        frame #87072: 0x0000561de009f764 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildStaticSet(this=0x00007ffea26c1040, p=0x0000000000000000) at kernel_binary_flowgraph.cc:2934:12
        frame #87073: 0x0000561de0099c6b flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildExpression(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:1192:14
        frame #87074: 0x0000561de009b478 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildStatement(dart::TokenPosition*) [inlined] dart::kernel::StreamingFlowGraphBuilder::BuildExpressionStatement(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:4385:27
        frame #87075: 0x0000561de009b46d flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildStatement(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:1309:14
        frame #87076: 0x0000561de00a3f6a flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildBlock(this=0x00007ffea26c1040, position=0x00007ffea26c0be8) at kernel_binary_flowgraph.cc:4404:23
        frame #87077: 0x0000561de009b4c2 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildStatement(this=0x00007ffea26c1040, position=0x00007ffea26c0be8) at kernel_binary_flowgraph.cc:1311:14
        frame #87078: 0x0000561de00a63a6 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildIfStatement(dart::TokenPosition*) [inlined] dart::kernel::StreamingFlowGraphBuilder::BuildStatementWithBranchCoverage(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:1360:24
        frame #87079: 0x0000561de00a638c flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildIfStatement(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:4986:20
        frame #87080: 0x0000561de009b458 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildStatement(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:1337:14
        frame #87081: 0x0000561de00a3f6a flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildBlock(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:4404:23
        frame #87082: 0x0000561de009b4c2 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildStatement(this=0x00007ffea26c1040, position=0x0000000000000000) at kernel_binary_flowgraph.cc:1311:14
        frame #87083: 0x0000561de009c722 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildFunctionBody(this=0x00007ffea26c1040, dart_function=0x0000561de0cebf40, first_parameter=0x0000000000000000, constructor=<unavailable>) at kernel_binary_flowgraph.cc:768:13
        frame #87084: 0x0000561de009cf32 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildGraphOfFunction(this=0x00007ffea26c1040, is_constructor=<unavailable>) at kernel_binary_flowgraph.cc:929:7
        frame #87085: 0x0000561de009d417 flutter_tester`dart::kernel::StreamingFlowGraphBuilder::BuildGraph(this=0x00007ffea26c1040) at kernel_binary_flowgraph.cc:1038:14
        frame #87086: 0x0000561de00b1fce flutter_tester`dart::kernel::FlowGraphBuilder::BuildGraph(this=0x00007ffea26c1308) at kernel_to_il.cc:803:46
        frame #87087: 0x0000561ddff7a8ca flutter_tester`dart::DartCompilationPipeline::BuildFlowGraph(this=<unavailable>, zone=<unavailable>, parsed_function=<unavailable>, ic_data_array=<unavailable>, osr_id=<unavailable>, optimized=<unavailable>) at compiler.cc:135:30
        frame #87088: 0x0000561ddff7b901 flutter_tester`dart::CompileParsedFunctionHelper::Compile(this=0x00007ffea26c1c98, pipeline=0x00007ffea26c28a0) at compiler.cc:532:32
        frame #87089: 0x0000561ddff7c4f5 flutter_tester`dart::CompileFunctionHelper(pipeline=0x00007ffea26c28a0, function=0x00007ffea26c24a8, optimized=false, osr_id=-1) at compiler.cc:711:46
        frame #87090: 0x0000561ddff7c060 flutter_tester`dart::Compiler::CompileFunction(thread=<unavailable>, function=0x00007ffea26c24a8) at compiler.cc:841:10
        frame #87091: 0x0000561ddfe72a0b flutter_tester`dart::Function::EnsureHasCode(this=0x00007ffea26c24a8) const at object.cc:10152:28
        frame #87092: 0x0000561ddff7acc4 flutter_tester`dart::DRT_CompileFunction(dart::NativeArguments) [inlined] dart::DRT_HelperCompileFunction(isolate=<unavailable>, thread=<unavailable>, zone=<unavailable>, arguments=<unavailable>) at compiler.cc:222:12
        frame #87093: 0x0000561ddff7ac41 flutter_tester`dart::DRT_CompileFunction(arguments=NativeArguments @ 0x00007ffea26c2970) at compiler.cc:208:1
    ...
    
  8. rishuriya commented on May 13, 2025

    @rishuriya

    hii @maheshj01 this is the problem of recording coverage, some test record and map all file in the project while some test missed it, and next if that missing file test run it cause the problem

  9. a-siva commented on May 13, 2025

    @a-siva
    Contributor

    //cc @alexmarkov looks like an issue in the flow graph builder.

  10. alexmarkov commented on May 13, 2025

    @alexmarkov
    Contributor

    Flow graph builder and kernel loader no longer use Library::LookupReExport and Namespace::Lookup (probably since dart-lang/sdk@8a85dac).

    Cannot reproduce this issue on the current Flutter.

  11. github-actions commented on May 27, 2025

    @github-actions

    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.

  12. locked as resolved and limited conversation to collaborators on May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsdependency: dartDart team may need to help usframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions