Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 198704 - StringIndexOutOfBoundException during complete
Summary: StringIndexOutOfBoundException during complete
Status: RESOLVED FIXED
Alias: None
Product: DLTK
Classification: Technology
Component: Ruby (show other bugs)
Version: 0.9   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mikhail Kalugin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-02 12:16 EDT by Dmitriy Kovalev CLA
Modified: 2010-06-11 07:31 EDT (History)
1 user (show)

See Also:


Attachments
Patch with test for this bug (2.14 KB, patch)
2007-08-03 02:05 EDT, Nikolay Kurtov CLA
no flags Details | Diff
Another patch with the same test (1.58 KB, patch)
2007-08-03 02:23 EDT, Nikolay Kurtov CLA
alex.panchenko: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitriy Kovalev CLA 2007-08-02 12:16:44 EDT
1. Create the simple code:
--1.<CURSOR>

2. Press ctrl-space, the result: 

java.lang.StringIndexOutOfBoundsException: String index out of range: -3
at java.lang.String.substring(String.java:1768)
at org.eclipse.dltk.ruby.internal.core.codeassist.RubyCompletionEngine.completeCall(RubyCompletionEngine.java:694)
at org.eclipse.dltk.ruby.internal.core.codeassist.RubyCompletionEngine.complete(RubyCompletionEngine.java:286)
at org.eclipse.dltk.internal.core.Openable.codeComplete(Openable.java:492)
at org.eclipse.dltk.internal.core.SourceModule.codeComplete(SourceModule.java:702)
at org.eclipse.dltk.internal.core.SourceModule.codeComplete(SourceModule.java:698)
at org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer.computeScriptCompletionProposals(ScriptCompletionProposalComputer.java:182)
at org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer.computeCompletionProposals(ScriptCompletionProposalComputer.java:234)
at org.eclipse.dltk.ui.text.completion.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:330)
at org.eclipse.dltk.ui.text.completion.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:266)
at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:266)
at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:225)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1759)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:478)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:475)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:410)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:404)
at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:354)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 1 Nikolay Kurtov CLA 2007-08-03 02:05:32 EDT
Created attachment 75297 [details]
Patch with test for this bug

Test for this bug added
Comment 2 Nikolay Kurtov CLA 2007-08-03 02:23:57 EDT
Created attachment 75298 [details]
Another patch with the same test

Patch with test for this bug
Comment 3 Dmitriy Kovalev CLA 2007-08-03 02:31:15 EDT
Patch applied.
Comment 4 Andrei Sobolev CLA 2008-05-16 03:50:16 EDT
Seems fixed.