Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typehierarchy: UI Freezes till Indexing done #61

Closed
jukzi opened this issue May 20, 2022 · 4 comments
Closed

typehierarchy: UI Freezes till Indexing done #61

jukzi opened this issue May 20, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@jukzi
Copy link
Contributor

jukzi commented May 20, 2022

reproduce:

  1. press "Rebuild Index" in the Java Preferences
  2. in a java editor press CTRL+T

=> Mouse icon changes to busy and UI freezes till indexing finished. Impossible to cancel.
Expected: show a cancelable(!) "wait till indexing finished" Dialog

"main" #1 prio=6 os_prio=0 cpu=128937.50ms elapsed=1278.33s tid=0x000001580d59f730 nid=0xe70 runnable  [0x0000000f8a8fb000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.win32.OS.WaitMessage(Native Method)
        at org.eclipse.swt.widgets.Display.sleep(Display.java:4757)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:167)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:368)
        at org.eclipse.ui.internal.WorkbenchWindow.lambda$7(WorkbenchWindow.java:2345)
        at org.eclipse.ui.internal.WorkbenchWindow$$Lambda$2406/0x0000000802052330.run(Unknown Source)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
        at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2343)
        at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.ensureRefreshedTypeHierarchy(TypeHierarchyLifeCycle.java:212)
        at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.ensureRefreshedTypeHierarchy(TypeHierarchyLifeCycle.java:161)
        at org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl.setInput(HierarchyInformationControl.java:275)
        at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1151)
        at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1120)
        at org.eclipse.jface.text.AbstractInformationControlManager.setInformation(AbstractInformationControlManager.java:431)
        at org.eclipse.jface.text.information.InformationPresenter.computeInformation(InformationPresenter.java:321)
        at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:1101)
        at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:1091)
        at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:175)
        at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:206)
        at org.eclipse.ui.texteditor.TextOperationAction.lambda$0(TextOperationAction.java:130)
        at org.eclipse.ui.texteditor.TextOperationAction$$Lambda$2434/0x0000000801dd5490.run(Unknown Source)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
        at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:130)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
        at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
        at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
        at jdk.internal.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.3/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@17.0.3/Method.java:568)
        at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
        at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
        at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
        at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
        at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
        at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
        at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
        at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
        at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
        at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
        at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
        at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
        at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
        at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1065)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1117)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1113)
        at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1542)
        at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4868)
        at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4746)
        at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:5026)
        at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3643)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
        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$276/0x0000000800ead0f0.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:402)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.3/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.3/NativeMethodAccessorImpl.java:77)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.3/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@17.0.3/Method.java:568)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
@ktatavarthi ktatavarthi added the bug Something isn't working label May 20, 2022
@jukzi
Copy link
Contributor Author

jukzi commented Sep 1, 2023

Normally there is a progress an cancel button in the bottom left (managed by org.eclipse.jface.action.StatusLineManager).
image
unfortunately that button disappears as soon as the user switches the application (likely while waiting) and show eclipse again.
That is cause by monitor.done() in org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.ActivationListener.windowActivated(IWorkbenchWindow) - closing an progressmonitor that is still needed.
I'll propose a PR.

@jukzi
Copy link
Contributor Author

jukzi commented Sep 1, 2023

@jukzi
Copy link
Contributor Author

jukzi commented Sep 1, 2023

Can be fixed in general in platform.ui with eclipse-platform/eclipse.platform.ui#1077

jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 11, 2023
jukzi pushed a commit to eclipse-platform/eclipse.platform.ui that referenced this issue Sep 11, 2023
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 12, 2023
jukzi pushed a commit to jukzi/eclipse.jdt.ui that referenced this issue Sep 12, 2023
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 12, 2023
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 12, 2023
Reusing a IProgressManager requires to finally call
progressMonitor.done() before using it again.

see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485748
and
eclipse-jdt/eclipse.jdt.ui#61
jukzi pushed a commit to jukzi/eclipse.jdt.ui that referenced this issue Sep 12, 2023
Reusing a IProgressManager requires to finally call
progressMonitor.done() before using it again.

see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485748
and
eclipse-jdt#61
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 12, 2023
iloveeclipse pushed a commit to eclipse-platform/eclipse.platform.ui that referenced this issue Sep 12, 2023
@jukzi
Copy link
Contributor Author

jukzi commented Feb 8, 2024

This got fixed: Its possible to cancel using the stop button in the bottom:
image

@jukzi jukzi closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants