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 128776 - many NPEs and AssertionErrors when parsing very large project (gcc)
Summary: many NPEs and AssertionErrors when parsing very large project (gcc)
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-29 00:27 UTC by Thomas Preisler
Modified: 2008-04-10 13:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log (88.22 KB, text/plain)
2008-02-29 01:07 UTC, Thomas Preisler
Details
log (42.55 KB, text/plain)
2008-04-02 14:06 UTC, soldatov
Details
C header file (4.68 KB, text/plain)
2008-04-08 19:28 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2008-02-29 00:27:37 UTC
Prashanth Narayanaswamy is trying to use CND on a very large project with 47000 files. It is gcc compiler. Sources can be checkout here with subversion:
  svn checkout svn://gccsvn/gccfss421/trunk gcc

There are many exceptions and assertion errors in the log. I cannot get any of the hyperlinks to work after it's done parsing but that may be due to the errors. Here are some 
of the errors:

java.lang.NullPointerException        at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.renderLinkageSpec(AstRenderer.java:396)        at 
org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:201)        at 
org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:70)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.render(FileImpl.java:325)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._parse(FileImpl.java:481)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.parse(FileImpl.java:448)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:266)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:90)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:82)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

SEVERE [org.netbeans.modules.cnd.apt]: line 9: #if with no expression
line 0:0: unexpected token: <no text>
line 15:9: unexpected token: *
line 27:5: unexpected token: ==
line 30:6: unexpected token: ==
java.lang.NullPointerException
        at org.netbeans.modules.cnd.modelimpl.csm.TemplateUtils.getTemplateParameters(TemplateUtils.java:145)
        at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl$ClassAstRenderer.render(ClassImpl.java:108)
        at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl.init(ClassImpl.java:357)
        at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl.create(ClassImpl.java:364)
        at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:89)
        at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:70)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.render(FileImpl.java:325)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._parse(FileImpl.java:481)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.parse(FileImpl.java:448)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:266)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:90)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:82)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

java.lang.AssertionError
        at org.netbeans.modules.cnd.modelimpl.csm.FunctionImpl.<init>(FunctionImpl.java:114)
        at org.netbeans.modules.cnd.modelimpl.csm.FunctionImplEx.<init>(FunctionImplEx.java:75)
        at org.netbeans.modules.cnd.modelimpl.csm.FunctionDefinitionImpl.<init>(FunctionDefinitionImpl.java:70)
        at org.netbeans.modules.cnd.modelimpl.csm.ConstructorDefinitionImpl.<init>(ConstructorDefinitionImpl.java:65)
        at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:122)
        at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:70)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.render(FileImpl.java:325)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._parse(FileImpl.java:481)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.parse(FileImpl.java:448)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:266)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:90)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:82)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Thomas Preisler 2008-02-29 00:41:31 UTC
Correction: 19,941 files
Comment 2 Thomas Preisler 2008-02-29 01:07:13 UTC
Created attachment 57499 [details]
log
Comment 3 nnnnnk 2008-03-11 13:38:59 UTC
Hello.
I've met some issues with compiling GCC 4.2.1 on Solaris.
Although I compiled GCC 3.4.3 that currently installed on my Solaris, 
but it seems there is no problems with parsing of this version of GCC.

Please, could you provide me NetBeans project for GCC you have 
or compile GCC with flags "-g3 -gdwarf-2" and send me binaries?
Comment 4 nnnnnk 2008-03-20 16:00:24 UTC
I fixed:
    - NPE in linkage spec renderer
    - NPE in typedef render
    - assertion in function renderer
    - NPE in template patameters

After that I successfully parsed GCC 4.3.
Comment 5 soldatov 2008-04-02 14:04:46 UTC
On my machine when I am opening gcc43 project created by nnnnnk, then some AssertionError appears in messages.log (but
hyperlinks works correctly in the parsed project)

verified in 200803302302 build
Comment 6 soldatov 2008-04-02 14:06:20 UTC
Created attachment 59544 [details]
log
Comment 7 nnnnnk 2008-04-08 16:06:24 UTC
fixed in trunk
http://hg.netbeans.org/main?cmd=changeset;node=67a2c0232135
Comment 8 Jesse Grodnik 2008-04-08 18:07:45 UTC
Reopened defect. Assertion errors. Escalated to P1. Already fix in trunk. Needs code review and QA verification.
Comment 9 Alexander Pepin 2008-04-08 19:27:04 UTC
A new simple scenario provided by  nnnnnk:
- create a new project
- create a new main C file
- add a header file from attachment
- add include for the header file to main C file
- do some minor changes in the header file to cause reparsing
Result: Multiple AssertionError messages appear in log.  
Comment 10 Alexander Pepin 2008-04-08 19:28:21 UTC
Created attachment 59856 [details]
C header file
Comment 11 Alexander Pepin 2008-04-08 20:40:48 UTC
verified in trunk build 20080408173400
Comment 12 Sergey Grinev 2008-04-09 15:16:03 UTC
code was reviewed by Vladimir Voskresensky.
fixed in release61 by Nick Krasilnikov: http://hg.netbeans.org/release61/rev/812b9c616bb0
Comment 13 Alexander Pepin 2008-04-10 13:22:00 UTC
verified in NB6.1RC1 build