Bug 91780 - NegativeArraySizeException in code completion when non-Latin-1 string definition present in file
Summary: NegativeArraySizeException in code completion when non-Latin-1 string definit...
Status: RESOLVED DUPLICATE of bug 90414
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 91868 92168 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-18 15:39 EDT by Dimitris Kogias CLA
Modified: 2005-04-21 03:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitris Kogias CLA 2005-04-18 15:39:34 EDT
If the java file I'm editing contains this declaration:

private static final String toDecode =
"\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf";

then any attempt to ctrl-space code-complete results in an error and this in the
log:

!SESSION 2005-04-18 12:32:47.581
-----------------------------------------------eclipse.buildId=I20050401-1645
java.version=1.5.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86

!ENTRY org.eclipse.ui 4 4 2005-04-18 12:32:47.582
!MESSAGE The command for the key you pressed failed

!ENTRY org.eclipse.ui 4 0 2005-04-18 12:32:47.583
!MESSAGE The command for the key you pressed failed
!STACK 0
java.lang.NegativeArraySizeException
        at
org.eclipse.jdt.internal.compiler.parser.Scanner.getCurrentTokenSourceString(Scanner.java:501)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.consumeToken(Parser.java:6793)
        at
org.eclipse.jdt.internal.codeassist.impl.AssistParser.consumeToken(AssistParser.java:666)
        at
org.eclipse.jdt.internal.codeassist.complete.CompletionParser.consumeToken(CompletionParser.java:2235)
        at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8377)
        at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8560)
        at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8525)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7343)
        at
org.eclipse.jdt.internal.codeassist.complete.CompletionParser.dietParse(CompletionParser.java:2905)
        at
org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:1057)
        at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:119)
        at
org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:300)
        at
org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:293)
        at
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCompletionProposals(JavaCompletionProcessor.java:335)
        at
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletionProposals(JavaCompletionProcessor.java:313)
        at
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1470)
        at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:250)
        at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7(CompletionProposalPopup.java:247)
        at
org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:206)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
       at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:201)
        at
org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1319)
        at
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:183)
        at
org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
       at
org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
        at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:182)
       at
org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:108)
        at org.eclipse.core.commands.Command.execute(Command.java:331)
        at
org.eclipse.core.commands.ParameterizedCommand.execute(ParameterizedCommand.java:396)
        at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:452)
        at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:741)
        at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:784)
        at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:543)
        at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:486)
        at
org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:110)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
        at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1125)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1048)
        at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:612)
        at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:1960)
        at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:555)
        at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1348)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338)
        at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
        at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:4703)
        at org.eclipse.swt.widgets.Display.eventProc(Display.java:942)
        at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
        at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1129)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2470)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
        at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156)
        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.core.launcher.Main.invokeFramework(Main.java:315)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
        at org.eclipse.core.launcher.Main.run(Main.java:942)
        at org.eclipse.core.launcher.Main.main(Main.java:926)
Comment 1 David Audel CLA 2005-04-19 06:39:01 EDT

*** This bug has been marked as a duplicate of 90414 ***
Comment 2 Frederic Fusier CLA 2005-04-19 09:20:36 EDT
*** Bug 91868 has been marked as a duplicate of this bug. ***
Comment 3 Frederic Fusier CLA 2005-04-21 03:55:52 EDT
*** Bug 92168 has been marked as a duplicate of this bug. ***