eclipse-platform / eclipse.platform.runtime Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 2.0
License: Eclipse Public License 2.0
https://github.com/eclipse-platform/eclipse.platform.runtime#readme
shows links to old bugtracker, old git
JobTest | testAsynchJobConflict | Failure | 11.3 expected:<0> but was:<4>
junit.framework.AssertionFailedError: 11.3 expected:<0> but was:<4>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.Assert.assertEquals(Assert.java:234)at junit.framework.TestCase.assertEquals(TestCase.java:377)
at org.eclipse.core.tests.runtime.jobs.JobTest.testAsynchJobConflict(JobTest.java:357)
Looks like a regression from #17 , the runtime tests were stable AFAIK.
After fixing UILockListener via eclipse-platform/eclipse.platform.ui#56 I see now two other errors appearing in the error log if I shutdown Eclipse with a refresh job running.
One of the errors is from runtime plugin and has no stack trace. That must be added to understand the issue.
eclipse.buildId=4.24.0.I20220505-1800
org.eclipse.core.jobs
Error
Fri May 06 11:32:34 CEST 2022
Worker thread ended job: Refreshing workspace(12), but still holds rule: ThreadJob(Refreshing workspace(12),[P/WIP])
I plan to push a patch.
If a UI Plugin is started before the IDE, it is also shut down after the shutdown of the IDE, this currently leads to
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
at org.eclipse.core.internal.runtime.InternalPlatform.getInstanceLocation(InternalPlatform.java:334)
at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin.java:341)
at org.eclipse.ui.plugin.AbstractUIPlugin.savePreferenceStore(AbstractUIPlugin.java:445)
at org.eclipse.ui.plugin.AbstractUIPlugin.stop(AbstractUIPlugin.java:548)
at org.eclipse.ui.internal.WorkbenchPlugin.stop(WorkbenchPlugin.java:1061)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:870)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:862)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1046)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:376)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1888)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1763)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:208)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:226)
at java.base/java.lang.Thread.run(Thread.java:834)
Currently one needs to pass a BundleContext
to EclipseContextFactory.getServiceContext
to get an OSGi Service Context.
In case such one is not at hand, it would be useful to let it determine it by a context class and adding some sanity checks.
This checks for null location but not if location.getURL() is null resulting in
Caused by: java.lang.NullPointerException
at org.eclipse.core.internal.runtime.InternalPlatform.getLocation(InternalPlatform.java:347)
at org.eclipse.core.runtime.Platform.getLocation(Platform.java:766)
at org.eclipse.core.internal.resources.WorkspaceRoot.<init>(WorkspaceRoot.java:43)
at org.eclipse.core.internal.resources.Workspace.<init>(Workspace.java:106)
Test fails sporadically, introduced in #7
junit.framework.AssertionFailedError: Job result in unexpected order expected:<1> but was:<2>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.Assert.assertEquals(Assert.java:234)
at junit.framework.TestCase.assertEquals(TestCase.java:377)
at org.eclipse.core.tests.runtime.jobs.JobGroupTest.testJoinIfJobCoundExceedsSeedCount(JobGroupTest.java:802)
The current way to obtain an ILog
is to have a Plugin activator or use Platform.getLog(Bundle)
given we are in an OSGi context this unnecessarily created a static binding to the platform class or plugin activator.
We should support additional a service factory that provides ILog instances so one could for example simply use:
@Reference
ILog log;
There is an annoying problem in m2e see eclipse-m2e/m2e-core#123 even more worse, when this happens one could get eclipse completely stuck:
I can see that the "main" thread is waiting forever to be notified (@iloveeclipse that's what I recently noted about using simple blocking primitives) what seem to never happen (I see no other ThreadJob in the dump).
@jukzi by the way this is a good example that shows that BusyIndicator.showWhile
actually is blocking the UI thread see at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
in below stack-trace.
I have attached a full thread dump here freeze.txt it happened at
Version: 2022-06 M1 (4.24.0 M1)
Build id: 20220414-1707
"main" #1 prio=6 os_prio=0 cpu=206488,83ms elapsed=2367,80s allocated=4660M defined_classes=16162 tid=0x00007f2380025800 nid=0x1e70 in Object.wait() [0x00007f2387bca000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait([email protected]/Native Method)
- waiting on <no object reference available>
at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:324)
- waiting to re-lock in wait() <0x00000000821828f8> (a java.lang.Object)
at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:208)
at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:95)
at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:311)
at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:124)
at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2265)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2310)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2335)
at org.eclipse.ltk.internal.core.refactoring.UndoableOperation2ChangeAdapter.executeChange(UndoableOperation2ChangeAdapter.java:351)
at org.eclipse.ltk.internal.core.refactoring.UndoableOperation2ChangeAdapter.undo(UndoableOperation2ChangeAdapter.java:196)
at org.eclipse.core.commands.operations.TriggeredOperations.undo(TriggeredOperations.java:214)
at org.eclipse.core.commands.operations.DefaultOperationHistory.doUndo(DefaultOperationHistory.java:407)
at org.eclipse.core.commands.operations.DefaultOperationHistory.undo(DefaultOperationHistory.java:1149)
at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoActionHandler.java:86)
at org.eclipse.ui.operations.OperationHistoryActionHandler.lambda$0(OperationHistoryActionHandler.java:288)
at org.eclipse.ui.operations.OperationHistoryActionHandler$$Lambda$1860/0x00000001015a3840.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:434)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:352)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:470)
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.access$1(TimeTriggeredProgressMonitorDialog.java:1)
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.lambda$0(TimeTriggeredProgressMonitorDialog.java:155)
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog$$Lambda$1751/0x000000010173a840.run(Unknown Source)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.run(TimeTriggeredProgressMonitorDialog.java:167)
at org.eclipse.ui.operations.OperationHistoryActionHandler.run(OperationHistoryActionHandler.java:301)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at jdk.internal.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke([email protected]/Method.java:566)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1924)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1528)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1538)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1577)
at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:937)
at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:4014)
at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:921)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2434)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6855)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6170)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1552)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4530)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.ui.internal.Workbench$$Lambda$156/0x00000001003c0040.run(Unknown Source)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0([email protected]/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke([email protected]/Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
There is a new test fail caused by this change, tests must be updated too.
org.eclipse.core.tests.internal.preferences.EclipsePreferencesTest | testLegacy | Failure |
3.0 expected:<value.1649981901638-0.3893493642818254> but was:<null>junit.framework.ComparisonFailure: 3.0 expected:<value.1649981901638-0.3893493642818254> but was:<null>at junit.framework.Assert.assertEquals(Assert.java:100)at junit.framework.TestCase.assertEquals(TestCase.java:253)at org.eclipse.core.tests.internal.preferences.EclipsePreferencesTest.testLegacy(EclipsePreferencesTest.java:1091)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Originally posted by @iloveeclipse in eclipse-equinox/equinox.bundles#15 (comment)
This was originally created as eclipse-equinox/equinox.bundles#21.
While reviewing eclipse-platform/eclipse.platform.resources#71 I've found, that I'm able to silently init a workspace (with default value) without specifying workspace location explicitly via prompt or -data
argument, even if -Dosgi.dataAreaRequiresExplicitInit=true
is set in eclipse.ini.
This is a regression, so bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=514333 is back.
I'm investigating where it was broken... 4.19 is OK, 4.20 is broken...
OK, regression is coming from
Ironically, commit message was The start code for the plugin can be migrated to run inside Workspace without changing existing behaviour.
...
The root cause is the default initialization order of LocalMetaArea
and WorkspaceRoot
objects after the patch above. If the WorkspaceRoot
is created first, it silently initializes default location for workspace. I will push a patch.
There has recently been a discussion that people are not aware how to acquire a service in there plugin here.
Actually it is not quite magic if you already use a Plugin
activator (especially used in UI plugins) so we might simply provide a method getOSGiService(Class cls) method there to help with that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.