Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327093 - [exceptions] java.lang.IllegalArgumentException: Argument not valid in StyledText:4900
Summary: [exceptions] java.lang.IllegalArgumentException: Argument not valid in Styled...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2.5   Edit
Assignee: Lalit Somavarapha CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: Still happens in 3.3.M5, exception is...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 08:03 EDT by Jacek Pospychala CLA
Modified: 2011-07-14 01:58 EDT (History)
1 user (show)

See Also:
thatnitind: review+


Attachments
patch (1.61 KB, patch)
2011-06-21 11:25 EDT, Lalit Somavarapha CLA
no flags Details | Diff
patch (1.01 KB, patch)
2011-06-24 10:52 EDT, Lalit Somavarapha CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Pospychala CLA 2010-10-06 08:03:36 EDT
Build: 3.2.2
Steps.
1. start with empty js file, open it in JavaScriptEditor
2. press Ctrl+Space to get content-assist. (there's lots of proposals by default)
3. while Content-Assist dropdown is visible, type "Doc"
4. press Ctrl+Space again to roll over to templates proposals

Exception is thrown and logged:

java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:4064)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.SWT.error(SWT.java:3969)
	at org.eclipse.swt.custom.StyledText.getStyleRangeAtOffset(StyledText.java:4900)
	at org.eclipse.wst.jsdt.internal.ui.text.java.AbstractJavaCompletionProposal.updateStyle(AbstractJavaCompletionProposal.java:888)
	at org.eclipse.wst.jsdt.internal.ui.text.java.AbstractJavaCompletionProposal.selected(AbstractJavaCompletionProposal.java:912)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.selectProposal(CompletionProposalPopup.java:1350)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$9(CompletionProposalPopup.java:1337)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$ProposalSelectionListener.keyPressed(CompletionProposalPopup.java:247)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:161)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1404)
	at org.eclipse.swt.widgets.Control.flagsChanged(Control.java:1274)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4982)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1943)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2025)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5040)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4582)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4659)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:115)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3274)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Lalit Somavarapha CLA 2011-06-21 11:25:28 EDT
Created attachment 198343 [details]
patch
Comment 2 Chris Jaun CLA 2011-06-23 16:15:56 EDT
Thanks for the patch, Lalit.

Can you update it to only include your new changes?

It is not necessary to include an old version of the function commented out.
Comment 3 Lalit Somavarapha CLA 2011-06-24 10:52:23 EDT
Created attachment 198544 [details]
patch
Comment 4 Chris Jaun CLA 2011-06-24 10:55:56 EDT
Thanks.
Comment 5 Nitin Dahyabhai CLA 2011-07-14 01:58:10 EDT
Committed.