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.
Summary: | IllegalStateException: Lexer org.netbeans.modules.groovy.gsp.lexer.GspLexer@2a9ee93 returned null token but lexerInput.readLength()=2 lexer-state: GEND_TAG tokenStartOffset=945, readOffset=947, | ||
---|---|---|---|
Product: | groovy | Reporter: | ckoebke |
Component: | GSP | Assignee: | bruno.flavio |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, Coenedens, jherkel, jkovalsky, MackSix, mkhramov, motobreath, prodigy4440, santiquetzal, zmirc |
Priority: | P2 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 85298 |
Attachments: |
stacktrace
stacktrace stacktrace Proposed patch: keep tokenizing the input. stacktrace |
Description
ckoebke
2014-01-22 15:04:10 UTC
Created attachment 144253 [details]
stacktrace
Created attachment 149037 [details]
stacktrace
I edited html code, there was a problem with space between attributes, something like rendered="#{aaa==true}"value="#{bbb}"
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=85298 Groovy lexer should be fixed to tokenize remaining chars of the input. Created attachment 149056 [details]
stacktrace
Edit JSF xhtml file.
Cursoe inside empty JSF expression #{}
Press \
Bug verification procedure: 1. Create new grails project; 2. Open "Views and layouts"->error.gsp 3. In the end of the file, after "</html>", attempt to write anything. Raises the exception reported: "java.lang.IllegalStateException: Lexer org.netbeans.modules.groovy.gsp.lexer.GspLexer@52f828d2 returned null token but lexerInput.readLength()=2" Created attachment 152629 [details]
Proposed patch: keep tokenizing the input.
As with the JSP lexer, this patch defines an ERROR token and returns it when the output can't be further tokenized.
Created attachment 154527 [details]
stacktrace
Editing a JFS XHTML file.
<p><h:outputText value="#{moreSports. }" and cursor was to the right of moreSports. with code complete window up. I hit backspace and this exception was thrown.
It's possible I het the | key instead of backspace. Will try to reproduce.
(In reply to MackSix from comment #8) > Created attachment 154527 [details] > stacktrace > > Editing a JFS XHTML file. > > <p><h:outputText value="#{moreSports. }" and cursor was to the right of > moreSports. with code complete window up. I hit backspace and this exception > was thrown. > > It's possible I het the | key instead of backspace. Will try to reproduce. Reproducible as per Comment 5. This is a JSF XHTML file and I am not using Groovy. Product Version: NetBeans IDE Dev (Build 201507040001) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Patch seems to be OK. Thanks Bruno! http://hg.netbeans.org/core-main/rev/872bee5fb2c3 Integrated Bruno's patch. Thanks a lot for your patch contribution Bruno! Integrated into 'main-silver', will be available in build *201508210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/872bee5fb2c3 User: Jiri Kovalsky <jkovalsky@netbeans.org> Log: #240826: Preventing java.lang.IllegalStateException thrown from Groovy when editing HTML files. Both the code snippet provided in the bug report and the bug verification procedure on comment 6 are now working. Tested with build 201508230002. *** Bug 244664 has been marked as a duplicate of this bug. *** *** Bug 246348 has been marked as a duplicate of this bug. *** |