Thanks to visit codestin.com
Credit goes to github.com

Skip to content

App freezes spawning a Process from Mac desktop app on M1 #95805

@blahblab

Description

@blahblab

This used to work some three months ago. I have abstracted the issue out of my code (my actual code is making numerous Curl calls using this format, and I've tried both sync and async, with and without awaits. I abstracted this snippet out to replicate. It just hangs and has to be restarted. There is no output even using verbose.

Steps to Reproduce

Embed this in the _demo Flutter app _MyHomePageState and press the button a few times. _

   int _counter = 0;

  void _incrementCounter() {
    setState(() {
            _counter++;
    });

    for (int i = 0; i < _counter; i ++) {

      Timer(Duration(seconds: i), () {
        print(" This line is execute after $i  seconds");
        var result =  Process.start('ls', [
          '-l',
        ]);

        print(" $i  $result");
      });
      print("complete iteration");
    }
    print("complete Run");
  }
Logs
[✓] Flutter (Channel stable, 2.8.0, on macOS 12.0.1 21A559 darwin-arm, locale en-CA)
    • Flutter version 2.8.0 at /Users/nik/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cf44000065 (2 weeks ago), 2021-12-08 14:06:50 -0800
    • Engine revision 40a99c5951
    • Dart version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nik/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.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.10+0-b96-7281165)

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.0.1 21A559 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 96.0.4664.110
    ! Error: iPad Pro (12.9-inch) (5th generation) has recently restarted. Xcode will continue when iPad Pro (12.9-inch) (5th generation) is unlocked. (code -14)

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowdependency: dartDart team may need to help usfound in release: 2.8Found to occur in 2.8found in release: 2.9Found to occur in 2.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-host-armBuilding on an ARM-based platformplatform-macosBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions