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 139575 - assertion failure in TypeImpl.write
Summary: assertion failure in TypeImpl.write
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: nnnnnk
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2008-07-10 11:21 UTC by Alexey Vladykin
Modified: 2008-07-11 12:35 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 Alexey Vladykin 2008-07-10 11:21:55 UTC
The following assertion fails when parsing loki sources with latest version of CND. A quick investigation has shown that
offending Type is in file "test/Register/foo.cpp".

java.lang.AssertionError
	at org.netbeans.modules.cnd.modelimpl.csm.TypeImpl.write(TypeImpl.java:453)
	at org.netbeans.modules.cnd.modelimpl.repository.PersistentUtils.writeType(PersistentUtils.java:317)
	at org.netbeans.modules.cnd.modelimpl.repository.PersistentUtils.writeTypes(PersistentUtils.java:344)
	at org.netbeans.modules.cnd.modelimpl.csm.TypeImpl.write(TypeImpl.java:457)
	at org.netbeans.modules.cnd.modelimpl.csm.NestedType.write(NestedType.java:145)
	at org.netbeans.modules.cnd.modelimpl.repository.PersistentUtils.writeType(PersistentUtils.java:314)
	at org.netbeans.modules.cnd.modelimpl.csm.NestedType.write(NestedType.java:146)
	at org.netbeans.modules.cnd.modelimpl.repository.PersistentUtils.writeType(PersistentUtils.java:314)
	at org.netbeans.modules.cnd.modelimpl.csm.TypedefImpl.write(TypedefImpl.java:255)
	at org.netbeans.modules.cnd.repository.support.AbstractObjectFactory.writeSelfPersistent(AbstractObjectFactory.java:66)
	at org.netbeans.modules.cnd.modelimpl.csm.core.CsmObjectFactory.write(CsmObjectFactory.java:427)
	at org.netbeans.modules.cnd.repository.sfs.BufferedRWAccess.write(BufferedRWAccess.java:121)
	at org.netbeans.modules.cnd.repository.sfs.IndexedStorageFile.write(IndexedStorageFile.java:142)
	at org.netbeans.modules.cnd.repository.sfs.DoubleFileStorage.write(DoubleFileStorage.java:146)
	at org.netbeans.modules.cnd.repository.disk.UnitImpl.putPhysically(UnitImpl.java:143)
	at org.netbeans.modules.cnd.repository.disk.DiskRepositoryManager.write(DiskRepositoryManager.java:163)
	at org.netbeans.modules.cnd.repository.queue.RepositoryWritingThread.run(RepositoryWritingThread.java:121)
	at org.netbeans.modules.cnd.repository.queue.RepositoryThreadManager$Wrapper.run(RepositoryThreadManager.java:84)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Alexey Vladykin 2008-07-10 14:32:24 UTC
Offending code (after macro expansion and simplification):

struct Foo {};
struct ClassList {};

struct Loki_FooClassList_OK{typedef int class_Foo_is_not_in_ClassList;};

typedef Loki::Select<Loki::TL::IndexOf<ClassList, Foo>::value == -1, Foo, Loki_FooClassList_OK>::Result
IsInListFooClassList;

typedef IsInListFooClassList::class_Foo_is_not_in_ClassList isInListTestFooClassList;