Skip to content

[Analyzer] Flutter_lints stack overflow error #56976

@PvtPuddles

Description

@PvtPuddles

My coworkers and I have started experiencing a Stack Overflow error when running dart analyze immediately after running pub get. The error slows down the analyzer significantly, though does not prevent normal operation.

Notes:

  • Subsequent runs of dart analyze function as expected.
  • Using flutter analyze instead of dart analyze appears to make the errors go away.
  • Downgrading to flutter_lints: '>=4.0.0 <5.0.0' also appears to resolve the issue.
  • I have not been able to reproduce this error in a new project. It appears to be caused by one of our project files, but I've been unable to narrow it down.
  • Any project that depends on this test_package also exhibits this behavior.
Flutter Doctor

% flutter doctor -v
[✓] Flutter (Channel stable, 3.24.4, on macOS 14.0 23A344 darwin-arm64, locale en-US)
• Flutter version 3.24.4 on channel stable at /Users/stephen/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 603104015d (4 days ago), 2024-10-24 08:01:25 -0700
• Engine revision db49896cf2
• Dart version 3.5.4
• DevTools version 2.37.3

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/stephen/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A507
• CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.1)
• 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 17.0.10+0-17.0.10b1087.21-11609105)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.2.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 81.1.3
• Dart plugin version 242.21829.3

[✓] IntelliJ IDEA Community Edition (version 2022.3.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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

[✓] Connected device (4 available)
• < omitted >

[✓] Network resources
• All expected network resources are available.

! Doctor found issues in 1 category.

Pubspect.yaml

name: test_package
description: A new Flutter package project.
version: 0.0.1

environment:
sdk: '>=3.0.5 <4.0.0'
flutter: ">=1.17.0"

publish_to: 'none'

dependencies:
flutter:
sdk: flutter

dev_dependencies:

flutter_test:
sdk: flutter

# our_local_dependency:
# path: ../our_local_dependency

# flutter_lints: '>=4.0.0 <5.0.0'
flutter_lints: ^5.0.0

flutter:
uses-material-design: true
assets:
- assets/images/our_assets/

output.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions