Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 208018

Summary: [misc] SIOOBE switching perspective with the Javadoc view (non-Browser) open
Product: [Eclipse Project] JDT Reporter: Michael Rennie <Michael_Rennie>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, martinae, Michael_Rennie
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Michael Rennie CLA 2007-10-30 11:10:54 EDT
I20071030-0010

I was sync'ing my workspace (in the synchronize perspective) and while waiting I tried to change back to the Java perspective. I had the javadoc view open (not the active view) and it was showing doc from a class. During the switch I got the following error:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.eclipse.jface.internal.text.link.contentassist.LineBreakingReader.findNextBreakOffset(LineBreakingReader.java:111)
at org.eclipse.jface.internal.text.link.contentassist.LineBreakingReader.readLine(LineBreakingReader.java:78)
at org.eclipse.jface.internal.text.html.HTMLTextPresenter.updatePresentation(HTMLTextPresenter.java:127)
at org.eclipse.jdt.internal.ui.infoviews.JavadocView.setInput(JavadocView.java:537)
at org.eclipse.jdt.internal.ui.infoviews.JavadocView$2.controlResized(JavadocView.java:322)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:221)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1105)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1129)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1110)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:819)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1230)
at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:315)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:683)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:198)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1414)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1233)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:683)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:198)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1414)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1233)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:655)
at org.eclipse.ui.internal.LayoutPart.setBounds(LayoutPart.java:300)
at org.eclipse.ui.internal.presentations.PresentablePart.enableInputs(PresentablePart.java:387)
at org.eclipse.ui.internal.PartStack.setActive(PartStack.java:628)
at org.eclipse.ui.internal.PartSashContainer.setActive(PartSashContainer.java:490)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:271)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:931)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3461)
at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:988)
at org.eclipse.ui.internal.WorkbenchPage.access$17(WorkbenchPage.java:972)
at org.eclipse.ui.internal.WorkbenchPage$18.run(WorkbenchPage.java:3560)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3558)
at org.eclipse.ui.internal.PerspectiveBarContributionItem.select(PerspectiveBarContributionItem.java:123)
at org.eclipse.ui.internal.PerspectiveBarContributionItem$1.widgetSelected(PerspectiveBarContributionItem.java:92)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1105)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3335)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2982)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2395)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2359)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2225)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:468)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:463)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
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:515)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455)
at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
Comment 1 Dani Megert CLA 2007-10-30 12:08:17 EDT
Am I right that the Browser widget isn't installed/working? It looks like the fall back code is running here.

Can you reproduce?
Comment 2 Michael Rennie CLA 2007-10-30 12:46:32 EDT
The browser widget was not working (but is now). And I have not been able to reproduce. Maybe the fall-back code could handle it more gracefully?

Comment 3 Dani Megert CLA 2007-10-30 12:55:10 EDT
>Maybe the fall-back code could handle it more gracefully?
Well, it should of course. I suspect some speciality with the source it wanted to show. We would need a test case to do something here.
Comment 4 Michael Rennie CLA 2007-10-30 14:05:44 EDT
this is the class and javadoc header it was showing at the time the error occurred:


/**
 * This preference page allows {@link IApiProfile}s to be created/removed/edited
 * @since 1.0.0
 */
public class ApiProfilesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

...
<snip>
...
}

The ApiProfilesPreferencePage class is in the org.eclipse.pde.api.tools.ui (manifest_tooling branch) pde-incubator project.
Comment 5 Michael Rennie CLA 2007-10-30 15:59:29 EDT
just got the error again, with my browser working correctly, and the javadoc view not the the focus view. Immediately after I was hit with an out of memory error, maybe one has an effect on the other?

Comment 6 Dani Megert CLA 2007-10-31 03:42:03 EDT
>just got the error again, w
That's not possible. If the Browser is now working then it cannot be the same code path. Must be a slightly different path.

Can you provide reproducible steps?
Comment 7 Michael Rennie CLA 2007-10-31 15:27:09 EDT
I have no concrete steps, it seems to occur intermittently. I have not seen it at all today.
Comment 8 Dani Megert CLA 2008-05-16 02:12:54 EDT
Sorry, nothing I can do without steps.
Comment 9 Dani Megert CLA 2013-02-14 07:12:31 EST
.

*** This bug has been marked as a duplicate of bug 400693 ***