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.
Build: NetBeans IDE Dev (Build 201208080001) VM: Java HotSpot(TM) Client VM, 23.2-b09, Java(TM) SE Runtime Environment, 1.7.0_06-b22 OS: Linux User Comments: vriha: closing project Stacktrace: java.lang.AssertionError at com.oracle.nashorn.parser.Lexer.scanRegEx(Lexer.java:533) at com.oracle.nashorn.parser.Lexer.lexify(Lexer.java:1425) at com.oracle.nashorn.parser.AbstractParser.getToken(AbstractParser.java:128) at com.oracle.nashorn.parser.AbstractParser.nextOrEOL(AbstractParser.java:168) at com.oracle.nashorn.parser.AbstractParser.next(AbstractParser.java:149) at com.oracle.nashorn.parser.JsonParser.parse(JsonParser.java:85)
Created attachment 122850 [details] stacktrace
I've got this error during background scan of my project - so it may happen at any time. I've debugged IDE a bit and it seems root cause for that problem is one of JSON files in my project which is not 100% sure JSON - it has at least comments inside it, what is successfully handled by Jackson parser with special configuration, but is not handled by nashorn library used in NetBeans 7.2. Sample file to play with during debugging: { "properties" : { // to be defined } }
Yes, invalid json (like below) triggers this error Sample file: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ { "name": "vriha", "aasa":[1,1], "adresa":{ } }
And one more strange thing - error report continues to pop up even after the project with the bogus json file is closed, i.e. I do "Project Context Menu -> Project Group -> (none)", create blank new project ... and, after some period, get the same error having only blank project being open in IDE. It looks like projects file cache is not cleaned correctly and obsolete items are being rescanned over and over again. This is not the root cause for that particular problem, but can be a reason for performance and memory usage issues.
Created attachment 123303 [details] stacktrace scaning the project.
Created attachment 123310 [details] stacktrace scanning project.
Created attachment 123399 [details] stacktrace scanning project after svn commit
Created attachment 123868 [details] stacktrace I was creating new HTML5 project from sources. The "sources" was folder with extracted content downloaded from https://github.com/ladariha/humla/downloads
Created attachment 123900 [details] stacktrace my.json: { "name": "TodoList", //"description": "TodoList application.", "authors": [ { "name": "xy", "email": "xy@test.com" } ], "require": { } }
Created attachment 123916 [details] stacktrace Pasted bad json into a new empty json file: 404 ? HMM.... {"type":"glanf","name":"godel","dependencies":[{"type":"phaseOne","name":"froods","data":{"b":"bear"}},{"type":"phaseTwo","name":"hoopies","data":{"c":"cashew"}},{"type":"index","name":"gerbils","data":{"d":"death"}}],"dataSource":{"sourceName":"stuff","indexOnFridays":true},"data":{"a":"apple"}} PutJSON http://localhost:9082/jobs?autoConstrain=t
Created attachment 123990 [details] stacktrace formatting this json file: // ahio { "name":"vriha" }
Created attachment 124535 [details] stacktrace Compiling a project in a shell
Fixed in nashorn.