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.
This bug was originally marked as duplicate of bug 227538, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE Dev (Build 201305142300) VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11 OS: Windows 7 User Comments: GUEST: It is occured when I'm trying to open or edit a jsp file GUEST: It have occured for file editing Stacktrace: java.lang.IllegalArgumentException: startOffset=14793 >= endOffset=14793 at org.netbeans.api.editor.fold.Fold.<init>(Fold.java:137) at org.netbeans.api.editor.fold.FoldHierarchy$ApiPackageAccessorImpl.createFold(FoldHierarchy.java:371) at org.netbeans.modules.editor.fold.FoldOperationImpl.createFold(FoldOperationImpl.java:170) at org.netbeans.spi.editor.fold.FoldOperation.addToHierarchy(FoldOperation.java:204) at org.netbeans.modules.editor.fold.FoldOperationImpl$Refresher.run(FoldOperationImpl.java:659) at org.netbeans.modules.editor.fold.FoldOperationImpl.update(FoldOperationImpl.java:483)
Created attachment 134469 [details] stacktrace
Please check if JspStructureScanner does not provide a range of zero length. The reported exception attempted to create a new Fold, which is done using positions provided in the supplied OffsetRange.
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=9812
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=9812
Created attachment 136237 [details] stacktrace Editing a php file. I pasted a line of code, started editing it and the error occured.
Created attachment 136239 [details] stacktrace Just started up after installation. There were 3 projects open already and 3 opened PHP files in the editor. error occured while "opening projects"
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=9812
From exception report comments it looks that this problem happens for many different editors - JSP, PHP, JS. Hence I'm passing the issue back to editing infrastructure to re-evaluate. Btw. I do not think there were any changes in last few years in Folding support in the JSP editor.
Please read comment #2 before reassinging back; the implementation in CSL ignored invalid fold input, which resulted in an unreliable behaviour: some OffsetRanges reported from StructureScanner turned into folds, while some (with zero length) did not. Individual StructureScanners should be still corrected not to pass invalid data for folds.
Fixed in hg.netbeans.org/jet-main/rev/9cf2e5db4779 Still StructureScanner impls should be checked not to pass invalid data.
Integrated into 'main-silver', will be available in build *201307112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9cf2e5db4779 User: Svata Dedic <sdedic@netbeans.org> Log: #229782: folds that have zero length are ignored in updates
Jirka P., why is this issue marked as 74Patch candidate ? I assume this was already fixed in July ...
According to hg (http://hg.netbeans.org/releases/file/af66ebf05f5a/editor.fold/src/org/netbeans/modules/editor/fold/FoldOperationImpl.java, lines ~ 564-574) the 7.4 release already contains changeset attached to this defect.