Issue
This behavior just started two days ago. When I save a file, automatic build kicks in. (I don't want to turn off automatic builds.) Eclipse blocks the UI during a build. It says "Refreshing".
I took call stacks of Eclipse when hung and when okay. I found this thread. What can I do to fix the hang?
Here's what I tried:
- Manually refreshing the project hangs
- Checked Error view and found nothing
- Checked .metadata/.log and found nothing
- Delete .metadata/.plugins/org.eclipse.core.resources/.project
- Run Eclipse with -clean option
- Run Eclipse with -clean and -clearPersistedState options
- Increase heap size
I noticed that saving a file does not trigger the UI blocking hang, but the build does take a while. Making a change and saving the file again while the build is going causes the UI to block.
"Worker-49: Building" #498 prio=5 os_prio=0 cpu=9125.00ms elapsed=662.08s tid=0x0000017e2de80070 nid=0x6c80 runnable [0x0000003ca1cfd000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.core.internal.filesystem.local.LocalFileNatives.internalGetFileInfoW(Native Method)
at org.eclipse.core.internal.filesystem.local.LocalFileNatives.fetchFileInfo(LocalFileNatives.java:116)
at org.eclipse.core.internal.filesystem.local.LocalFileHandler.fetchFileInfo(LocalFileHandler.java:30)
at org.eclipse.core.internal.filesystem.local.LocalFileNativesManager.fetchFileInfo(LocalFileNativesManager.java:65)
at org.eclipse.core.internal.filesystem.local.LocalFile.fetchInfo(LocalFile.java:161)
at org.eclipse.core.filesystem.provider.FileStore.fetchInfo(FileStore.java:260)
at org.eclipse.core.filesystem.provider.FileStore.childInfos(FileStore.java:99)
at org.eclipse.core.internal.localstore.UnifiedTree.getLocalList(UnifiedTree.java:360)
at org.eclipse.core.internal.localstore.UnifiedTree.addChildren(UnifiedTree.java:148)
at org.eclipse.core.internal.localstore.UnifiedTree.addNodeChildrenToQueue(UnifiedTree.java:254)
at org.eclipse.core.internal.localstore.UnifiedTree.accept(UnifiedTree.java:120)
at org.eclipse.core.internal.localstore.FileSystemResourceManager.refreshResource(FileSystemResourceManager.java:978)
at org.eclipse.core.internal.localstore.FileSystemResourceManager.refresh(FileSystemResourceManager.java:961)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1573)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.refreshResources(MavenBuilderImpl.java:280)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:176)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:164)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$1(MavenBuilder.java:109)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$$Lambda$1256/0x0000000801a3aa90.call(Unknown Source)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:228)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:100)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$$Lambda$1254/0x0000000801a3a388.call(Unknown Source)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:83)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:192)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1020)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:247)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:392)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:395)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:506)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:454)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:536)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:196)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:289)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
@howlger suggested that I open the Maven Workspace Build view in Eclipse. Here is what it shows.
Configuration
- Eclipse: 2023-03 (4.27.0 - build 20230309-1520)
- Windows: 11 version 22H2 build 22621.1555
Solution
Eclipse will do a refresh operation as part of a build. If the project directory has a deep large tree of directories, then this will take a while. Reducing the size of the tree of directories resolves this.
Answered By - Nathan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.