Skip to content

Conversation

@bhufmann
Copy link
Contributor

What it does

This fixes the Exception below. The exception is caused because during shutdown the o.e.tc.incubator.analysis.core (for reports) Activator.stop() method is called before and the plug-in is removed from the static list of activators.

Remove the log statement to avoid this exception during shutdown.

java.lang.IllegalStateException
at org.eclipse.tracecompass.common.core.TraceCompassActivator.getInstance(TraceCompassActivator.java:86)
at org.eclipse.tracecompass.incubator.internal.analysis.core.Activator.getInstance(Activator.java:43)
at org.eclipse.tracecompass.incubator.analysis.core.reports.ReportsDataProviderFactory.dispose(ReportsDataProviderFactory.java:738)
at org.eclipse.tracecompass.tmf.core.dataprovider.DataProviderManager.dispose(DataProviderManager.java:117)
at org.eclipse.tracecompass.internal.tmf.core.Activator.stop(Activator.java:125)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:896)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
...

How to test

Run a unit test (e.g. OutputElementStyleSerializerTest) without and with this change, and the exception is gone with this PR.
 

Follow-ups

N/A

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

This fixes the Exception below. The exception is caused because during
shutdown the o.e.tc.incubator.analysis.core (for reports)
Activator.stop() method is called before and the plug-in is removed from
the static list of activators.

Remove the log statement to avoid this exception during shutdown.

java.lang.IllegalStateException
	at org.eclipse.tracecompass.common.core.TraceCompassActivator.getInstance(TraceCompassActivator.java:86)
	at org.eclipse.tracecompass.incubator.internal.analysis.core.Activator.getInstance(Activator.java:43)
	at org.eclipse.tracecompass.incubator.analysis.core.reports.ReportsDataProviderFactory.dispose(ReportsDataProviderFactory.java:738)
	at org.eclipse.tracecompass.tmf.core.dataprovider.DataProviderManager.dispose(DataProviderManager.java:117)
	at org.eclipse.tracecompass.internal.tmf.core.Activator.stop(Activator.java:125)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:896)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
...

Signed-off-by: Bernd Hufmann <[email protected]>
@bhufmann bhufmann merged commit 8d2dd6f into eclipse-tracecompass-incubator:master May 29, 2025
2 checks passed
@bhufmann bhufmann deleted the remove_log_in_dispose branch May 29, 2025 19:54
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

Successfully merging this pull request may close these issues.

2 participants