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 194362

Summary: Exception: Null file object for /var/tmp/as204739-cnd-test-downloads/pkg-config-0.25/glib-1.2.10/gmodule/gmoduleconf.h
Product: cnd Reporter: Alexander Simon <alexvsimon>
Component: -- Other --Assignee: Vladimir Kvashin <vkvashin>
Status: RESOLVED FIXED    
Severity: normal CC: alexvsimon
Priority: P2 Keywords: REGRESSION
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 175863
Attachments: stacktrace
stacktrace

Description Alexander Simon 2011-01-14 18:23:35 UTC
Build: NetBeans IDE Dev (Build 110114-d853109c420f)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: SunOS

User Comments:
alexvsimon: creating project from existing code, project pkg-config-0.25




Stacktrace: 
java.lang.Exception: Null file object for /var/tmp/as204739-cnd-test-downloads/pkg-config-0.25/glib-1.2.10/gmodule/gmoduleconf.h
   at org.netbeans.modules.cnd.utils.CndUtils.assertTrue(CndUtils.java:160)
   at org.netbeans.modules.cnd.utils.CndUtils.assertNotNull(CndUtils.java:128)
   at org.netbeans.modules.cnd.modelimpl.csm.core.FileBufferFile.getInputStream(FileBufferFile.java:186)
   at org.netbeans.modules.cnd.modelimpl.csm.core.AbstractFileBuffer.getReader(AbstractFileBuffer.java:143)
   at org.netbeans.modules.cnd.apt.impl.support.APTDriverImpl$APTSyncCreator.getTokenStream(APTDriverImpl.java:132)
   at org.netbeans.modules.cnd.apt.impl.support.APTDriverImpl$APTSyncCreator.findAPT(APTDriverImpl.java:169)
Comment 1 Alexander Simon 2011-01-14 18:23:39 UTC
Created attachment 105007 [details]
stacktrace
Comment 2 Vladimir Kvashin 2011-01-14 19:20:59 UTC
I'm unable to reproduce this.

Code says the following.

The stack is just a result of assertion.

This might happen in the case file is removed from disk after the correspondent #include directive was resolved but before we started lexing the included file. 

So probably we should just remove the assertion.

However Alexander believes that no file was deleted during parse.
Comment 3 Vladimir Kvashin 2011-01-17 13:48:20 UTC
This occurred once and nobody can repeat this; however I'd like not to close this issue; let's see whether this will repeat.

Anyhow, assertion should be softer (just a message in console).
Comment 4 Alexander Simon 2011-01-21 19:06:25 UTC
Created attachment 105254 [details]
stacktrace

create project with existing code
Comment 5 Vladimir Voskresensky 2011-01-23 20:35:41 UTC
Alexander was able to reproduce it, making back to P2 for deeper investigation, right?
Comment 6 Vladimir Kvashin 2011-01-24 07:57:25 UTC
It's just a wrong assertion. We'll get it each time a file was deleted just after the correspondent #include was resolved (but before this file was lexed). 

In such case an exception is thrown and it is logged by caller (with WARNING level), I've just checked.

The gmoduleconf.h file is recreated when configuring or building, so it's exactly the case.

http://hg.netbeans.org/cnd-main/rev/546696956f75
Comment 7 Quality Engineering 2011-01-25 06:07:55 UTC
Integrated into 'main-golden', will be available in build *201101250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/546696956f75
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #194362 -  Exception: Null file object