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 199326 - AssertionError: no object for UID KeyBasedUID on FileKey (/GTNetS-MPIN, /GTNetS-MPI/SRC/interface.cc) in object class org.netbeans.modules.cnd.modelimpl.csm.UsingDirectiveImpl:[7267-7286]
Summary: AssertionError: no object for UID KeyBasedUID on FileKey (/GTNetS-MPIN, /GTNe...
Status: RESOLVED DUPLICATE of bug 196228
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 06:48 UTC by stiffuser
Modified: 2011-06-10 19:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 179272


Attachments
stacktrace (2.04 KB, text/plain)
2011-06-10 06:48 UTC, stiffuser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stiffuser 2011-06-10 06:48:10 UTC
Build: NetBeans IDE 7.0 (Build 201104080000)
VM: Java HotSpot(TM) 64-Bit Server VM, 19.1-b02-334, Java(TM) SE Runtime Environment, 1.6.0_24-b07-334-10M3326
OS: Mac OS X

Stacktrace: 
java.lang.AssertionError: no object for UID KeyBasedUID on FileKey (/GTNetS-MPIN, /GTNetS-MPI/SRC/interface.cc) in object class org.netbeans.modules.cnd.modelimpl.csm.UsingDirectiveImpl:[7267-7286]
   at org.netbeans.modules.cnd.modelimpl.csm.core.OffsetableBase._getFile(OffsetableBase.java:161)
   at org.netbeans.modules.cnd.modelimpl.csm.core.OffsetableBase.getContainingFile(OffsetableBase.java:132)
   at org.netbeans.modules.cnd.modelimpl.impl.services.UsingResolverImpl.extractNamespaces(UsingResolverImpl.java:200)
   at org.netbeans.modules.cnd.modelimpl.impl.services.UsingResolverImpl.findVisibleNamespaces(UsingResolverImpl.java:238)
   at org.netbeans.modules.cnd.completion.cplusplus.CsmFinderImpl.checkStopAfterAppendAllNamespaceElements(CsmFinderImpl.java:378)
   at org.netbeans.modules.cnd.completion.cplusplus.CsmFinderImpl.findNamespaceElements(CsmFinderImpl.java:268)
Comment 1 stiffuser 2011-06-10 06:48:15 UTC
Created attachment 108833 [details]
stacktrace
Comment 2 Alexander Simon 2011-06-10 07:25:55 UTC
Assertion is wrong in context:
UsingResolverImpl.extractNamespaces(UsingResolverImpl.java:200)
because it is valid situation when using directive became invalid while working service.
Possible solutions:
- check that current using directive is valid (assertion probability is reduced).
- use non-assertive variant of method decl.getContainingFile().
- move assertion from public API method to private implementation (that sure in consistency of object).

Variants 1 or 2 should be done for all invocation of assertive method in services.

IMHO variant 3 is preferable.
Comment 3 nnnnnk 2011-06-10 19:57:40 UTC

*** This bug has been marked as a duplicate of bug 196228 ***