This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 196572 - boost "tests error reporting: #ifdef, #ifndef syntax errors." results in NPE
Summary: boost "tests error reporting: #ifdef, #ifndef syntax errors." results in NPE
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.0
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 09:21 UTC by Alexander Simon
Modified: 2011-07-26 13:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2011-03-11 09:21:56 UTC
Code example from boost 1.46.0, file t_6_019.cpp:
--------------------8<---------------
// Tests error reporting: #ifdef, #ifndef syntax errors.
// 15.3: Not an identifier.
//E t_6_019.cpp(20): error: ill formed preprocessor directive: #ifdef "string"
#ifdef "string"
#endif
--------------------8<---------------
NPE:
SEVERE [org.netbeans.modules.cnd.apt]: testfiles/t_6_019.cpp, line 20: no macro name given in #ifdef directive 
java.lang.NullPointerException
	at org.netbeans.modules.cnd.apt.support.APTBaseToken.getEndOffset(APTBaseToken.java:127)
	at org.netbeans.modules.cnd.apt.impl.structure.APTTokenBasedNode.getEndOffset(APTTokenBasedNode.java:93)
	at org.netbeans.modules.cnd.apt.impl.structure.APTTokenBasedNode.hashCode(APTTokenBasedNode.java:138)
	at org.netbeans.modules.cnd.apt.impl.structure.APTDefineNode.hashCode(APTDefineNode.java:322)
	at org.netbeans.modules.cnd.apt.impl.support.APTMacroImpl.hashCode(APTMacroImpl.java:136)
	at org.netbeans.modules.cnd.apt.impl.support.APTMacroCache$APTCompoundMacroManager.getDelegate(APTMacroCache.java:189)
	at org.netbeans.modules.cnd.apt.impl.support.APTMacroCache$APTCompoundMacroManager.getMacro(APTMacroCache.java:195)
	at org.netbeans.modules.cnd.apt.impl.support.APTFileMacroMap.createMacro(APTFileMacroMap.java:144)
	at org.netbeans.modules.cnd.apt.impl.support.APTBaseMacroMap.defineImpl(APTBaseMacroMap.java:118)
	at org.netbeans.modules.cnd.apt.impl.support.APTBaseMacroMap.define(APTBaseMacroMap.java:112)
	at org.netbeans.modules.cnd.apt.support.APTAbstractWalker.onDefine(APTAbstractWalker.java:168)
	at org.netbeans.modules.cnd.modelimpl.parser.apt.APTParseFileWalker.onDefine(APTParseFileWalker.java:142)
Comment 1 nnnnnk 2011-05-20 11:56:14 UTC
fixed
http://hg.netbeans.org/releases/rev/df31fb5f2778