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 154437 - NullPointerException at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onFileIncluded
Summary: NullPointerException at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBa...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Alexander Simon
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 11:18 UTC by geldouches
Modified: 2009-02-19 20:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 130407


Attachments
stacktrace (4.18 KB, text/plain)
2008-12-03 11:18 UTC, geldouches
Details
stacktrace (6.71 KB, text/plain)
2009-02-12 13:19 UTC, avp
Details
stacktrace (2.91 KB, text/plain)
2009-02-12 13:22 UTC, avp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description geldouches 2008-12-03 11:18:08 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Linux, 2.6.9-67.0.15.EL.cernsmp, i386

User Comments:
rickvanderzwet: Expanding freshly created project, based of existing  CVS checkout with Makefile



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onFileIncluded(ProjectBase.java:1079)
        at org.netbeans.modules.cnd.modelimpl.parser.apt.APTParseFileWalker.includeAction(APTParseFileWalker.java:138)
        at org.netbeans.modules.cnd.modelimpl.parser.apt.APTProjectFileBasedWalker.include(APTProjectFileBasedWalker.java:93)
        at org.netbeans.modules.cnd.apt.support.APTAbstractWalker.onInclude(APTAbstractWalker.java:86)
        at org.netbeans.modules.cnd.apt.support.APTWalker.onAPT(APTWalker.java:269)
        at org.netbeans.modules.cnd.apt.support.APTWalker.visit(APTWalker.java:231)
Comment 1 geldouches 2008-12-03 11:18:18 UTC
Created attachment 74465 [details]
stacktrace
Comment 2 Vladimir Voskresensky 2008-12-03 11:47:48 UTC
need to investigate why
FileContainer.Entry entry = getFileContainer().getEntry(csmFile.getBuffer().getFile());
returns null
Comment 3 Exceptions Reporter 2008-12-24 07:36:58 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=130407
Comment 4 Vladimir Kvashin 2009-01-28 07:23:14 UTC
Does not repeat. 
Most likely fixed as a side effect of #153876 fix
Comment 5 avp 2009-02-12 13:19:16 UTC
Build: NetBeans IDE Dev (Build 200902101401)
VM: OpenJDK 64-Bit Server VM, 1.6.0_0-b11, OpenJDK  Runtime Environment, 1.6.0_0-b11
OS: Linux, 2.6.27.7-9-default, amd64

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onFileIncluded(ProjectBase.java:1108)
        at org.netbeans.modules.cnd.modelimpl.parser.apt.APTParseFileWalker.includeAction(APTParseFileWalker.java:152)
        at org.netbeans.modules.cnd.modelimpl.parser.apt.APTProjectFileBasedWalker.include(APTProjectFileBasedWalker.java:93)
        at org.netbeans.modules.cnd.apt.support.APTAbstractWalker.onInclude(APTAbstractWalker.java:87)
        at org.netbeans.modules.cnd.apt.support.APTWalker.onAPT(APTWalker.java:274)
        at org.netbeans.modules.cnd.apt.support.APTWalker.visit(APTWalker.java:236)
Comment 6 avp 2009-02-12 13:19:28 UTC
Created attachment 76913 [details]
stacktrace
Comment 7 avp 2009-02-12 13:22:25 UTC
Build: NetBeans IDE Dev (Build 200902101401)
VM: OpenJDK 64-Bit Server VM, 1.6.0_0-b11, OpenJDK  Runtime Environment, 1.6.0_0-b11
OS: Linux, 2.6.27.7-9-default, amd64

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onFileIncluded(ProjectBase.java:1108)
        at org.netbeans.modules.cnd.modelimpl.parser.apt.APTParseFileWalker.includeAction(APTParseFileWalker.java:152)
        at org.netbeans.modules.cnd.modelimpl.parser.apt.APTProjectFileBasedWalker.include(APTProjectFileBasedWalker.java:93)
        at org.netbeans.modules.cnd.apt.support.APTAbstractWalker.onInclude(APTAbstractWalker.java:87)
        at org.netbeans.modules.cnd.apt.support.APTWalker.onAPT(APTWalker.java:274)
        at org.netbeans.modules.cnd.apt.support.APTWalker.toNextNode(APTWalker.java:381)
Comment 8 avp 2009-02-12 13:22:36 UTC
Created attachment 76914 [details]
stacktrace
Comment 9 Vladimir Voskresensky 2009-02-12 13:35:42 UTC
reopen, because last report is on recent build 200902101401
Comment 10 Vladimir Kvashin 2009-02-12 15:13:04 UTC
Last stack was got using version of Feb 10, 2009, 
so the NPE at the line ProjectBase.java:1108
means that 
getFileContainer().getEntry(csmFile.getBuffer().getFile());
(which is now on line 1117)
returns null

Comment 11 Vladimir Voskresensky 2009-02-12 15:33:34 UTC
I think that changes made on Feb 10 are not in Feb 10 build => most likely the line was:
synchronized (entry.getLock()) {

+ we've seen once such error
Looks like dummy container was used and it doesn't have any data => it's get return "null" => NPE on sync(null)
Comment 12 Vladimir Kvashin 2009-02-12 17:25:55 UTC
That's what I meant. Not getFileContainer(), but getFileContainer().getEntry(...) returns null.
Comment 13 Vladimir Kvashin 2009-02-13 11:15:22 UTC
So far we are unable to reproduce it in a stable way.
If anybody knows how to reproduce this more or less stable, please share your knowledge.
Comment 14 Alexander Simon 2009-02-16 09:56:48 UTC
fixed, change set:
http://hg.netbeans.org/main/rev/b85c4840d9d5
Comment 15 Quality Engineering 2009-02-18 10:52:34 UTC
Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b85c4840d9d5
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed IZ#154437:NullPointerException at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onFileIncluded