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 174755 - a lot of java.lang.IllegalStateException: FAILED ASSERTION
Summary: a lot of java.lang.IllegalStateException: FAILED ASSERTION
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-16 14:35 UTC by Alexander Simon
Modified: 2010-03-25 05:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
one of exeption (8.16 KB, text/plain)
2009-10-16 14:36 UTC, Alexander Simon
Details
chrome.zip (49.55 KB, application/zip)
2010-02-10 09:30 UTC, Petr Jiricka
Details
fresh log (48.01 KB, text/plain)
2010-02-11 01:29 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2009-10-16 14:35:12 UTC
a lot of java.lang.IllegalStateException:

java.lang.IllegalStateException: FAILED ASSERTION
        at org.mozilla.nb.javascript.Kit.codeBug(Kit.java:449)
        at org.mozilla.nb.javascript.Node.getExistingIntProp(Node.java:769)
        at org.mozilla.nb.javascript.Parser.getterSetterProperty(Parser.java:3625)
        at org.mozilla.nb.javascript.Parser.primaryExpr(Parser.java:3328)
Comment 1 Alexander Simon 2009-10-16 14:36:25 UTC
Created attachment 89633 [details]
one of exeption
Comment 2 Alexander Simon 2009-12-23 04:01:28 UTC
Please, remove logging exception.
It is prevent other logging.
I do not expect such logging if I open fierfox/crome C/C++ project.
Comment 3 Petr Jiricka 2010-02-01 07:13:59 UTC
Hi, can you please attach some source code which reproduces this issue? Thanks.
Comment 5 Petr Jiricka 2010-02-10 09:28:52 UTC
I am not able to reproduce using the current dev build of NB 6.9. How exactly did you set up the project in the IDE? I used the following steps:
1. Expanded the source archive
2. Selected New Project -> C/C++ -> C/C++ project with existing sources
3. In the next page, selected the chrome subdirectory as the existing sources dir and changed the configuration mode to Custom
4. In the next page, selected chrome/Makefile.in as the existing makefile, unchecked Clean and Build after Finish
5. Then I just accepted all the defaults and finished the wizard
6. Waited for the source scanning to complete
7. From the Files tab, opened all the individual .js files in the editor

=> No exception.

I am attaching the zipped chrome subdirectory for convenience, so this is easier to reproduce.
Comment 6 Petr Jiricka 2010-02-10 09:30:11 UTC
Created attachment 94051 [details]
chrome.zip
Comment 7 Alexander Simon 2010-02-11 01:29:02 UTC
All steps right except:
-remove "test" pattern from ignored folders pattern on "source files" step.
I also do not see exceptions in your example in current development IDE.
But on real chromium-trunk (from 7 December 2009) bug still reproduced.
See attachment (contains assertion with previous IllegalArgumentException, may be it help). I still do not see resolvable explanation in exceptions.  It make too difficult to point on file that causes exception.
My steps is:
- download chromium
- build chromium with flags provide CFLAGS="-g3 -gwdarf-2" and CXXFLAGS="-g3 -gwdarf-2"
- start IDE with 1G Xmx
- create project from existent code: Custom, without build, remove test pattern.
- See a very, very, very slow scanning. It consumes a several hours (and about 120 minutes of CPU time). See a lot of exception in log.
Comment 8 Alexander Simon 2010-02-11 01:29:45 UTC
Created attachment 94065 [details]
fresh log
Comment 9 Alexander Simon 2010-02-11 01:38:46 UTC
(In reply to comment #7)
> - See a very, very, very slow scanning. It consumes a several hours (and about
> 120 minutes of CPU time).
Sorry, not veyr slow, real time is:
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: file:/net/elif/export1/sside/av202691/chromas/ took: 167 ms (New or modified files: 11, Deleted files: 0)
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 2 source roots took: 1486978 ms (New or modified files: 73895, Deleted files: 0)
Comment 10 Petr Pisl 2010-02-15 06:30:03 UTC
Should be fixed in NB 6.9, i will try to look at this.
Comment 11 Petr Pisl 2010-03-23 15:23:56 UTC
The codeBug function is designed to terminate parsing process, if there is something wrong in a js file. It's a part of the mozilla parser. The function never ends and always throws the java.lang.IllegalStateException: FAILED ASSERTION . 

The exception is caught in NetBeans and then the stacktrace is printed to the error stream. Because the exceptions is basically "a return type" of the parsing, these exceptions shouldn't be printed. When I look into the code, it looks like the printing was added by vstejskal for some debug reasons. So the patch remove printing the exception. 

Fixed in the webmain.
Comment 12 Alexander Simon 2010-03-23 17:00:13 UTC
Could you point to change set that fix a problem?
Comment 13 Petr Pisl 2010-03-23 17:58:29 UTC
http://hg.netbeans.org/web-main/rev/56cfe3018750

The change is simple. Just remove the printing of the exceptions.
Comment 14 Quality Engineering 2010-03-25 05:59:25 UTC
Integrated into 'main-golden', will be available in build *201003250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/56cfe3018750
User: Petr Pisl <ppisl@netbeans.org>
Log: #174755 -  a lot of java.lang.IllegalStateException: FAILED ASSERTION