[jbosstools-issues] [JBoss JIRA] (JBIDE-12070) CLONE - ArrayIndexOutOfBoundsException when opening a DSL Rule editor

stevearoonie (JIRA) jira-events at lists.jboss.org
Thu May 31 22:12:18 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-12070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697818#comment-12697818 ] 

stevearoonie commented on JBIDE-12070:
--------------------------------------

I am also seeing this with Drools 5.4.0.CR1, Mac OS/X, Indigo, 64-bit:

java.lang.ArrayIndexOutOfBoundsException: 1
	at org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:230)
	at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6148)
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5641)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1461)
	at org.eclipse.swt.widgets.Control.resized(Control.java:3261)
	at org.eclipse.swt.widgets.Composite.resized(Composite.java:930)
	at org.eclipse.swt.widgets.Control.setFrameSize(Control.java:3793)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5463)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSView.setFrameSize(NSView.java:275)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:3536)
	at org.eclipse.swt.widgets.Control.setSize(Control.java:4051)
	at org.eclipse.jface.text.source.SourceViewer$RulerLayout.getVerticalScrollArrowHeights(SourceViewer.java:202)
	at org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:159)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1194)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:703)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:661)
	at org.eclipse.jface.text.source.CompositeRuler.layoutTextViewer(CompositeRuler.java:611)
	at org.eclipse.jface.text.source.CompositeRuler.addDecorator(CompositeRuler.java:565)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.addVerticalRulerColumn(ProjectionViewer.java:1290)
	at org.eclipse.jface.text.source.projection.ProjectionSupport.doEnableProjection(ProjectionSupport.java:310)
	at org.eclipse.jface.text.source.projection.ProjectionSupport$ProjectionListener.projectionEnabled(ProjectionSupport.java:143)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1442)
	at org.drools.eclipse.editors.AbstractRuleEditor.createPartControl(AbstractRuleEditor.java:84)
	at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:241)
	at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:325)
	at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:211)
	at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:308)
	at org.drools.eclipse.dsl.editor.DSLRuleEditor2.addPages(DSLRuleEditor2.java:64)
	at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

                
> CLONE - ArrayIndexOutOfBoundsException when opening a DSL Rule editor
> ---------------------------------------------------------------------
>
>                 Key: JBIDE-12070
>                 URL: https://issues.jboss.org/browse/JBIDE-12070
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: drools
>         Environment: - Windows XP
> - Eclipse Helios build 20100617-1415, SWT version 3.650
> - JBoss Drools Core build 5.1.0.v20100728-2128-H133-M2
>            Reporter: David Goldstein
>            Assignee: Kris Verlaenen
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> Stack trace snippet: 
> java.lang.ArrayIndexOutOfBoundsException: 1
>      at org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:230)
>      at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6165)
>      at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5658)
>      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
>      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
>      at org.eclipse.swt.widgets.Control.WM_SIZE(Control.java:4813)
>      at org.eclipse.swt.widgets.Scrollable.WM_SIZE(Scrollable.java:291)
>      at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1653)
>      at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:454)
>      at org.eclipse.swt.widgets.Control.windowProc(Control.java:4234)
>      at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
>      at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
>      at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
>      at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2454)
>      at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
>      at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4970)
>      at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:460)
>      at org.eclipse.swt.widgets.Control.windowProc(Control.java:4244)
>      at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
>      at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
>      at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
>      at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1456)
>      at org.eclipse.swt.widgets.Control.forceResize(Control.java:1018)
>      at org.eclipse.swt.widgets.ScrollBar.getThumbTrackBounds(ScrollBar.java:464)
>      at org.eclipse.jface.text.source.SourceViewer$RulerLayout.computeScrollArrowHeights(SourceViewer.java:217)
>      at org.eclipse.jface.text.source.SourceViewer$RulerLayout.getVerticalScrollArrowHeights(SourceViewer.java:196)
>      at org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:155)
>      at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1275)
>      at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1261)
>      at org.eclipse.swt.widgets.Composite.layout(Composite.java:664)
>      at org.eclipse.swt.widgets.Composite.layout(Composite.java:622)
>      at org.eclipse.jface.text.source.CompositeRuler.layoutTextViewer(CompositeRuler.java:611)
>      at org.eclipse.jface.text.source.CompositeRuler.addDecorator(CompositeRuler.java:565)
>      at org.eclipse.jface.text.source.projection.ProjectionViewer.addVerticalRulerColumn(ProjectionViewer.java:1289)
>      at org.eclipse.jface.text.source.projection.ProjectionSupport.doEnableProjection(ProjectionSupport.java:310)
>      at org.eclipse.jface.text.source.projection.ProjectionSupport$ProjectionListener.projectionEnabled(ProjectionSupport.java:143)
>      at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
>      at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
>      at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1441)
>      at org.drools.eclipse.editors.AbstractRuleEditor.createPartControl(Unknown Source)
>      at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:241)
>      at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:325)
>      at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:211)
>      at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:308)
>      at org.drools.eclipse.dsl.editor.DSLRuleEditor2.addPages(Unknown Source)
>      at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
>      at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348) 
> The issue seems to be platform-dependent, as I'm not getting any exceptions in a gtk.linux.x86 build. 
> Some debugging revealed that StyledTextRenderer's internal data structures assume a different number of lines present than what content.getLineCount() returns in calculateClientArea(); these two values are usually kept in sync with the use of TextChangeListeners. I think that because of TransformedDocument's lazy update mechanism, new state can be returned to the renderer without firing a corresponding text change event first.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list