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.

Bug 202520 - IndexOutOfBoundsException: start=-1073741674 < 0
Summary: IndexOutOfBoundsException: start=-1073741674 < 0
Status: VERIFIED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 20:20 UTC by maghiel
Modified: 2012-04-17 06:16 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181317


Attachments
stacktrace (6.73 KB, text/plain)
2011-09-22 20:20 UTC, maghiel
Details
stacktrace (6.35 KB, text/plain)
2011-09-27 09:19 UTC, Vladimir Riha
Details
stacktrace (6.35 KB, text/plain)
2011-09-27 09:22 UTC, Vladimir Riha
Details
stacktrace (3.23 KB, text/plain)
2011-10-04 00:18 UTC, schkovich
Details
stacktrace (5.79 KB, text/plain)
2011-10-27 01:20 UTC, mil-ast
Details
stacktrace (5.79 KB, text/plain)
2011-10-27 01:23 UTC, mil-ast
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maghiel 2011-09-22 20:20:31 UTC
Build: NetBeans IDE Dev (Build 201109202329)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
maghiel: Trying to generate getter and setter for 2 properties




Stacktrace: 
java.lang.IndexOutOfBoundsException: start=-1073741674 < 0
   at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexesValid(CharSequenceUtilities.java:529)
   at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexesValid(CharSequenceUtilities.java:549)
   at org.netbeans.lib.editor.util.CharSubSequence.checkIndexesValid(CharSubSequence.java:65)
   at org.netbeans.lib.editor.util.CharSubSequence.<init>(CharSubSequence.java:87)
   at org.netbeans.modules.editor.lib2.document.CharContent.subSequence(CharContent.java:95)
   at org.netbeans.lib.lexer.token.DefaultToken.toString(DefaultToken.java:199)
Comment 1 maghiel 2011-09-22 20:20:35 UTC
Created attachment 111063 [details]
stacktrace
Comment 2 Vladimir Riha 2011-09-27 09:19:35 UTC
Created attachment 111226 [details]
stacktrace

What caused it:
1) create new PHP class
2) define 2 variables inside class. Let's say second variable is defined at line X
3) use Enter to get to line X+2, press Alt+Insert and select constructor
4) Dialog is shown, don't check variables, but the whole class
=> Exception
Comment 3 Vladimir Riha 2011-09-27 09:22:34 UTC
Created attachment 111228 [details]
stacktrace
Comment 4 schkovich 2011-10-04 00:18:42 UTC
Created attachment 111439 [details]
stacktrace

alt+shift+f php file
Comment 5 Exceptions Reporter 2011-10-27 01:17:46 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=181317
Comment 6 mil-ast 2011-10-27 01:20:40 UTC
Created attachment 112477 [details]
stacktrace
Comment 7 mil-ast 2011-10-27 01:23:40 UTC
Created attachment 112478 [details]
stacktrace

$uploaddir = $_SERVER['']

set cursor in '', CTRL + SPACE, select 'DOCUMENT_ROOT', ENTER
Comment 8 Exceptions Reporter 2011-12-02 09:03:41 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=181317
Comment 9 Svata Dedic 2012-04-16 14:10:55 UTC
Caused by these calls (IMHO):

        at org.netbeans.lib.lexer.token.DefaultToken.toString(DefaultToken.java:224)
        at org.netbeans.modules.php.editor.indent.FormatVisitor.addFormatToken(FormatVisitor.java:1303)
        at org.netbeans.modules.php.editor.indent.FormatVisitor.visit(FormatVisitor.java:1023)


If I was wrong then please reassign back + better explain where the CSL infrastructure failure is - thanks.
Comment 10 Ondrej Brejla 2012-04-16 14:30:02 UTC
Vlado, can you still reproduce it? I tried you use case and it work properly for me.
Comment 11 Vladimir Riha 2012-04-17 06:16:27 UTC
Nope, all cases describes in comments are working w/o problem