Skip to content

[Bug] UI freezes on startup from BuiltInChatModeManager.loadModesSync() #324

Description

@iloveeclipse

Environment

  • OS: RHEL 9.6
  • Eclipse Version: 4.38
  • Plugin Version: 0.19

Describe the bug
I saw it in the IDE on starting IDE with opened Chat view, and we also saw it now in automated tests. UI freezes for few seconds till all models data is acquired.

Expected behavior
No UI freezes, long blocking operations shouldn't be started on UI thread. Ideally the model information retrieval should be started in a background job and UI refreshed once it is done.

Additional context
Stack:

!ENTRY org.eclipse.ui.monitoring 2 0 2026-06-26 10:35:41.747
!MESSAGE UI freeze of 25s at 10:35:16.538
!SUBENTRY 1 org.eclipse.ui.monitoring 1 0 2026-06-26 10:35:41.747
!MESSAGE Sample at 10:35:23.213 (+6.675s)
Thread 'main' tid=3 (WAITING)
!STACK 0
Stack Trace
	at java.base@25/jdk.internal.misc.Unsafe.park(Native Method)
	at java.base@25/java.util.concurrent.locks.LockSupport.park(LockSupport.java:223)
	at java.base@25/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1885)
	at java.base@25/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:4364)
	at java.base@25/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:4310)
	at java.base@25/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1919)
	at java.base@25/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2093)
	at com.microsoft.copilot.eclipse.core.chat.BuiltInChatModeManager.loadModesSync(BuiltInChatModeManager.java:29)
	at com.microsoft.copilot.eclipse.core.chat.BuiltInChatModeManager.<init>(BuiltInChatModeManager.java:24)
	at com.microsoft.copilot.eclipse.core.chat.BuiltInChatModeManager.<clinit>(BuiltInChatModeManager.java:16)
	at com.microsoft.copilot.eclipse.ui.chat.services.UserPreferenceService.getAvailableChatModes(UserPreferenceService.java:226)
	at com.microsoft.copilot.eclipse.ui.chat.services.UserPreferenceService.lambda$0(UserPreferenceService.java:72)
	at com.microsoft.copilot.eclipse.ui.chat.services.UserPreferenceService$$Lambda/0x00000000a0b3d800.run(Unknown Source)
	at com.microsoft.copilot.eclipse.ui.chat.services.ChatBaseService$$Lambda/0x00000000a0885000.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at com.microsoft.copilot.eclipse.ui.chat.services.ChatBaseService.lambda$1(ChatBaseService.java:111)
	at com.microsoft.copilot.eclipse.ui.chat.services.ChatBaseService$$Lambda/0x00000000a0884400.run(Unknown Source)
	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:166)
	at org.eclipse.ui.internal.UISynchronizer$$Lambda/0x00000000a0785400.run(Unknown Source)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:131)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5068)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4528)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions