java.lang.ArrayIndexOutOfBoundsException in TextPage

<oXygen/> general issues.
SSC
Posts: 206
Location: Hamburg, Germany

java.lang.ArrayIndexOutOfBoundsException in TextPage

Fri Nov 30, 2012 7:39 pm

Hello,

we are using the Eclipe version of the oXygen Author 14.1.

When I use the Text View/Page in the XML Editor and do a right-click with the mouse on the left side where the line numbers and marker are the following Exception is thrown:

Code: Select all

java.lang.ArrayIndexOutOfBoundsException: -2
at java.util.ArrayList.get(ArrayList.java:324)
at ro.sync.outline.e.j(Unknown Source)
at ro.sync.document.fold.d.c(Unknown Source)
at com.oxygenxml.editor.editors.e.e.addFoldingStuff(Unknown Source)
at com.oxygenxml.editor.editors.e.e.rulerContextMenuIsAboutToShow(Unknown Source)
at com.oxygenxml.editor.editors.wb.rulerContextMenuIsAboutToShow(Unknown Source)
at com.oxygenxml.editor.editors.e.e.rulerContextMenuAboutToShow(Unknown Source)
at org.eclipse.ui.texteditor.AbstractTextEditor$13.menuAboutToShow(AbstractTextEditor.java:2870)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor$1.menuAboutToShow(AbstractDecoratedTextEditor.java:495)
at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:338)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:469)
at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:491)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:241)
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_INITMENUPOPUP(Control.java:4487)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4190)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2038)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256)
at org.eclipse.swt.widgets.Display.runPopups(Display.java:4107)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651)
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 com.teamcenter.rac.contmgmt.client.DcApplication.start(DcApplication.java:216)
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:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
When I turn on line numbers for the text page and do the right-click on a number a popUpMenu appears, but below those numbers the Exception above is thrown.

Could you please investigate on this error?

Best regards,

Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
Costin
Posts: 505

Re: java.lang.ArrayIndexOutOfBoundsException in TextPage

Fri Nov 30, 2012 11:28 pm

Hello,

Could you please tell if you encounter this issue for any file, or is there any specific one ?

Could you please open the "personal.xml" file from our sample project, try to reproduce the situation and see if the same exception is thrown ?

In case you receive this only for specific files, in order to investigate, please send us a sample file for which the issue is reproducible. You could send the file on our support email address support AT oxygenxml DOT com

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
SSC
Posts: 206
Location: Hamburg, Germany

Re: java.lang.ArrayIndexOutOfBoundsException in TextPage

Mon Dec 03, 2012 12:53 pm

Hello Costin,

Where do I exactly find the "personal.xml" file you mentioned?
I cannot find it in your samples.

Thanks in advance.

Best regards,

Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
Radu
Posts: 6050

Re: java.lang.ArrayIndexOutOfBoundsException in TextPage

Mon Dec 03, 2012 1:48 pm

Hi Simon,

Costin's question was more about what steps could be made by us in order to reproduce the problem on our side.
The Oxygen standalone version comes with a "samples" folder in which there are sample XML files like "personal.xml".
When our plugin is contributed to an Eclipse workspace, it also contributes a wizard for creating a sample XML project with the same content.

Does this happen with any opened XML file? On any fold on which you right click?

Basically when right clicking a fold we use this method:

Code: Select all

org.eclipse.ui.editors.text.TextEditor.getVerticalRuler().getLineOfLastMouseButtonActivity()
which in your case returns -1 and breaks some code of ours later on.
We can guard the issue on our side but the fold actions would not be properly presented and I'm not sure why the method getLineOfLastMouseButtonActivity() does not work correctly in your case.
We cannot yet reproduce the issue on our side.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
SSC
Posts: 206
Location: Hamburg, Germany

Re: java.lang.ArrayIndexOutOfBoundsException in TextPage

Mon Dec 03, 2012 4:51 pm

Hello Radu,
Costin's question was more about what steps could be made by us in order to reproduce the problem on our side.
I just opened a XML document
Does this happen with any opened XML file?
Yes, it occurs with any XML file.
On any fold on which you right click?
Image

By right-clicking on the green area everything is just fine.
But on the red area, where no text/XML content is beside the left bar the ArrayIndexOutOfBoundsException is thrown.

Does this information help or do you need any further information?

Best regards,

Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
Radu
Posts: 6050

Re: java.lang.ArrayIndexOutOfBoundsException in TextPage

Mon Dec 03, 2012 5:09 pm

Hi Simon,

Perfect. We'll fix for Oxygen 14.2.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 6050

Re: java.lang.ArrayIndexOutOfBoundsException in TextPage

Thu Feb 14, 2013 3:14 pm

Hi Simon,

Oxygen 14.2 was just released and should contain a fix for this as well.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest