Open meldorq opened 3 years ago
I can easily reproduce it with fontawesome.min.css
The stack while this is frozen is
"main" #1 prio=6 os_prio=0 cpu=336570.90ms elapsed=8564.23s tid=0x00007f4bf8016a20 nid=0xf8e runnable [0x00007f4bfe8b3000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.swt.internal.gtk.OS.g_utf16_offset_to_pointer(Native Method)
at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:199)
at org.eclipse.swt.graphics.TextLayout.getBoundsInPixels(TextLayout.java:752)
at org.eclipse.swt.graphics.TextLayout.getBounds(TextLayout.java:747)
at org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:299)
at org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:328)
at org.eclipse.swt.custom.StyledText.resetCache(StyledText.java:8095)
at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:10301)
at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:8008)
at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4693)
at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4770)
at org.eclipse.tm4e.ui.text.TMPresentationReconciler.applyTextRegionCollection(TMPresentationReconciler.java:681)
at org.eclipse.tm4e.ui.text.TMPresentationReconciler.colorize(TMPresentationReconciler.java:580)
at org.eclipse.tm4e.ui.text.TMPresentationReconciler$InternalListener.textChanged(TMPresentationReconciler.java:309)
at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2709)
at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3353)
at org.eclipse.jface.text.source.AnnotationPainter.invalidateTextPresentation(AnnotationPainter.java:970)
No news on this one for a long time, it seems. Not even a reaction on the upstream report at tm4e.
I am really surprised, because it is the most annoying bug in eclipse IMHO. I wonder why nobody else seems to be minding at all.
I am working around it by setting the default editor for all css files to the plain eclipse text editor. That's not ideal because I lose syntax highlighting and the like, but better than waiting for eclipse to recover several times a day, or restarting it in the middle of a carefully crafted debugging session.
I am really surprised, because it is the most annoying bug in eclipse IMHO. I wonder why nobody else seems to be minding at all.
Probably other people have different opinion on what is the most annoying bug in Eclipse and have decided to place their efforts according to their own opinion. Please consider contributing to TM4E to fix this.
Probably other people have different opinion on what is the most annoying bug in Eclipse and have decided to place their efforts according to their own opinion. Please consider contributing to TM4E to fix this.
True, I didn't want to sound harsh.
Anyway, I looked into my error logs and believe it might not be an issue with TM4E, because the same issue occurs with two different CSS editors with similar but different stack traces, and only one involves TM4E. My eclipse installation offers 2 editors to open CSS files: a "Generic Text Editor" with a CSS decoration, and a "CSS Editor". I can't tell which plugin provides which, but I believe the former comes with Wild Web Developer.
These are the stack traces:
Generic Text Editor:
Thread 'main' tid=1 (RUNNABLE) !STACK 0 Stack Trace at org.eclipse.swt.internal.gtk.OS.g_utf16_offset_to_pointer(Native Method) at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:199) at org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:1011) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:1270) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:908) at org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:298) at org.eclipse.swt.custom.StyledText.redraw(StyledText.java:7846) at org.eclipse.swt.custom.StyledText.updateCaretVisibility(StyledText.java:11278) at org.eclipse.swt.custom.StyledText.setCaretLocations(StyledText.java:9055) at org.eclipse.swt.custom.StyledText.setCaretLocations(StyledText.java:8949) at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:10718) at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:8239) at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4773) at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4850) at org.eclipse.tm4e.ui.text.TMPresentationReconciler.applyTextRegionCollection(TMPresentationReconciler.java:673) at org.eclipse.tm4e.ui.text.TMPresentationReconciler.colorize(TMPresentationReconciler.java:572) at org.eclipse.tm4e.ui.text.TMPresentationReconciler$InternalListener.textChanged(TMPresentationReconciler.java:310) at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2785) at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3429) at org.eclipse.jface.text.source.AnnotationPainter.invalidateTextPresentation(AnnotationPainter.java:970) at org.eclipse.jface.text.source.AnnotationPainter.updatePainting(AnnotationPainter.java:952) at org.eclipse.jface.text.source.AnnotationPainter.lambda$0(AnnotationPainter.java:1075) at org.eclipse.jface.text.source.AnnotationPainter$$Lambda$1415/0x00000008015eec40.run(Unknown Source) 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:5101) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4584) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) at org.eclipse.ui.internal.Workbench$$Lambda$245/0x000000080049e040.run(Unknown Source) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base@11.0.13/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@11.0.13/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base@11.0.13/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base@11.0.13/java.lang.reflect.Method.invoke(Method.java:566) at app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596) at app//org.eclipse.equinox.launcher.Main.run(Main.java:1467) at app//org.eclipse.equinox.launcher.Main.main(Main.java:1440)
CSS Editor:
Thread 'main' tid=1 (RUNNABLE) !STACK 0 Stack Trace at org.eclipse.swt.internal.gtk.OS.g_utf16_offset_to_pointer(Native Method) at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:199) at org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:1011) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:1270) at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:908) at org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:298) at org.eclipse.swt.custom.StyledText.redraw(StyledText.java:7846) at org.eclipse.swt.custom.StyledText.updateCaretVisibility(StyledText.java:11278) at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6534) at org.eclipse.swt.custom.StyledText.lambda$28(StyledText.java:5939) at org.eclipse.swt.custom.StyledText$$Lambda$658/0x0000000800b21c40.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1515) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1541) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520) at org.eclipse.swt.widgets.Control.setBounds(Control.java:1210) at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1657) at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:459) at org.eclipse.swt.widgets.Control.setBounds(Control.java:1018) at org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:163) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1876) at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1660) at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:459) at org.eclipse.swt.widgets.Control.setBounds(Control.java:1018) at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:216) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1876) at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1660) at org.eclipse.swt.widgets.Control.setBounds(Control.java:978) at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:124) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1876) at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1660) at org.eclipse.swt.widgets.Control.setBounds(Control.java:1018) at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:216) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1876) at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1660) at org.eclipse.swt.widgets.Control.setBounds(Control.java:1018) at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:231) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1876) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1882) at org.eclipse.swt.widgets.Composite.setLayoutDeferred(Composite.java:1719) at org.eclipse.swt.widgets.Display.runDeferredLayouts(Display.java:5150) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4569) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) at org.eclipse.ui.internal.Workbench$$Lambda$245/0x000000080049e040.run(Unknown Source) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base@11.0.13/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@11.0.13/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base@11.0.13/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base@11.0.13/java.lang.reflect.Method.invoke(Method.java:566) at app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596) at app//org.eclipse.equinox.launcher.Main.run(Main.java:1467) at app//org.eclipse.equinox.launcher.Main.main(Main.java:1440)
The problem exists with Eclipse 2021-06 too. Eclipse hangs for about 10 - 15 minutes when I try to open bootstrap.min.css It is really ennoying. I hope one day it will be fixed. Regards
+1, I found this thread after running into the problem with opening a bootstrap.min.css as well. Eclipse: Version: 2022-03 (4.23.0) Build id: 20220310-1457
org.eclipse.wildwebdeveloper.feature.feature.group: Version: 0.10.12.202202041634
Also going for the workaround: "I am working around it by setting the default editor for all css files to the plain eclipse text editor."
Still an annoying issue in
Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components) Version: 2023-12 (4.30.0) Build id: 20231201-2043
When I open a minified CSS file, i.e. with one very long line (e.g. 80k characters), Eclipse hangs with 100% CPU load.
The severity is different for different files of similar length, probably depending on the content. For some, Eclipse hangs for about a minute, which allows you to close the editor without killing Eclipse, e.g. fontawesome.min.css from https://fontawesome.com/download .
Others, like a proprietary file that I can't share, make Eclipse sleep for at least one hour (maybe forever).
While I can consciously avoid opening these files, it is especially annoying in a global search, when clicking next takes you to such a file without a warning.
When I open the same file in the plain text file editor, the CPU load goes up to 100%, too, but Eclipse gets responsive again much faster.