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

Execute ApiApplication failed #1310

Open
laeubi opened this issue Jun 18, 2024 · 1 comment
Open

Execute ApiApplication failed #1310

laeubi opened this issue Jun 18, 2024 · 1 comment
Assignees

Comments

@laeubi
Copy link
Contributor

laeubi commented Jun 18, 2024

This was shown in a Github Action and shows a place where a component is disposed while still be used:

Disposal Stacktrace:

 Caused by: java.lang.RuntimeException: Component was disposed here
    at org.eclipse.pde.api.tools.internal.model.BundleComponent.dispose (BundleComponent.java:203)
    at org.eclipse.pde.api.tools.internal.model.ProjectComponent.dispose (ProjectComponent.java:178)
    at org.eclipse.pde.api.tools.internal.model.ApiBaseline.doDispose (ApiBaseline.java:837)
    at org.eclipse.pde.api.tools.internal.model.WorkspaceBaseline.dispose (WorkspaceBaseline.java:56)
    at org.eclipse.pde.api.tools.internal.ApiBaselineManager.lambda$2 (ApiBaselineManager.java:639)
    at org.eclipse.pde.api.tools.internal.ApiBaselineManager.disposeWorkspaceBaseline (ApiBaselineManager.java:662)
    at org.eclipse.pde.api.tools.internal.WorkspaceDeltaProcessor.processJavaElementDeltas (WorkspaceDeltaProcessor.java:80)
    at org.eclipse.pde.api.tools.internal.WorkspaceDeltaProcessor.elementChanged (WorkspaceDeltaProcessor.java:51)
    at org.eclipse.jdt.internal.core.DeltaProcessor$3.run (DeltaProcessor.java:1751)
    at org.eclipse.core.runtime.SafeRunner.run (SafeRunner.java:47)
    at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners (DeltaProcessor.java:1739)
    at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta (DeltaProcessor.java:1572)
    at org.eclipse.jdt.internal.core.DeltaProcessor.fire (DeltaProcessor.java:1548)
    at org.eclipse.jdt.internal.core.DeltaProcessor.notifyAndFire (DeltaProcessor.java:2259)
    at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged (DeltaProcessor.java:2151)
    at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged (DeltaProcessingState.java:501)
    at org.eclipse.core.internal.events.NotificationManager$1.run (NotificationManager.java:321)
    at org.eclipse.core.runtime.SafeRunner.run (SafeRunner.java:47)
    at org.eclipse.core.internal.events.NotificationManager.notify (NotificationManager.java:311)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges (NotificationManager.java:174)
    at org.eclipse.core.internal.resources.Workspace.broadcastPostChange (Workspace.java:459)
    at org.eclipse.core.internal.resources.Workspace.endOperation (Workspace.java:1587)
    at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:2466)
    at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:2477)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation (JavaModelOperation.java:810)
    at org.eclipse.jdt.core.JavaCore.setClasspathContainer (JavaCore.java:6217)
    at org.eclipse.pde.internal.core.PluginModelManager$UpdateClasspathsJob.run (PluginModelManager.java:104)
    at org.eclipse.core.internal.jobs.Worker.run (Worker.java:63)

Access stacktrace:

Caused by: org.eclipse.core.runtime.CoreException: Component 'Eclipse Bindings Support' in the baseline 'workspace' is disposed
    at org.eclipse.pde.api.tools.internal.model.BundleComponent.baselineDisposed (BundleComponent.java:1198)
    at org.eclipse.pde.api.tools.internal.model.BundleComponent.getBundleDescription (BundleComponent.java:942)
    at org.eclipse.pde.api.tools.internal.model.BundleComponent.getErrors (BundleComponent.java:1183)
    at org.eclipse.tycho.apitools.ApiAnalysis.call (ApiAnalysis.java:163)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.eclipse.tycho.osgi.framework.EclipseFramework.execute (EclipseFramework.java:141)
    at org.eclipse.tycho.apitools.ApiAnalysisMojo.performAnalysis (ApiAnalysisMojo.java:308)
    at org.eclipse.tycho.apitools.ApiAnalysisMojo.execute (ApiAnalysisMojo.java:193)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:904)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:204)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
@laeubi
Copy link
Contributor Author

laeubi commented Jun 29, 2024

One option might be to make WorkspaceDeltaProcessor registered at org.eclipse.pde.api.tools.internal.provisional.ApiPlugin.start(BundleContext) allow to be disabled (e.g. with preferences) so in a context like Tycho there is no disposal of the baseline.

@laeubi laeubi self-assigned this Jul 25, 2024
laeubi added a commit to laeubi/tycho that referenced this issue Aug 12, 2024
We sometimes see "disposed" components from the workspace Baseline e.g.
eclipse-pde/eclipse.pde#1310 what seem to
indicate that some operation interfere here.

This wraps the execution of the Api Analysis part in a workspace job to
ensure these actions are delayed until we are done with the baseline.
laeubi added a commit to laeubi/tycho that referenced this issue Aug 12, 2024
We sometimes see "disposed" components from the workspace Baseline e.g.
eclipse-pde/eclipse.pde#1310 what seem to
indicate that some operation interfere here.

This wraps the execution of the Api Analysis part in a workspace job to
ensure these actions are delayed until we are done with the baseline.
laeubi added a commit to eclipse-tycho/tycho that referenced this issue Aug 12, 2024
We sometimes see "disposed" components from the workspace Baseline e.g.
eclipse-pde/eclipse.pde#1310 what seem to
indicate that some operation interfere here.

This wraps the execution of the Api Analysis part in a workspace job to
ensure these actions are delayed until we are done with the baseline.
eclipse-tycho-bot pushed a commit to eclipse-tycho/tycho that referenced this issue Aug 12, 2024
We sometimes see "disposed" components from the workspace Baseline e.g.
eclipse-pde/eclipse.pde#1310 what seem to
indicate that some operation interfere here.

This wraps the execution of the Api Analysis part in a workspace job to
ensure these actions are delayed until we are done with the baseline.

(cherry picked from commit 3449471)
eclipse-tycho-bot pushed a commit to eclipse-tycho/tycho that referenced this issue Aug 12, 2024
We sometimes see "disposed" components from the workspace Baseline e.g.
eclipse-pde/eclipse.pde#1310 what seem to
indicate that some operation interfere here.

This wraps the execution of the Api Analysis part in a workspace job to
ensure these actions are delayed until we are done with the baseline.

(cherry picked from commit 3449471)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant