| Summary: | ArrayIndexOutOfBoundsException | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Prabhakar Mising name <prabhakar.csengg> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eclipse.felipe, ericwill, prakash | ||||
| Version: | 4.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 182093 [details]
exception-file
The above attachment contains copy of exception thrown by eclipse
when this below code is pasted in .js file.
function settings_dontallowSpacesForLogin(){
$('input').keypress(function( e ) {
if(!/[0-9a-zA-Z-]/.test(String.fromCharCode(e.which)))
return false;
});​
}
Prabhakar,
Where are you pasting it? In the Package Explorer or in any of the editors?
From the stack trace, it seems to be an SWT bug. Moving to SWT for investigation.
vxoom@polar:~/work/projects/erp$ nice /usr/local/pkg/eclipse-3.6/eclipse &
[1] 3388
vxoom@polar:~/work/projects/erp$
(eclipse:3388): GLib-WARNING **: g_set_prgname() called multiple times
java.lang.ArrayIndexOutOfBoundsException: 1
at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:169)
at org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:1157)
at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:980)
at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:719)
at org.eclipse.swt.custom.StyledTextRenderer.drawLine(StyledTextRenderer.java:364)
at org.eclipse.swt.custom.StyledText.handlePaint(StyledText.java:6097)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5661)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
at org.eclipse.swt.widgets.Control.gtk_expose_event(Control.java:2783)
at org.eclipse.swt.widgets.Composite.gtk_expose_event(Composite.java:701)
at org.eclipse.swt.widgets.Canvas.gtk_expose_event(Canvas.java:167)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1739)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4796)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4360)
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:8168)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1238)
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:2229)
at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:1997)
at org.eclipse.swt.widgets.Shell.open(Shell.java:1410)
at org.eclipse.jface.window.Window.open(Window.java:797)
at org.eclipse.ui.internal.statushandlers.InternalDialog.open(InternalDialog.java:327)
at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:270)
at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:197)
at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:156)
at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:101)
at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.handle(WorkbenchErrorHandler.java:57)
at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handle(IDEWorkbenchErrorHandler.java:108)
at org.eclipse.ui.internal.WorkbenchErrorHandlerProxy.handle(WorkbenchErrorHandlerProxy.java:36)
at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:189)
at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:231)
at org.eclipse.ui.internal.misc.StatusUtil.handleStatus(StatusUtil.java:231)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.logException(WorkbenchKeyboard.java:711)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:789)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1524)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1257)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294)
at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:730)
at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2841)
at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4796)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4360)
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:8168)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1238)
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:2229)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)
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)
Duplicate of 308329 ? What version of SWT do you have ? I cannot reproduce this issue. |
Build Identifier: 20100917-0705 create a .js file and paste code below,eclipse gets hanged. function settings_dontallowSpacesForLogin(){ $('input').keypress(function( e ) { if(!/[0-9a-zA-Z-]/.test(String.fromCharCode(e.which))) return false; });​ } Reproducible: Always Steps to Reproduce: 1.paste the above code in a js file 2. 3.