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 243360 - InternalError in Storage.findMatchedUnitIDInLayer when using two-layer repository
Summary: InternalError in Storage.findMatchedUnitIDInLayer when using two-layer reposi...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 15:33 UTC by Vladimir Kvashin
Modified: 2016-11-01 10:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (29.85 KB, application/zip)
2014-03-28 15:33 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2014-03-28 15:33:37 UTC
Created attachment 146389 [details]
test project

Open the attached project. Note that there are following lines in  project.properties file:
cache.location.1=nbproject/private/cache.1
cache.location.2=nbproject/private/cache.2

Wait until the project is parsed, close IDE.

Relaunch IDE. Exception occurs, the project is parsed once more.

The stack is
java.lang.InternalError
	at org.netbeans.modules.cnd.repository.storage.Storage.findMatchedUnitIDInLayer(Storage.java:614)
	at org.netbeans.modules.cnd.repository.storage.Storage.updateUnitsTranslationMap(Storage.java:199)
	at org.netbeans.modules.cnd.repository.storage.Storage.access$1100(Storage.java:89)
	at org.netbeans.modules.cnd.repository.storage.Storage$UnitIDReadConverterImpl.layerToClient(Storage.java:866)
	at org.netbeans.modules.cnd.repository.storage.data.RepositoryDataInputStream.readUnitId(RepositoryDataInputStream.java:104)
	at org.netbeans.modules.cnd.modelimpl.repository.ProjectKey.<init>(ProjectKey.java:64)
	at org.netbeans.modules.cnd.modelimpl.repository.KeyObjectFactory.createObject(KeyObjectFactory.java:140)
	at org.netbeans.modules.cnd.repository.support.AbstractObjectFactory.readSelfPersistent(AbstractObjectFactory.java:78)
	at org.netbeans.modules.cnd.modelimpl.repository.KeyObjectFactory.readKey(KeyObjectFactory.java:79)
	at org.netbeans.modules.cnd.modelimpl.uid.KeyBasedUID.<init>(KeyBasedUID.java:115)
	at org.netbeans.modules.cnd.modelimpl.uid.UIDUtilities$CachedUID.<init>(UIDUtilities.java:479)
	at org.netbeans.modules.cnd.modelimpl.uid.UIDUtilities$ProjectUID.<init>(UIDUtilities.java:533)
	at org.netbeans.modules.cnd.modelimpl.uid.UIDObjectFactory.createObject(UIDObjectFactory.java:419)
	at org.netbeans.modules.cnd.repository.support.AbstractObjectFactory.readSelfPersistent(AbstractObjectFactory.java:78)
	at org.netbeans.modules.cnd.modelimpl.uid.UIDObjectFactory.readUID(UIDObjectFactory.java:137)
	at org.netbeans.modules.cnd.modelimpl.content.project.IncludedFileContainer.<init>(IncludedFileContainer.java:93)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.<init>(ProjectBase.java:3671)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectImpl.<init>(ProjectImpl.java:372)
	at org.netbeans.modules.cnd.modelimpl.csm.core.CsmObjectFactory.createObject(CsmObjectFactory.java:329)
	at org.netbeans.modules.cnd.repository.support.AbstractObjectFactory.readSelfPersistent(AbstractObjectFactory.java:78)
	at org.netbeans.modules.cnd.modelimpl.csm.core.CsmObjectFactory.read(CsmObjectFactory.java:613)
[catch] at org.netbeans.modules.cnd.repository.RepositoryImpl.get(RepositoryImpl.java:119)
	at org.netbeans.modules.cnd.repository.api.Repository.get(Repository.java:27)
	at org.netbeans.modules.cnd.modelimpl.repository.RepositoryUtils.get(RepositoryUtils.java:118)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.readInstance(ProjectBase.java:399)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.readInstance(ProjectBase.java:381)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectImpl.createInstance(ProjectImpl.java:89)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ModelImpl.addProject(ModelImpl.java:227)
	at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport$3.runImpl(ModelSupport.java:424)
	at org.netbeans.modules.cnd.utils.NamedRunnable.run(NamedRunnable.java:62)
	at org.netbeans.modules.cnd.spi.toolchain.CompilerSetManagerEvents.runProjectReadiness(CompilerSetManagerEvents.java:91)
	at org.netbeans.modules.cnd.makeproject.api.configurations.Configurations.runOnProjectReadiness(Configurations.java:139)
	at org.netbeans.modules.cnd.makeproject.api.configurations.Configurations.runOnProjectReadiness(Configurations.java:121)
	at org.netbeans.modules.cnd.makeproject.NativeProjectProvider.runOnProjectReadiness(NativeProjectProvider.java:131)
	at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport.addProject(ModelSupport.java:430)
	at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport.openProjectsIfNeeded(ModelSupport.java:271)
	at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport.access$100(ModelSupport.java:101)
	at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport$1.run(ModelSupport.java:116)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 Vladimir Kvashin 2014-03-28 15:35:54 UTC
When user closes IDE after that, the following NPE occurs


java.lang.NullPointerException
	at org.netbeans.modules.cnd.repository.storage.Storage.closeUnit(Storage.java:540)
	at org.netbeans.modules.cnd.repository.storage.Storage.closeUnit(Storage.java:515)
	at org.netbeans.modules.cnd.repository.storage.Storage.shutdown(Storage.java:352)
	at org.netbeans.modules.cnd.repository.storage.StorageManager.shutdown(StorageManager.java:154)
Caused: org.netbeans.modules.cnd.repository.api.RepositoryException
	at org.netbeans.modules.cnd.repository.api.RepositoryExceptions.throwException(RepositoryExceptions.java:81)
	at org.netbeans.modules.cnd.repository.storage.StorageManager.shutdown(StorageManager.java:156)
	at org.netbeans.modules.cnd.repository.RepositoryImpl.shutdown(RepositoryImpl.java:209)
	at org.netbeans.modules.cnd.repository.api.Repository.shutdown(Repository.java:92)
	at org.netbeans.modules.cnd.modelimpl.repository.RepositoryUtils.shutdown(RepositoryUtils.java:285)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ModelImpl.shutdown(ModelImpl.java:579)
	at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport.shutdown(ModelSupport.java:235)
	at org.netbeans.modules.cnd.modelimpl.Installer$Stop$RunnableImpl.run(Installer.java:105)
	at org.netbeans.api.progress.ProgressUtils$RunnableWrapper.run(ProgressUtils.java:337)
	at org.netbeans.api.progress.ProgressUtils$RunnableWrapper.run(ProgressUtils.java:329)
	at org.netbeans.modules.progress.ui.RunOffEDTImpl$ProgressBackgroundRunner.runBackground(RunOffEDTImpl.java:458)
	at org.netbeans.modules.progress.ui.AbstractWindowRunner.call(AbstractWindowRunner.java:108)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 2 Vladimir Kvashin 2014-03-28 15:37:38 UTC
The attached project has remote build host.
As soon as I changed host to local one, problem disappeared.
Comment 3 Vladimir Kvashin 2016-11-01 10:57:51 UTC
Although it's me who has filed this bug, it still looks questionable whether we should spend time on fixing it. The reason is: we did nothing to inform user about this layering. So nobody ever used it; and nobody will use it, unless we fix this "information" issue first. But I'm not aware of such plans..