Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Analyzer] Flutter_lints stack overflow error #56976

Closed
PvtPuddles opened this issue Oct 28, 2024 · 2 comments
Closed

[Analyzer] Flutter_lints stack overflow error #56976

PvtPuddles opened this issue Oct 28, 2024 · 2 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@PvtPuddles
Copy link

PvtPuddles commented Oct 28, 2024

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

@dart-github-bot
Copy link
Collaborator

Summary: The user is experiencing a Stack Overflow error when running dart analyze after pub get, which slows down the analyzer but doesn't prevent it from working. The issue appears to be related to a specific project file and can be resolved by using flutter analyze or downgrading flutter_lints.

@dart-github-bot dart-github-bot added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 28, 2024
@a-siva a-siva removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Oct 28, 2024
@srawlins
Copy link
Member

srawlins commented Nov 4, 2024

This issue is fixed on the most recent Dart beta release, and will be included in the Dart 3.6 release.

@srawlins srawlins closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants