build
build copied to clipboard
VM error: "Not in inclusive range 6457..286720: 1578263"
Happening all over
3.6.0-149.0.dev
RangeError (end): Invalid value: Not in inclusive range 6457..286720: 1578263
dart:typed_data new Uint8List.sublistView
package:analyzer/src/summary2/data_reader.dart 202:28 SummaryDataReader.readUint8List
package:analyzer/src/summary2/package_bundle_format.dart 85:31 new PackageBundleReader
package:analyzer/src/clients/build_resolvers/build_resolvers.dart 45:[19](https://github.com/kevmoo/source_gen_test/actions/runs/10436304756/job/28901213357#step:5:20) createAnalysisDriver
package:build_resolvers/src/analysis_driver.dart 26:10 analysisDriver
package:build_resolvers/src/resolver.dart 460:26 AnalyzerResolvers._ensureInitialized.<fn>
===== asynchronous gap ===========================
package:async/src/result/value.dart 24:3 ValueResult.ValueResult
===== asynchronous gap ===========================
package:async/src/result/result.dart 131:[22](https://github.com/kevmoo/source_gen_test/actions/runs/10436304756/job/28901213357#step:5:23) Result.release.<fn>
===== asynchronous gap ===========================
package:build_resolvers/src/resolver.dart 470:5 AnalyzerResolvers.get
===== asynchronous gap ===========================
package:build/src/builder/build_step_impl.dart [23](https://github.com/kevmoo/source_gen_test/actions/runs/10436304756/job/28901213357#step:5:24)7:8 _DelayedResolver.libraryFor
===== asynchronous gap ===========================
package:build_test/src/resolve_source.dart 238:23 _ResolveSourceBuilder.build
===== asynchronous gap ===========================
package:build/src/generate/run_builder.dart 83:7 runBuilder.buildForInput
===== asynchronous gap ===========================
package:build/src/builder/logging.dart 32:40 scopeLogAsync.<fn>
See https://github.com/kevmoo/source_gen_test/actions/runs/10436304756/job/28901213357
Summary: The user is encountering a RangeError in the Uint8List.sublistView method, indicating an attempt to access an element outside the valid range of the list. This error occurs in the package:analyzer library, specifically in the SummaryDataReader.readUint8List function.
It is a bug in https://github.com/dart-lang/build/blob/ec64e8424004c402eb48e584c12bfef4f5cab4a6/build_resolvers/lib/src/sdk_summary.dart#L37.
Note that the way this function is written is not guarding against multiple instances of this function running in parallel and all creating the same summary output. So it might end up reading from file which is being overwritten and as a result it will get partial summary.
CC @jakemac53 @natebosch re ☝️
I think this should have stayed closed? Please re-open if not :) thanks.