Project: SWT
Bug 177210 Stack overflow in StyledTextRenderer
Reported: 2007-03-13 16:55:42 | Status: resolved fixed

change the Java Editor Font to 11pt Segoe UI font and Eclipse crashes with a stack overflow Here's the stack: java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1158) at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:105) at org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:667) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:868) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4739) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6620) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:902) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:675) at org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:202) at org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:220) at org.eclipse.swt.custom.StyledText.resetCache(StyledText.java:6314) at org.eclipse.swt.custom.StyledText.setFont(StyledText.java:6831) at org.eclipse.ui.texteditor.AbstractTextEditor.setFont(AbstractTextEditor.java:3302) at org.eclipse.ui.texteditor.AbstractTextEditor.initializeViewerFont(AbstractTextEditor.java:3269) at org.eclipse.ui.texteditor.AbstractTextEditor.access$1(AbstractTextEditor.java:3247) at org.eclipse.ui.texteditor.AbstractTextEditor$FontPropertyChangeListener.propertyChange(AbstractTextEditor.java:652) at org.eclipse.jface.resource.ResourceRegistry.fireMappingChanged(ResourceRegistry.java:70) at org.eclipse.jface.resource.FontRegistry.put(FontRegistry.java:767) at org.eclipse.jface.resource.FontRegistry.put(FontRegistry.java:735) at org.eclipse.ui.internal.themes.WorkbenchThemeManager$1.propertyChange(WorkbenchThemeManager.java:62) at org.eclipse.ui.internal.themes.Theme.firePropertyChange(Theme.java:293) at org.eclipse.ui.internal.themes.Theme.access$2(Theme.java:290) at org.eclipse.ui.internal.themes.Theme$2.propertyChange(Theme.java:230) at org.eclipse.jface.resource.ResourceRegistry.fireMappingChanged(ResourceRegistry.java:70) at org.eclipse.jface.resource.FontRegistry.put(FontRegistry.java:767) at org.eclipse.jface.resource.FontRegistry.put(FontRegistry.java:735) at org.eclipse.ui.internal.themes.Theme$1.propertyChange(Theme.java:157) at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:371) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:368) at org.eclipse.ui.preferences.ScopedPreferenceStore$2.preferenceChange(ScopedPreferenceStore.java:192) at org.eclipse.core.internal.preferences.EclipsePreferences$2.run(EclipsePreferences.java:746) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:749) at org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:762) at org.eclipse.ui.preferences.ScopedPreferenceStore.setValue(ScopedPreferenceStore.java:782) at org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage.performFontOk(ColorsAndFontsPreferencePage.java:1534) at org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage.performOk(ColorsAndFontsPreferencePage.java:1549) at org.eclipse.jface.preference.PreferencePage.performApply(PreferencePage.java:431) at org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage.performApply(ColorsAndFontsPreferencePage.java:1420) at org.eclipse.jface.preference.PreferencePage$2.widgetSelected(PreferencePage.java:282) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:215) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1004) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2414) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2165) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1004) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2414) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2306) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2270) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2145) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:460) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:455) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) 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:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124) at org.eclipse.equinox.launcher.Main.main(Main.java:1099)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java