Closed Noobware1 closed 1 year ago
steps to reproduce the error (ignore the commented code)
Runtime runtimeEval(Uint8List bytecode) { final runtime = Runtime(bytecode.buffer.asByteData()); // runtime.grant(NetworkPermission.any); //Enums // $ShowType.configureForRuntime(runtime); // $ShowStaus.configureForRuntime(runtime); // $MediaItemType.configureForRuntime(runtime); // $MediaType.configureForRuntime(runtime); // $SubtitleFormat.configureForRuntime(runtime); // $VideoFormat.configureForRuntime(runtime); //Extenstions // $StringUtils.configureForRuntime(runtime); // $IterableUtils.configureForRuntime(runtime); // $ListUtils.configureForRuntime(runtime); // $CryptoUtils.configureForRuntime(runtime); //OkHttp // $ElementObject.configureForRuntime(runtime); // $DocumentObject.configureForRuntime(runtime); // $OkHttpResponseObject.configureForRuntime(runtime); //MediaDetails // $MediaDetails.configureForRuntime(runtime); // $SearchResponse.configureForRuntime(runtime); // $ActorData.configureForRuntime(runtime); // $SeasonData.configureForRuntime(runtime); // $Episode.configureForRuntime(runtime); // $SeasonList.configureForRuntime(runtime); // $MediaItem.configureForRuntime(runtime); // $Anime.configureForRuntime(runtime); // $TvSeries.configureForRuntime(runtime); // $Movie.configureForRuntime(runtime); // $ExtractorLink.configureForRuntime(runtime); //Meiyou utils // $MeiyouUtils.configureForRuntime(runtime); //Media // $Media.configureForRuntime(runtime); // $Subtitle.configureForRuntime(runtime); // $Video.configureForRuntime(runtime); // $VideoQuality.configureForRuntime(runtime); // $VideoSource.configureForRuntime(runtime); // $Subtitle.configureForRuntime(runtime); //App utils // $MeiyouUtils.configureForRuntime(runtime); //Interfaces // $ExtractorApi.configureForRuntime(runtime); // $BasePluginApi.configureForRuntime(runtime); runtime.setup(); return runtime; } void main() { final compiler = Compiler(); final compiled = compiler.compile({ 'extenstions_test': { 'main.dart': '''main() { var episode = RegExp(r'\\d+').firstMatch('episode 1'); print(episode); }''' } }).write(); final runtime = runtimeEval(compiled); final value = (await runtime.executeLib( 'package:extenstions_test/main.dart', 'main', )); print(value); }
error
Unhandled exception: Null check operator used on a null value #0 OffsetTracker.apply.<anonymous closure> (package:dart_eval/src/eval/compiler/offset_tracker.dart:22:33) #1 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13) #2 OffsetTracker.apply (package:dart_eval/src/eval/compiler/offset_tracker.dart:16:22) #3 Compiler.compileSources (package:dart_eval/src/eval/compiler/compiler.dart:534:28) #4 Compiler.compile (package:dart_eval/src/eval/compiler/compiler.dart:164:12) #5 main (package:extenstions_test/extenstions_test.dart:175:29) #6 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:294:33) #7 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
and also this error doesn't occur when i use compiler write and load function. thank you.
Fixed in v0.7.1
steps to reproduce the error (ignore the commented code)
error
and also this error doesn't occur when i use compiler write and load function. thank you.