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 256686 - AssertionError: Read null FileSystem from code model persistence for fileSystemIndexInLayer == 1
Summary: AssertionError: Read null FileSystem from code model persistence for fileSyst...
Status: STARTED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
: 256948 258019 258347 262174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-19 11:45 UTC by Vladimir Kvashin
Modified: 2018-03-13 13:23 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 221250


Attachments
stacktrace (3.54 KB, text/plain)
2015-11-19 11:45 UTC, Vladimir Kvashin
Details
stacktrace (3.54 KB, text/plain)
2015-11-24 11:33 UTC, Alexander Simon
Details
stacktrace (3.54 KB, text/plain)
2016-03-16 10:35 UTC, paul_floyd
Details
stacktrace (3.54 KB, text/plain)
2016-03-23 10:38 UTC, paul_floyd
Details
stacktrace (3.54 KB, text/plain)
2016-08-17 12:30 UTC, Alexander Simon
Details
IDE log with lots of trace (concerning both remote and code model) (527.86 KB, text/plain)
2017-04-24 07:13 UTC, Vladimir Kvashin
Details
While the IDE exited, some more exceptions occurred, see the log (10.26 KB, text/plain)
2017-04-24 07:19 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2015-11-19 11:45:10 UTC
Build: NetBeans IDE 8.1 (Build 20151117-fd89431022ea)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.71-b01, Java(TM) SE Runtime Environment, 1.7.0_71-b14
OS: Linux

User Comments:
vkvashin: started IDE with a project open from previous IDE run




Stacktrace: 
java.lang.AssertionError: Read null FileSystem from code model persistence for fileSystemIndexInLayer == 1
   at org.netbeans.modules.cnd.repository.storage.Storage$FSReadConverterImpl.layerToClient(Storage.java:1070)
   at org.netbeans.modules.cnd.repository.storage.data.RepositoryDataInputStream.readFileSystem(RepositoryDataInputStream.java:131)
   at org.netbeans.modules.cnd.apt.support.api.StartEntry.<init>(StartEntry.java:101)
   at org.netbeans.modules.cnd.apt.impl.support.clank.ClankIncludeHandlerImpl$StateImpl.<init>(ClankIncludeHandlerImpl.java:345)
   at org.netbeans.modules.cnd.apt.utils.APTSerializeUtils.readIncludeState(APTSerializeUtils.java:258)
   at org.netbeans.modules.cnd.apt.impl.support.APTPreprocHandlerImpl$StateImpl.<init>(APTPreprocHandlerImpl.java:411)
Comment 1 Vladimir Kvashin 2015-11-19 11:45:12 UTC
Created attachment 157409 [details]
stacktrace
Comment 2 Alexander Simon 2015-11-24 11:33:07 UTC
Created attachment 157474 [details]
stacktrace

reopen IDE with opened full remote project
Comment 3 paul_floyd 2016-03-16 10:35:30 UTC
Created attachment 158887 [details]
stacktrace

Opening NetBeans which was trying to open the one project that was open when I closed it last.
Comment 4 paul_floyd 2016-03-23 10:38:28 UTC
Created attachment 158977 [details]
stacktrace

Starting Nebeans which opened last project
Comment 5 Alexander Simon 2016-07-08 14:55:26 UTC
*** Bug 256948 has been marked as a duplicate of this bug. ***
Comment 6 Alexander Simon 2016-07-08 14:55:53 UTC
*** Bug 258019 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Simon 2016-07-08 14:56:20 UTC
*** Bug 258347 has been marked as a duplicate of this bug. ***
Comment 8 Alexander Simon 2016-07-08 14:56:31 UTC
*** Bug 262174 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Simon 2016-08-17 12:30:21 UTC
Created attachment 161692 [details]
stacktrace

open IDE with opemed full remote project
Comment 10 Alexander Simon 2017-03-29 08:14:10 UTC
Bug is reproduced in development build only.
Comment 11 Vladimir Voskresensky 2017-03-30 13:39:46 UTC
has nothing to do with new code model
Comment 12 Maria Tishkova 2017-04-03 11:19:57 UTC
(In reply to Vladimir Voskresensky from comment #11)
> has nothing to do with new code model

I disagree. I think that the problem *IS* in code model. Not new one,but somewhere in Libraries. Persistence is broken and it is not repository responsibility  but client incorrect usage (or just a bug in the library persistence mechanism)
I looked through messages.log and here is my investigation result:
Exception occurred when trying to open library file (from the library unit descriptor), but in fact the unit descriptor is not opened yet (that is impossible and in fact if persistence would be correct this would never occur, it was a contract between repository and clients that openUnit(), getUnitId() should be invoked first). And as I see the problem is even worse: the library file uses remote file system when parsing local file and vise versa. It is *always* about standard libraries. And the same toolchain on remote and local machines. Which means /usr/include exists on both local and remote file systems but they are messed somehow for the projects.. 

Will take a look at library persistence mechanism.
Comment 13 Vladimir Voskresensky 2017-04-03 17:50:01 UTC
(In reply to Maria Tishkova from comment #12)
> (In reply to Vladimir Voskresensky from comment #11)
> > has nothing to do with new code model
> 
> I think that the problem *IS* in code model. 
Sure. The comment was "nothing to doe with *NEW* codemodel".
Comment 10: "Bug is reproduced in development build only." is encrypted message with meaning "new-code-model which is on in Dev only".
Comment 14 Quality Engineering 2017-04-11 01:52:39 UTC
Integrated into 'main-silver', will be available in build *201704110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/57f2521f0c90
User: Maria Dalmatova <mromashova@netbeans.org>
Log: logging added for bz#256686
(transplanted from 4583d277fe558d838ba7618649b93393bbe8d981)
Comment 15 ilia 2017-04-13 10:52:55 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=256686 Changesets:
    http://hg.netbeans.org/releases/rev/4583d277fe55 # logging added for bz#256686
Comment 16 ilia 2017-04-13 10:53:55 UTC
Maria, this bug is still not fixed, correct?
Comment 17 Maria Tishkova 2017-04-13 10:58:38 UTC
(In reply to ilia from comment #16)
> Maria, this bug is still not fixed, correct?

correct
Comment 18 Vladimir Kvashin 2017-04-24 07:12:04 UTC
I've just got this exception, but it seems I was not able to log it via the IDE. I reopened the IDE that was previously normally closed; it contained only one open project - llvm39; this project was local. However there were some remote hosts set up. The debugger showed that there existed an instance of RemoteFileSystem (corresponding to vk@localhost). But all open files and the only open project - they all were local. I'll attach the complete IDE log shortly.
Comment 19 Vladimir Kvashin 2017-04-24 07:13:05 UTC
Created attachment 164166 [details]
IDE log with lots of trace (concerning both remote and code model)
Comment 20 Vladimir Kvashin 2017-04-24 07:19:00 UTC
Created attachment 164167 [details]
While the IDE exited, some more exceptions occurred, see the log
Comment 21 Vladimir Kvashin 2017-04-24 12:52:19 UTC
My attempt to reproduce this more times failed.

The code shows that IDE will function OK in this case in 
in o.n.m.cnd.modelimpl.csm.core.LibProjectImpl.createInstance(
LibProjectImpl.java:99)
we see that the instance of the project will not be read => new instance will be created and parsed.