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

StackOverflow in analyzer when typing import into part #57043

Closed
DanTup opened this issue Nov 7, 2024 · 3 comments
Closed

StackOverflow in analyzer when typing import into part #57043

DanTup opened this issue Nov 7, 2024 · 3 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DanTup
Copy link
Collaborator

DanTup commented Nov 7, 2024

I was trying to create a project to test enhanced parts with and managed to trigger this stack overflow.

pubspec.yaml:

name: enhanced_parts
version: 1.0.0

environment:
  sdk: ^3.5.2

analysis_options.yaml:

analyzer:
  enable-experiment:
    - enhanced-parts

lib/root.dart

import 'dart:math';

part 'level1.dart';

lib/level1.dart

I was typing the import here.. after typing import (and possibly pressing space), the analysis server terminated.

import 

part of 'root.dart';

The error looks like:

[11:22:28 AM] [Analyzer] [Error] [Stack Overflow,
#0      Driver._captureExceptions.errorFunction (package:analysis_server/src/server/driver.dart:561:7)
#1      _Zone._processUncaughtError (dart:async/zone.dart:1097:14)
#2      _CustomZone.handleUncaughtError (dart:async/zone.dart:1301:5)
#3      Future._propagateToListeners (dart:async/future_impl.dart:812:16)
#4      Future._completeError (dart:async/future_impl.dart:711:5)
#5      _rootRunUnary (dart:async/zone.dart:1422:47)
#6      _rootRun (dart:async/zone.dart:1414:13)
#7      _CustomZone.run (dart:async/zone.dart:1317:19)
#8      _CustomZone.runGuarded (dart:async/zone.dart:1225:7)
#9      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265:23)
#10     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#11     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#12     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:405:11)
#13     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
#14     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#15     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#16     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#17     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#18     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#19     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#20     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#21     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#22     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#23     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#24     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#25     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#26     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#27     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#28     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#29     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#30     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#31     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#32     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#33     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#34     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#35     FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
...
...
#12403  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12404  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12405  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12406  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12407  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12408  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12409  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12410  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12411  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12412  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12413  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12414  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12415  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12416  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12417  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12418  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12419  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12420  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12421  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12422  FileKind.disposeLibraryCycle (package:analyzer/src/dart/analysis/file_state.dart:407:22)
#12423  FileKind.dispose (package:analyzer/src/dart/analysis/file_state.dart:390:5)
#12424  FileState._updateKind (package:analyzer/src/dart/analysis/file_state.dart:984:12)
#12425  FileState.refresh (package:analyzer/src/dart/analysis/file_state.dart:764:5)
#12426  FileTracker.verifyApiSignature.<anonymous closure> (package:analyzer/src/dart/analysis/file_tracker.dart:155:29)
#12427  PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15)
#12428  FileTracker.verifyApiSignature (package:analyzer/src/dart/analysis/file_tracker.dart:150:20)
#12429  FileTracker.verifyChangedFilesIfNeeded (package:analyzer/src/dart/analysis/file_tracker.dart:228:9)
#12430  AnalysisDriver._applyPendingFileChanges (package:analyzer/src/dart/analysis/driver.dart:1529:25)
#12431  AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2398:16)
#12432  _rootRunUnary (dart:async/zone.dart:1422:47)
#12433  _rootRun (dart:async/zone.dart:1414:13)
#12434  _CustomZone.run (dart:async/zone.dart:1317:19)
#12435  _CustomZone.runGuarded (dart:async/zone.dart:1225:7)
#12436  _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265:23)
#12437  _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#12438  _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#12439  _Timer._runTimers (dart:isolate-patch/timer_impl.dart:405:11)
#12440  _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
]

(cc @scheglov )

@DanTup DanTup added 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) labels Nov 7, 2024
@DanTup
Copy link
Collaborator Author

DanTup commented Nov 7, 2024

(I see now I was typing the import in the wrong place.. it seems that they come after part ofs but before parts)

@scheglov scheglov self-assigned this Nov 7, 2024
@scheglov
Copy link
Contributor

scheglov commented Nov 7, 2024

I can reproduce it.

@scheglov
Copy link
Contributor

scheglov commented Nov 7, 2024

@scheglov scheglov added the P2 A bug or feature request we're likely to work on label Nov 7, 2024
copybara-service bot pushed a commit that referenced this issue Nov 7, 2024
…elf.

Bug: #57043
Change-Id: I8bde1d5f6b1d2eb9bd3e42ec74261d492e9303e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393906
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
@scheglov scheglov closed this as completed Nov 7, 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. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants