Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

MatchingCharacterPainter causes IllegalArgumentException: Index out of bounds #3067

Open
rytina opened this issue Apr 20, 2020 · 0 comments
Open

Comments

@rytina
Copy link

rytina commented Apr 20, 2020

Import any example which contains parentheses within a state (i.e. com.yakindu.sct.examples.scxml/model/example.sct), select any state with a parentheses then go to the properties page and click within the parentheses . When the focus is then changed to a different state the follwoing IllegalArgumentException occurs in the error log (see also the video which demos it):

!ENTRY org.eclipse.ui 4 0 2020-04-20 18:07:40.139
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalArgumentException: Index out of bounds
at org.eclipse.swt.SWT.error(SWT.java:4704)
at org.eclipse.swt.SWT.error(SWT.java:4638)
at org.eclipse.swt.SWT.error(SWT.java:4609)
at org.eclipse.swt.custom.StyledText.getTextBounds(StyledText.java:5260)
at org.eclipse.jface.text.source.MatchingCharacterPainter.draw(MatchingCharacterPainter.java:254)
at org.eclipse.jface.text.source.MatchingCharacterPainter.handleDrawRequest(MatchingCharacterPainter.java:238)
at org.eclipse.jface.text.source.MatchingCharacterPainter.paintControl(MatchingCharacterPainter.java:185)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4105)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1525)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4775)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:335)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4757)
at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method)
at org.eclipse.swt.widgets.Canvas.scrollInPixels(Canvas.java:216)
at org.eclipse.swt.widgets.Canvas.scroll(Canvas.java:203)
at org.eclipse.swt.custom.StyledText.scroll(StyledText.java:8131)
at org.eclipse.swt.custom.StyledText.scrollText(StyledText.java:8242)
at org.eclipse.swt.custom.StyledText.handleTextChanging(StyledText.java:6432)
at org.eclipse.swt.custom.StyledText$5.textChanging(StyledText.java:5769)
at org.eclipse.jface.text.DefaultDocumentAdapter.fireTextChanging(DefaultDocumentAdapter.java:360)
at org.eclipse.jface.text.DefaultDocumentAdapter.documentAboutToBeChanged(DefaultDocumentAdapter.java:277)
at org.eclipse.jface.text.AbstractDocument.fireDocumentAboutToBeChanged(AbstractDocument.java:636)
at org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1136)
at org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1128)
at org.eclipse.jface.text.DefaultDocumentAdapter.setText(DefaultDocumentAdapter.java:231)
at org.eclipse.swt.custom.StyledText.setText(StyledText.java:10568)
at org.eclipse.jface.internal.databinding.swt.StyledTextTextProperty.doSetStringValue(StyledTextTextProperty.java:72)
at org.eclipse.jface.internal.databinding.swt.StyledTextTextProperty.doSetStringValue(StyledTextTextProperty.java:1)
at org.eclipse.jface.internal.databinding.swt.WidgetStringValueProperty.doSetValue(WidgetStringValueProperty.java:55)
at org.eclipse.jface.internal.databinding.swt.WidgetStringValueProperty.doSetValue(WidgetStringValueProperty.java:1)
at org.eclipse.core.databinding.property.value.ValueProperty.setValue(ValueProperty.java:93)
at org.eclipse.core.internal.databinding.property.value.SimplePropertyObservableValue.doSetValue(SimplePropertyObservableValue.java:104)
at org.eclipse.core.databinding.observable.value.AbstractObservableValue.setValue(AbstractObservableValue.java:70)
at org.eclipse.core.databinding.observable.value.DecoratingObservableValue.setValue(DecoratingObservableValue.java:117)
at org.eclipse.core.databinding.observable.value.DecoratingVetoableValue.setValue(DecoratingVetoableValue.java:48)
at org.eclipse.core.databinding.UpdateValueStrategy.doSet(UpdateValueStrategy.java:477)
at org.yakindu.sct.ui.editor.propertysheets.StatePropertySection$1.doSet(StatePropertySection.java:147)
at org.eclipse.core.databinding.ValueBinding.lambda$1(ValueBinding.java:209)
at org.eclipse.core.databinding.Binding.lambda$3(Binding.java:194)
at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:155)
at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:173)
at org.eclipse.core.databinding.Binding.execAfterDisposalCheck(Binding.java:192)
at org.eclipse.core.databinding.ValueBinding.lambda$0(ValueBinding.java:202)
at org.eclipse.core.databinding.Binding.lambda$3(Binding.java:194)
at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:155)
at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:173)
at org.eclipse.core.databinding.Binding.execAfterDisposalCheck(Binding.java:192)
at org.eclipse.core.databinding.ValueBinding.doUpdate(ValueBinding.java:166)
at org.eclipse.core.databinding.ValueBinding.updateModelToTarget(ValueBinding.java:127)
at org.eclipse.core.databinding.ValueBinding.postInit(ValueBinding.java:92)
at org.eclipse.core.databinding.Binding.init(Binding.java:80)
at org.eclipse.core.databinding.DataBindingContext.bindValue(DataBindingContext.java:165)
at org.yakindu.sct.ui.editor.propertysheets.StatePropertySection.bindSpecificationControl(StatePropertySection.java:140)
at org.yakindu.sct.ui.editor.propertysheets.StatePropertySection.bindModel(StatePropertySection.java:123)
at org.yakindu.sct.ui.editor.propertysheets.AbstractEditorPropertySection.inputChanged(AbstractEditorPropertySection.java:104)
at org.yakindu.sct.ui.editor.propertysheets.StatePropertySection.inputChanged(StatePropertySection.java:105)
at org.yakindu.sct.ui.editor.propertysheets.AbstractEditorPropertySection.setEObject(AbstractEditorPropertySection.java:96)
at org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection.setInput(AbstractModelerPropertySection.java:167)
at org.eclipse.ui.views.properties.tabbed.TabContents$5.run(TabContents.java:184)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.ui.views.properties.tabbed.TabContents.setInput(TabContents.java:187)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:221)
at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2129)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1175)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1204)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:237)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4105)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:760)
at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList.select(TabbedPropertyList.java:842)
at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyViewer.setSelectionToWidget(TabbedPropertyViewer.java:134)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1701)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1657)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:376)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:744)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:555)
at org.eclipse.gmf.runtime.diagram.ui.properties.views.PropertiesBrowserPage.selectionChanged(PropertiesBrowserPage.java:253)
at org.eclipse.ui.views.properties.PropertySheet.showSelectionAndDescription(PropertySheet.java:564)
at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:544)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:240)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.handlePostSelectionChanged(SelectionService.java:119)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.lambda$2(SelectionService.java:74)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$3.run(SelectionAggregator.java:163)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyPostListeners(SelectionAggregator.java:160)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$7(SelectionAggregator.java:158)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$6.lambda$0(SelectionAggregator.java:250)
at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:59)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$6.changed(SelectionAggregator.java:250)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:108)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:364)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:379)
at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setPostSelection(SelectionServiceImpl.java:39)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.lambda$2(CompatibilityPart.java:128)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:256)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:234)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3897)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3527)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant