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 234289, 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 201309040001) VM: Java HotSpot(TM) Client VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b17 OS: Windows Server 2008 User Comments: GUEST: pressed return after a foreach declaration GUEST: paste code: <div id="sidebar"> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('homepage-sidebar') ) : endif; ?> </ul> </div> GUEST: <Please provide a description of the problem or the steps to reproduce>f sdf asdf GUEST: pressing space inside an if statemetn GUEST: x GUEST: copy and try pasting unai: typing some php code (control structures -- alternate delimiters syntax) GUEST: IllegalArgumentException: (endOffset=2185 - startOffset=2184) < (startGuardedLength=1 + endGuardedLength=1) GUEST: Error appear GUEST: writing js GUEST: else GUEST: open js file in subdirectory of a html5 project... . GUEST: this error message popup whenever I start NetBean wayneseymour: I was in an HTML5 project that I've been working in for a few hours. I am currently debugging the project in the latest Google Chrome browser with the Netbeans connector. I was trying to type a multi-line javascript comment and when I did, the exception was raised. GUEST: restarted IDE, started filling report turneliusz: Opening file GUEST: Dont KNow about the issue, but occurring while saving file. KhArtNJava: dsfsdf GUEST: This just appear. GUEST: Nothing special. I use Netbeans PHP 7.4 beta on Windows 7, create a project from wordpress latest source. Review the source , open /index.php, wp-blog-header.php, wp-load.php,wp-settings.php and other files( those then was closed), last action was double click template-loader.php in skin twenty twelve, the after opened few seconds later it error popup. Hung GUEST: exception by php code: if ( dynamic_sidebar('example_widget_area_name') ) : else : endif; just when i comment/uncomment line GUEST: something weird GUEST: sent report of problem and added new line before "foreach():" block GUEST: opening js file petah: Just typing GUEST: error GUEST: Typing. rodrigorsantos: <Please provide a description of the problem or the steps to reproduce> integrapp: Shows persistent error while opening a cloned file which has been renamed GUEST: This error popped up 8 billion times. Make it go away!!!!! GUEST: foreach GUEST: I don't know what it is and what do the error. But I take error popup GUEST: after auto completion of foreach loop, this error starts showing up, After this when i try to do Source -> Format, it also does not work. GUEST: The error occures with netbease 7.3 too. It only happens when I open a specific js file.. Nothing spezial to my knowlage... GUEST: just pasted small php code in editor GUEST: It just showed this error. GUEST: Opened file. Same file as wordpress 3.6 - /wp-includes/template-loader.php d-man97: Happens repeatedly: when opening this file, scrolling in the file, switching tabs back to this file. Can barely edit the file. GUEST: Editing PHP file GUEST: I wrote this php code: foreach($msg as $loginInformation): and when IDE add "endforeach;" line, then I got this error window. ps. sorry for my english GUEST: php edited "foreach():" block GUEST: <Please provide a description of the problem or the steps to reproduce> Just repeatedly pasting (replacing) a string in a yaml document Stacktrace: java.lang.IllegalArgumentException: startOffset=0 >= endOffset=0 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:172) at org.netbeans.spi.editor.fold.FoldOperation.addToHierarchy(FoldOperation.java:204) at org.netbeans.modules.editor.fold.FoldOperationImpl$Refresher.run(FoldOperationImpl.java:697) at org.netbeans.modules.editor.fold.FoldOperationImpl.update(FoldOperationImpl.java:489)
Created attachment 139649 [details] stacktrace
This bug already has 50 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=203566
All the reports come originate from PHP code folding. Issues logged from builds >= Aug 25 contain additional info - fold offsets and portion of the source text, with folded area marked by ###...###. Maybe the context will be useful. In general creating a fold of zero length is illegal at all, the upper layer in the API could ignore such folds, but I'm not sure it is desirable. Please evaluate.
Really don't know how it can happen, but it seems that form PHP folding scanner are returned offset ranges of 0 or 1 length. So I can check it and don't allow such a suspicious offset rangse. But from code snippets in logs I'm not able to reproduce that. It would be great to have a file where the problem can be reproduced certainly.
Fixed in web-main #9c2bde1186d7 Please verify, thanks (but not sure how, if it's not certainly reproducible ;). Fix just checks offset ranges lengths.
The fix seems OK to me.
Cannot reproduce, verified in trunk. Please continue with integration Product Version: NetBeans IDE Dev (Build 201309110001) Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Transplanted, thanks.