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

Null check operator used on a null value #865

Closed
SPSpisoft opened this issue Aug 23, 2022 · 4 comments
Closed

Null check operator used on a null value #865

SPSpisoft opened this issue Aug 23, 2022 · 4 comments

Comments

@SPSpisoft
Copy link

SPSpisoft commented Aug 23, 2022

Unhandled exception:
Null check operator used on a null value

#0      BinaryPrinter._getVariableIndex (package:kernel/binary/ast_to_binary.dart:83:17)
#1      BinaryPrinter.visitVariableGet (package:kernel/binary/ast_to_binary.dart:1497:17)
#2      VariableGet.accept (package:kernel/ast.dart:4137:44)
#3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#4      BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:340:7)
#5      BinaryPrinter.visitArguments (package:kernel/binary/ast_to_binary.dart:1751:5)
#6      Arguments.accept (package:kernel/ast.dart:5119:38)
#7      BinaryPrinter.writeArgumentsNode (package:kernel/binary/ast_to_binary.dart:444:10)
#8      BinaryPrinter.visitStaticInvocation (package:kernel/binary/ast_to_binary.dart:1734:5)
#9      StaticInvocation.accept (package:kernel/ast.dart:6289:44)
#10     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#11     BinaryPrinter.visitExpressionStatement (package:kernel/binary/ast_to_binary.dart:2052:5)
#12     ExpressionStatement.accept (package:kernel/ast.dart:8829:43)
#13     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#14     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:340:7)
#15     BinaryPrinter.visitBlockExpression (package:kernel/binary/ast_to_binary.dart:2017:5)
#16     BlockExpression.accept (package:kernel/ast.dart:8461:44)
#17     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#18     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:340:7)
#19     BinaryPrinter.visitArguments (package:kernel/binary/ast_to_binary.dart:1751:5)
#20     Arguments.accept (package:kernel/ast.dart:5119:38)
#21     BinaryPrinter.writeArgumentsNode (package:kernel/binary/ast_to_binary.dart:444:10)
#22     BinaryPrinter.visitStaticInvocation (package:kernel/binary/ast_to_binary.dart:1734:5)
#23     StaticInvocation.accept (package:kernel/ast.dart:6289:44)
#24     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#25     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:522:7)
#26     BinaryPrinter.writeVariableDeclaration (package:kernel/binary/ast_to_binary.dart:2266:5)
#27     BinaryPrinter.visitLet (package:kernel/binary/ast_to_binary.dart:2006:5)
#28     Let.accept (package:kernel/ast.dart:8390:44)
#29     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#30     BinaryPrinter.visitYieldStatement (package:kernel/binary/ast_to_binary.dart:2246:5)
#31     YieldStatement.accept (package:kernel/ast.dart:10180:43)
#32     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#33     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:340:7)
#34     BinaryPrinter.visitBlock (package:kernel/binary/ast_to_binary.dart:2063:5)
#35     Block.accept (package:kernel/ast.dart:8885:43)
#36     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#37     BinaryPrinter.visitLabeledStatement (package:kernel/binary/ast_to_binary.dart:2096:5)
#38     LabeledStatement.accept (package:kernel/ast.dart:9095:43)
#39     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#40     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:340:7)
#41     BinaryPrinter.visitBlock (package:kernel/binary/ast_to_binary.dart:2063:5)
#42     Block.accept (package:kernel/ast.dart:8885:43)
#43     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#44     BinaryPrinter.visitTryCatch (package:kernel/binary/ast_to_binary.dart:2214:5)
#45     TryCatch.accept (package:kernel/ast.dart:9918:43)
#46     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#47     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:522:7)
#48     BinaryPrinter.visitFunctionNode (package:kernel/binary/ast_to_binary.dart:1481:5)
#49     FunctionNode.accept (package:kernel/ast.dart:3846:38)
#50     BinaryPrinter.writeFunctionNode (package:kernel/binary/ast_to_binary.dart:437:10)
#51     BinaryPrinter.visitFunctionDeclaration (package:kernel/binary/ast_to_binary.dart:2290:5)
#52     FunctionDeclaration.accept (package:kernel/ast.dart:10502:43)
#53     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#54     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:340:7)
#55     BinaryPrinter.visitBlock (package:kernel/binary/ast_to_binary.dart:2063:5)
#56     Block.accept (package:kernel/ast.dart:8885:43)
#57     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:430:10)
#58     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:522:7)
#59     BinaryPrinter.visitFunctionNode (package:kernel/binary/ast_to_binary.dart:1481:5)
#60     FunctionNode.accept (package:kernel/ast.dart:3846:38)
#61     BinaryPrinter.writeFunctionNode (package:kernel/binary/ast_to_binary.dart:437:10)
#62     BinaryPrinter.visitProcedure (package:kernel/binary/ast_to_binary.dart:1312:5)
#63     Procedure.accept (package:kernel/ast.dart:3151:40)
#64     BinaryPrinter.writeProcedureNode (package:kernel/binary/ast_to_binary.dart:458:10)
#65     BinaryPrinter.writeProcedureNodeList (package:kernel/binary/ast_to_binary.dart:349:7)
#66     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:1216:5)
#67     Class.accept (package:kernel/ast.dart:1408:38)
#68     BinaryPrinter.writeClassNode (package:kernel/binary/ast_to_binary.dart:472:10)
#69     BinaryPrinter.writeClassNodeList (package:kernel/binary/ast_to_binary.dart:367:7)
#70     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:1058:5)
#71     Library.accept (package:kernel/ast.dart:565:38)
#72     BinaryPrinter.writeLibraryNode (package:kernel/binary/ast_to_binary.dart:451:10)
#73     BinaryPrinter.writeLibraries (package:kernel/binary/ast_to_binary.dart:756:9)
#74     BinaryPrinter.writeComponentFile.<anonymous closure> (package:kernel/binary/ast_to_binary.dart:595:7)
#75     Timeline.timeSync (dart:developer/timeline.dart:157:22)
#76     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:577:14)
#77     IncrementalSerializer.serialize (package:front_end/src/fasta/incremental_serializer.dart:308:13)
#78     IncrementalSerializer.writePackagesToSinkAndTrimComponent (package:front_end/src/fasta/incremental_serializer.dart:158:24)
#79     FrontendCompiler.writeDillFile (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:728:29)
#80     FrontendCompiler.compile (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:605:13)
<asynchronous suspension>
#81     listenAndCompile.<anonymous closure> (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:1199:11)
<asynchronous suspension>
the Dart compiler exited unexpectedly.
@nirinchev
Copy link
Member

What version of the dart SDK are you using? This should have been fixed in the latest.

@nielsenko
Copy link
Contributor

@SPSpisoft You need to use Dart 2.17.4 or later (satisfied by Flutter 3.0.3 or later) due to: dart-lang/sdk#49075. Since 0.3.2+beta and forward we depend on Finalizable. We will update our SDK constraint in the next release.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Aug 24, 2022
@SPSpisoft
Copy link
Author

SPSpisoft commented Aug 24, 2022

upgrade dart & fixed
thanks @nirinchev @nielsenko

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Aug 24, 2022
@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Aug 24, 2022
@SUNbrightness
Copy link

dart fix --apply
this commond is effective

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants