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

IllegalStateException: zip file closed when debugging a Maven build #2251

Closed
2 tasks done
HannesWell opened this issue Sep 6, 2024 · 1 comment · Fixed by eclipse-jdt/eclipse.jdt.debug#486
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@HannesWell
Copy link
Member

Steps to reproduce

While debugging a Maven build launched via m2e I frequently encounter the error displayed below and the the Source Editor just shows an error instead of displaying the sources of a Maven Mojo class.

java.lang.IllegalStateException: zip file closed
	at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:846)
	at java.base/java.util.zip.ZipFile.getInputStream(ZipFile.java:375)
	at org.eclipse.debug.core.sourcelookup.containers.ZipEntryStorage.getContents(ZipEntryStorage.java:68)
	at org.eclipse.ui.editors.text.StorageDocumentProvider.setDocumentContent(StorageDocumentProvider.java:175)
	at org.eclipse.ui.editors.text.StorageDocumentProvider.createDocument(StorageDocumentProvider.java:203)
	at org.eclipse.ui.editors.text.StorageDocumentProvider.createElementInfo(StorageDocumentProvider.java:232)
	at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:395)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:483)
	at org.eclipse.ui.editors.text.ForwardingDocumentProvider.connect(ForwardingDocumentProvider.java:115)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:483)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1253)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4187)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:262)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1521)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2564)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2551)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1415)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInputWithNotify(AbstractTextEditor.java:4248)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInput(AbstractTextEditor.java:4268)
	at org.eclipse.ui.internal.WorkbenchPage.reuseEditor(WorkbenchPage.java:3060)
	at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.openEditor(SourceLookupFacility.java:433)
	at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.display(SourceLookupFacility.java:370)
	at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$SourceDisplayJob.runInUIThread(SourceLookupFacility.java:884)
	at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:148)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4099)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3715)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

Tested under this environment:

  • Windows 10

Community

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
@HannesWell HannesWell added the bug Something isn't working label Sep 6, 2024
HannesWell added a commit to HannesWell/eclipse.jdt.debug that referenced this issue Sep 6, 2024
Revert "Bug 558863 - Possible Recource leak warning in
SourceElementQualifierProvider"

This reverts commit 876dd12.

Fixes eclipse-platform/eclipse.platform.ui#2251
HannesWell added a commit to HannesWell/eclipse.platform that referenced this issue Sep 7, 2024
@HannesWell
Copy link
Member Author

This probably has to be fixed in JDT:

The API adjustment in eclipse-platform/eclipse.platform#1545 could prevent this in general in the future.

HannesWell added a commit to HannesWell/eclipse.platform that referenced this issue Sep 8, 2024
HannesWell added a commit to HannesWell/eclipse.platform that referenced this issue Sep 10, 2024
HannesWell added a commit to eclipse-platform/eclipse.platform that referenced this issue Sep 10, 2024
HannesWell added a commit to HannesWell/eclipse.jdt.debug that referenced this issue Sep 10, 2024
Revert "Bug 558863 - Possible Recource leak warning in
SourceElementQualifierProvider"

This reverts commit 876dd12.

Fixes eclipse-platform/eclipse.platform.ui#2251
HannesWell added a commit to HannesWell/eclipse.jdt.debug that referenced this issue Sep 10, 2024
Revert "Bug 558863 - Possible Recource leak warning in
SourceElementQualifierProvider"

This reverts commit 876dd12.

Fixes eclipse-platform/eclipse.platform.ui#2251
HannesWell added a commit to HannesWell/eclipse.jdt.debug that referenced this issue Sep 11, 2024
Revert "Bug 558863 - Possible Recource leak warning in
SourceElementQualifierProvider"

This reverts commit 876dd12.

Fixes eclipse-platform/eclipse.platform.ui#2251
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

Successfully merging a pull request may close this issue.

1 participant