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: | [attribute name len > 32k !?!] StringIndexOutOfBoundsException: String index out of range: 933 | ||
---|---|---|---|
Product: | web | Reporter: | mrpc |
Component: | HTML Editor | Assignee: | Marek Fukala <mfukala> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | abu_gurnah, augcampos, david.zapata, diegotdai, d_bs, gameshas, guenti, heidyz, jingram, jury89, kaes1977, killermosi, krheinwald, leek, matteodg, padraigdoran, Petah, scube, teknoid, troodon, vandru, venimus, vriha, xylifyx |
Priority: | P2 | ||
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 187408 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace |
Description
mrpc
2012-04-26 14:54:03 UTC
Created attachment 118815 [details]
stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=187408 Created attachment 118817 [details]
stacktrace
Sitting idle
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=187408 Created attachment 119176 [details]
stacktrace
scanning php project
Any chance to get the file causing this problem? I just wonder how it looks like to a tag attribute name is longer than 16k. Created attachment 119677 [details]
stacktrace
Open nb first time, import settings from 7.1.1 and only a php project
*** Bug 212572 has been marked as a duplicate of this bug. *** *** Bug 212937 has been marked as a duplicate of this bug. *** *** Bug 213222 has been marked as a duplicate of this bug. *** *** Bug 213127 has been marked as a duplicate of this bug. *** #587028 - provided a reproducible case for: java.lang.StringIndexOutOfBoundsException: String index out of range: 35 at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:879) at java.lang.StringBuilder.substring(StringBuilder.java:55) at java.lang.AbstractStringBuilder.subSequence(AbstractStringBuilder.java:858) at java.lang.StringBuilder.subSequence(StringBuilder.java:55) at org.netbeans.modules.html.parser.ElementsFactory$CommonAttribute.name(ElementsFactory.java:862) at org.netbeans.modules.html.parser.ElementsFactory$EmptyOpenTag.getAttribute(ElementsFactory.java:274) at org.netbeans.modules.html.editor.gsf.HtmlStructureItem._getAttributeValue(HtmlStructureItem.java:236) at org.netbeans.modules.html.editor.gsf.HtmlStructureItem.getAttributeValue(HtmlStructureItem.java:223) at org.netbeans.modules.html.editor.gsf.HtmlStructureItem.<init>(HtmlStructureItem.java:87) to reproduce, jut put "<a href=""</p>" into an empty php or html file the problem reported in ER 587028 has been fixed in web-main#2d7e7f5f528e Since 2d7e7f5f528e the html parser validates the element attributes before really puting them to the element's node such issue should not happen since that changeset. So the fix can be considered as the fix for all situations where the html parser code tries to produce some erroneout attribute (which AFAIR happens for erroneous code like as in the source code sample above). The fix must be put to the 7.2 release! I'll test it and verify it tomorrow if that's OK. Integrated into 'main-golden', will be available in build *201206150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2d7e7f5f528e User: Marek Fukala <mfukala@netbeans.org> Log: #211792 - bad attributes with wrong offsets/lengths created for html elements under some circumstances The case described in comment #13 is fixed. I tried to edit HTML files with/without stupid syntax errors and no StringIndexOutOfBoundsException was thrown. There is no better reproducible scenario => carefully verifying Product Version: NetBeans IDE Dev (Build 201206150001) Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21 System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb) (In reply to comment #15) > The fix must be put to the 7.2 release! Marku, please, if you think it should be in 7.2, can you add the "72_HR_FIX_CANDIDATE" keyword and proceed with integration as described at [1] [1] http://wiki.netbeans.org/NetBeans_72_HighResistance pending 7.2 verification... changeset: 232334:1568688f7dad branch: release72 summary: #211792 - bad attributes with wrong offsets/lengths created for html elements under some circumstances Integrated into 'releases', will be available in build *201206272359* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/1568688f7dad User: Marek Fukala <mfukala@netbeans.org> Log: #211792 - bad attributes with wrong offsets/lengths created for html elements under some circumstances verified in 7.2 Product Version: NetBeans IDE 7.2 RC1 (Build 201206272359) Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03 System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb) |