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 186086 - StringIndexOutOfBoundsException: String index out of range: 0
Summary: StringIndexOutOfBoundsException: String index out of range: 0
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal with 1 vote (vote)
Assignee: Erno Mononen
URL:
Keywords:
: 186212 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-13 11:46 UTC by zolta
Modified: 2010-05-19 06:16 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 169437


Attachments
stacktrace (5.76 KB, text/plain)
2010-05-13 11:46 UTC, zolta
Details
stacktrace (5.76 KB, text/plain)
2010-05-13 12:46 UTC, dlipin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zolta 2010-05-13 11:46:32 UTC
Build: NetBeans IDE Dev (Build 201005122200)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
zolta: opened a ruby document generated by New Ruby App wizard
refreshing indices is still runing

tkrd_oiax: add # at the end of line.

zolta: editing .rb file after installing Ruby support from update center seems to be reproducible

zolta: editing .rb file after installing Ruby support from update center seems to be reproducible

zolta: editing .rb file in Ruby project

zolta: editing .rb file after installing Ruby support from update center seems to be reproducible




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
   at java.lang.String.charAt(String.java:686)
   at org.netbeans.modules.ruby.lexer.RubyCommentLexer.nextToken(RubyCommentLexer.java:530)
   at org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:190)
   at org.netbeans.lib.lexer.EmbeddedTokenList.initAllTokens(EmbeddedTokenList.java:155)
   at org.netbeans.lib.lexer.EmbeddingContainer.embeddedTokenList(EmbeddingContainer.java:204)
   at org.netbeans.api.lexer.TokenSequence.embeddedImpl(TokenSequence.java:355)
Comment 1 zolta 2010-05-13 11:46:35 UTC
Created attachment 98929 [details]
stacktrace
Comment 2 dlipin 2010-05-13 12:46:30 UTC
Created attachment 98941 [details]
stacktrace

Created default Ruby Application.
Comment 3 dlipin 2010-05-13 12:57:48 UTC
->P1 as it is always reproducible, highly visible: every user creating default Ruby Application will run into this issue.

Steps to reproduce are simple and straightforward : File->New Project, choose Ruby Application, click Next, click Finish, and the SIOBE occurs.
Comment 4 Erno Mononen 2010-05-13 18:39:54 UTC
Thanks for the report, I will look into this ASAP.
Comment 5 Erno Mononen 2010-05-13 19:35:26 UTC
Fixed in 6f68cb6f7027. This was caused by the fix for #141619, happened when there are empty or no todo markers.
Comment 6 Erno Mononen 2010-05-17 08:05:33 UTC
*** Bug 186212 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2010-05-17 15:29:03 UTC
Integrated into 'main-golden', will be available in build *201005170932* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log:
Comment 8 Quality Engineering 2010-05-19 06:16:35 UTC
Integrated into 'main-golden', will be available in build *201005182201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log: