You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
java.lang.NullPointerException: Cannot invoke "org.eclipse.cdt.core.parser.IToken.getType()" because "token" is null
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.getContextSensitiveType(GNUCPPSourceParser.java:270)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.optionalVirtSpecifierSeq(GNUCPPSourceParser.java:4444)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.initDeclarator(GNUCPPSourceParser.java:4385)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.initDeclarator(GNUCPPSourceParser.java:4191)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1746)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1684)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.simpleDeclaration(GNUCPPSourceParser.java:3274)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declaration(GNUCPPSourceParser.java:3012)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1429)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationListInBraces(AbstractGNUSourceCodeParser.java:1376)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.classSpecifier(GNUCPPSourceParser.java:5399)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declSpecifierSeq(GNUCPPSourceParser.java:3869)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declSpecifierSeq(GNUCPPSourceParser.java:3568)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1716)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1684)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.simpleDeclaration(GNUCPPSourceParser.java:3274)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declaration(GNUCPPSourceParser.java:3012)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1429)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationListInBraces(AbstractGNUSourceCodeParser.java:1376)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.namespaceDefinitionOrAlias(GNUCPPSourceParser.java:3091)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declaration(GNUCPPSourceParser.java:2968)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1429)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parseTranslationUnit(AbstractGNUSourceCodeParser.java:1368)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.translationUnit(AbstractGNUSourceCodeParser.java:1363)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parse(AbstractGNUSourceCodeParser.java:688)
at org.eclipse.cdt.core.dom.parser.AbstractCLikeLanguage.getASTTranslationUnit(AbstractCLikeLanguage.java:171)
at org.eclipse.cdt.internal.core.model.TranslationUnit.getAST(TranslationUnit.java:886)
at org.eclipse.cdt.internal.core.model.TranslationUnit.getAST(TranslationUnit.java:843)
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
java.lang.NullPointerException should be avoided.
Screenshots
I ensure the param of TranslationUnit.getAST is not null.
token maybes return null.
pls check whether there is a problem, if so, fix it thk.
Version Information (please complete the following information):
OS and OS Version/extra details: Linux
Eclipse Version from Help -> About -> 2023-06 (4.28.0)
CDT Version from Help -> About -> Installation Details -> 11.3.0.202309051907
Additional context
Add any other context about the problem here. For example the error log (in workspace/.metadata/.log) or for GDB interaction issues the GDB traces
The text was updated successfully, but these errors were encountered:
Describe the bug
java.lang.NullPointerException: Cannot invoke "org.eclipse.cdt.core.parser.IToken.getType()" because "token" is null
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.getContextSensitiveType(GNUCPPSourceParser.java:270)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.optionalVirtSpecifierSeq(GNUCPPSourceParser.java:4444)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.initDeclarator(GNUCPPSourceParser.java:4385)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.initDeclarator(GNUCPPSourceParser.java:4191)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1746)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1684)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.simpleDeclaration(GNUCPPSourceParser.java:3274)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declaration(GNUCPPSourceParser.java:3012)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1429)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationListInBraces(AbstractGNUSourceCodeParser.java:1376)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.classSpecifier(GNUCPPSourceParser.java:5399)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declSpecifierSeq(GNUCPPSourceParser.java:3869)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declSpecifierSeq(GNUCPPSourceParser.java:3568)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1716)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declSpecifierSequence_initDeclarator(AbstractGNUSourceCodeParser.java:1684)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.simpleDeclaration(GNUCPPSourceParser.java:3274)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declaration(GNUCPPSourceParser.java:3012)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1429)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationListInBraces(AbstractGNUSourceCodeParser.java:1376)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.namespaceDefinitionOrAlias(GNUCPPSourceParser.java:3091)
at org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.declaration(GNUCPPSourceParser.java:2968)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1429)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parseTranslationUnit(AbstractGNUSourceCodeParser.java:1368)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.translationUnit(AbstractGNUSourceCodeParser.java:1363)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parse(AbstractGNUSourceCodeParser.java:688)
at org.eclipse.cdt.core.dom.parser.AbstractCLikeLanguage.getASTTranslationUnit(AbstractCLikeLanguage.java:171)
at org.eclipse.cdt.internal.core.model.TranslationUnit.getAST(TranslationUnit.java:886)
at org.eclipse.cdt.internal.core.model.TranslationUnit.getAST(TranslationUnit.java:843)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
java.lang.NullPointerException should be avoided.
Screenshots
I ensure the param of TranslationUnit.getAST is not null.
token maybes return null.
pls check whether there is a problem, if so, fix it thk.
Version Information (please complete the following information):
Additional context
Add any other context about the problem here. For example the error log (in workspace/.metadata/.log) or for GDB interaction issues the GDB traces
The text was updated successfully, but these errors were encountered: