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.
Build: NetBeans IDE Dev (Build 200902261558) VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284 OS: Mac OS X, 10.5.6, i386 User Comments: patchinko: just editing a file GUEST: I'm sorry It was in PHP source :/ here it is the code: /* echo $_SESSION['koszyk']['x'].";"; echo $_SESSION['koszyk']['y']; */ set current posiition to the last line and then start to go up(by arraow) holding shift button, to select text Exception occurs many each time i do that ingoreinhart: If want to change a comment from /* * */ to /** * */ I get this error. Every time. GUEST: I was marking text pushing up arraow ( on keyboard) It was multiline comment in Javascript source file. Stacktrace: java.lang.IndexOutOfBoundsException: index=-1 < 0 at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexNonNegative(CharSequenceUtilities.java:500) at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexValid(CharSequenceUtilities.java:509) at org.netbeans.lib.lexer.token.DefaultToken$InputSourceSubsequence.charAt(DefaultToken.java:243) at org.netbeans.modules.php.editor.CompletionContextFinder.getCompletionContextInComment(CompletionContextFinder.java:582) at org.netbeans.modules.php.editor.CompletionContextFinder.findCompletionContext(CompletionContextFinder.java:223) at org.netbeans.modules.php.editor.PHPCodeTemplateFilter.run(PHPCodeTemplateFilter.java:102)
Created attachment 77444 [details] stacktrace
Most likely somewhere around org.netbeans.modules.php.editor.CompletionContextFinder.getCompletionContextInComment(CompletionContextFinder.java:582).
This issue has already 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=144897
Raising priority to P2 because of the duplicates, can't properly evaluate this issue as current web-main sources are unusable
Managed to reproduce it (not so easy, it is random). Current stack trace looks like this java.lang.IndexOutOfBoundsException: index=-1 < 0 at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexNonNegative(CharSequenceUtilities.java:500) at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexValid(CharSequenceUtilities.java:509) at org.netbeans.lib.lexer.token.DefaultToken$InputSourceSubsequence.charAt(DefaultToken.java:243) at org.netbeans.modules.php.editor.CompletionContextFinder.getCompletionContextInComment(CompletionContextFinder.java:583) at org.netbeans.modules.php.editor.CompletionContextFinder.findCompletionContext(CompletionContextFinder.java:224) at org.netbeans.modules.php.editor.PHPCodeTemplateFilter.run(PHPCodeTemplateFilter.java:95) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:128) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:112) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:188) Caused: org.netbeans.modules.parsing.spi.ParseException at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:98) at org.netbeans.modules.php.editor.PHPCodeTemplateFilter.<init>(PHPCodeTemplateFilter.java:70) at org.netbeans.modules.php.editor.PHPCodeTemplateFilter$Factory.createFilter(PHPCodeTemplateFilter.java:112) at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.getTemplateFilters(CodeTemplateManagerOperation.java:226) at org.netbeans.lib.editor.codetemplates.SurroundWithFix.getFixes(SurroundWithFix.java:71) at org.netbeans.lib.editor.codetemplates.AbbrevDetection.showSurroundWithHint(AbbrevDetection.java:424) at org.netbeans.lib.editor.codetemplates.AbbrevDetection.access$100(AbbrevDetection.java:93) at org.netbeans.lib.editor.codetemplates.AbbrevDetection$1.actionPerformed(AbbrevDetection.java:186) at javax.swing.Timer.fireActionPerformed(Timer.java:271) [catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
I can tell you that I use this 6.7 dev version every day @ work. I have the same installed at home and never had this problem there. (desktop: Linux (Ubuntu); Netbook: WinXP (Home)) @work I leave my comp running 5/7d 24/24h. At the moment it consumes 307MB when I view it in Windows Task Manager.
Fixed http://hg.netbeans.org/web-main/rev/155eecca13f7
Integrated into 'main-golden', will be available in build *200903210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/155eecca13f7 User: Tomasz Slota <tslota@netbeans.org> Log: #159282: IndexOutOfBoundsException: index=-1 < 0
verified on Product Version: NetBeans IDE 6.7 Beta (Build 200904192254) Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02
*** Issue 159884 has been marked as a duplicate of this issue. ***
restest with 200910241428 => ALL OK Many thanks to the dev team!