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.
After I have pasted the text "DelegateShape { shape: bind geom fill: Color.BLUE }" the following exception appeared: java.lang.IndexOutOfBoundsException: Index: 170, Size: 170 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.netbeans.modules.javafx.fxd.composer.lexer.FXDLexer.getNextTokenData(FXDLexer.java:128) at org.netbeans.modules.javafx.fxd.composer.lexer.FXDLexer.nextToken(FXDLexer.java:110) at org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:190) at org.netbeans.lib.lexer.BatchTokenList.tokenOrEmbeddingImpl(BatchTokenList.java:175) at org.netbeans.lib.lexer.BatchTokenList.tokenOrEmbedding(BatchTokenList.java:170) at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:454) at org.netbeans.modules.javafx.fxd.composer.editor.parser.FXDSyntaxErrorParser$FXDParserResult.getSyntaxErrors(FXDSyntaxErrorParser.java:107) at org.netbeans.modules.javafx.fxd.composer.editor.SyntaxErrorsHighlightingTask.run(SyntaxErrorsHighlightingTask.java:76) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:655) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [catch] at java.lang.Thread.run(Thread.java:619) I have not tried it with 6.9 beta though, but with my development build.
It seems to be triggered by the exception java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at com.sun.javafx.tools.fxd.FXDReference.parse(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.ContentListener$ContentLexerImpl.createReference(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseValue(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseValue(Unknown Source) at org.netbeans.modules.javafx.fxd.composer.lexer.FXDLexer$ContentLexerImpl.attributeValue(FXDLexer.java:262) at com.sun.javafx.tools.fxd.container.scene.fxd.ContentListener$ContentLexerImpl.attributeValue(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObjectImpl(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.nextValue(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseArray(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.nextValue(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObjectImpl(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObject(Unknown Source) at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObject(Unknown Source) at org.netbeans.modules.javafx.fxd.composer.lexer.FXDLexer.buildTokensList(FXDLexer.java:86) at org.netbeans.modules.javafx.fxd.composer.lexer.FXDLexer.nextToken(FXDLexer.java:107) at org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:190) at org.netbeans.lib.lexer.BatchTokenList.tokenOrEmbeddingImpl(BatchTokenList.java:175) at org.netbeans.lib.lexer.BatchTokenList.tokenOrEmbedding(BatchTokenList.java:170) at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:454) at org.netbeans.modules.javafx.fxd.composer.editor.parser.FXDSyntaxErrorParser$FXDParserResult.getSyntaxErrors(FXDSyntaxErrorParser.java:107) at org.netbeans.modules.javafx.fxd.composer.editor.SyntaxErrorsHighlightingTask.run(SyntaxErrorsHighlightingTask.java:76) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:655) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [catch] at java.lang.Thread.run(Thread.java:619) which is fxdloader reaction to invalid FXD content (attached). This is not ideal situation, but still lexer should not crash like this, but rather mark the content as invalid (red?).
Created attachment 98136 [details] Invalid FXD content causing lexer crash
Created attachment 98200 [details] fxviewer_error.JPG error is in fxd loader. It fails on parsing value "bind geom". The same is reproducible with fx viewer (see attache screenshot). the only think I can do is to catch and correctly process this exception.
Yes, agreed.
fixed in trunk. http://hg.netbeans.org/javafx/rev/8265947abf93 IndexOutOfBoundsException is processed as syntax error with message "Syntax is not supported by parser.\nFaild to parse with exception: {0}". I can give more specific message about not supported "bind" in attribute value, but not sure described case is the only possible.