Bug 572517 - Long UI freeze on Word Wrap in a console with millions of lines
Summary: Long UI freeze on Word Wrap in a console with millions of lines
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.15   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-01 04:57 EDT by Simeon Andreev CLA
Modified: 2021-04-19 14:52 EDT (History)
2 users (show)

See Also:


Attachments
Exported YourKit snapshot of some minutes of the freeze (the freeze is still on-going). (8.82 KB, application/zip)
2021-04-01 04:57 EDT, Simeon Andreev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2021-04-01 04:57:16 EDT
Created attachment 286017 [details]
Exported YourKit snapshot of some minutes of the freeze (the freeze is still on-going).

I have console output from a test that ran for over a day and a half, the output has millions of lines (the log from all the test runs). I intended to save the output to the file, but missclicked the Word Wrap button. Eclipse froze for about 20 minutes.

Stack trace from 4.15:

"main" #1 prio=6 os_prio=0 cpu=6265599.87ms elapsed=91663.53s tid=0x00007ffff0018000 nid=0x50c1 runnable  [0x00007ffff7fca000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.gtk.OS.pango_layout_set_tabs(Native Method)
        at org.eclipse.swt.graphics.TextLayout.setTabsInPixels(TextLayout.java:2144)
        at org.eclipse.swt.graphics.TextLayout.setTabs(TextLayout.java:2130)
        at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:1180)
        at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:886)
        at org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:296)
        at org.eclipse.swt.custom.StyledTextRenderer.getLineHeight(StyledTextRenderer.java:663)
        at org.eclipse.swt.custom.StyledText.getLinePixel(StyledText.java:4273)
        at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:5601)
        at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8706)
        at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6318)
        at org.eclipse.swt.custom.StyledText.lambda$1(StyledText.java:5800)
        at org.eclipse.swt.custom.StyledText$$Lambda$478/0x000000084077a040.handleEvent(Unknown Source)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5689)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1423)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1449)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1428)
        at org.eclipse.swt.widgets.ScrollBar.setVisible(ScrollBar.java:946)
        at org.eclipse.swt.custom.StyledText.setWordWrap(StyledText.java:10747)
        at org.eclipse.ui.internal.console.ConsoleView.setWordWrap(ConsoleView.java:791)
        at org.eclipse.ui.internal.console.WordWrapAction.run(WordWrapAction.java:47)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
        at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:452)
        at org.eclipse.jface.action.ActionContributionItem$$Lambda$320/0x00000008405c8040.handleEvent(Unknown Source)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5689)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1423)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4955)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4448)
        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.ui.internal.Workbench$$Lambda$111/0x00000008402b1c40.run(Unknown Source)
        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 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.10/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.10/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.10/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@11.0.10/Method.java:566)
        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)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

I'm guessing for millions of lines a long running operation cannot be avoided. If so, and the operation must be done in the UI thread, there should be a warning pop-up that Eclipse will be unusable during the long running operation.
Comment 1 Sarika Sinha CLA 2021-04-19 14:52:38 EDT
You mean to say, Word wrap should first assess the number of lines and based on that give a warning?