Skip to content

Flutter test --coverage hangs with a segmentation fault (dart version 2.18.4) #124145

Description

@alejovillegas7

Hello flutter team! Im trying to run the 800 tests that I have on my application and generate a coverage report about them, but Im getting the following err

Shell subprocess crashed with segmentation fault.
#0      FlutterTesterTestDevice.finished
(package:flutter_tools/src/test/flutter_tester_device.dart:241:73)
<asynchronous suspension>
#1      Future.any.onValue (dart:async/future.dart:612:5)
<asynchronous suspension>


unhandled error during finalization of test:
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>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:522:21)
<asynchronous suspension>
#5      _FlutterPlatformStreamSinkWrapper.close.<anonymous closure>
(package:flutter_tools/src/test/flutter_platform.dart:648:7)
<asynchronous suspension>

when I try to run the tests without --coverage, they all pass without a problem. Seems like --coverage is causing something odd.

another important info, this starts happening after upgrading to flutter 3.3.7 (was in 3.3.5), the dart version is 2.18.4 (was working fine with dart 2.18.2).

thanks in advance! will appreciate any clue around this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testsc: crashStack traces logged to the consoledependency: dartDart team may need to help ustoolAffects the "flutter" command-line tool. See also t: labels.waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions