Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » "Comparison method violates its general contract!" adding new Target Plaform
"Comparison method violates its general contract!" adding new Target Plaform [message #1760611] Fri, 28 April 2017 20:17 Go to next message
Geoff Alexander is currently offline Geoff AlexanderFriend
Messages: 21
Registered: November 2013
Junior Member
I'm running Eclipse Neon.3. I tried adding a new Target Platform (Windows -> Preferences -> Plug-in Development -> Target Platform). This failed with the following exception

java.lang.IllegalArgumentException: Comparison method violates its general contract!


The Target Platform preferences dialog now fails with the same exception, so I can't remove the target platform I added. I tried restarting Eclipse, but I get a number of the following:

java.lang.IllegalArgumentException: Comparison method violates its general contract!


during Eclipse startup and I still can't view the Target Platform preferences dialog. Also, the the Plug-in View fails to display, also with a

java.lang.IllegalArgumentException: Comparison method violates its general contract!


Here's the stack trace of the java.lang.IllegalArgumentException:

java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.TimSort.mergeHi(TimSort.java:910)
	at java.util.TimSort.mergeAt(TimSort.java:527)
	at java.util.TimSort.mergeForceCollapse(TimSort.java:468)
	at java.util.TimSort.sort(TimSort.java:265)
	at java.util.Arrays.sort(Arrays.java:1856)
	at java.util.ArrayList.sort(ArrayList.java:1465)
	at java.util.Collections.sort(Collections.java:186)
	at org.eclipse.osgi.internal.module.VersionHashMap.reorder(VersionHashMap.java:82)
	at org.eclipse.osgi.internal.module.ResolverImpl.reorderGenerics(ResolverImpl.java:2279)
	at org.eclipse.osgi.internal.module.ResolverImpl.resolve(ResolverImpl.java:497)
	at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:545)
	at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:605)
	at org.eclipse.pde.internal.core.MinimalState.internalResolveState(MinimalState.java:152)
	at org.eclipse.pde.internal.core.MinimalState.resolveState(MinimalState.java:127)
	at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:582)
	at org.eclipse.pde.internal.core.PluginModelManager.getExternalModelManager(PluginModelManager.java:1134)
	at org.eclipse.pde.internal.ui.preferences.TargetPlatformPreferencePage.init(TargetPlatformPreferencePage.java:810)
	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:58)
	at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1280)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:355)
	at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1167)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:608)
	at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:656)
	at org.eclipse.jface.preference.PreferenceDialog$5$$Lambda$110.0000000017FC6930.run(Unknown Source)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:653)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:878)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:875)
	at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1244)
	at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1270)
	at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:265)
	at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:259)
	at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:431)
	at org.eclipse.jface.util.OpenStrategy$1$$Lambda$104.000000001C7398A0.run(Unknown Source)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
	at org.eclipse.jface.window.Window.open(Window.java:794)
	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:63)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
	at org.eclipse.jface.action.ActionContributionItem$$Lambda$68.00000000187F3C30.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)


How do I recover my Eclipse workspace by removing the bad Target Platform?

[Updated on: Fri, 28 April 2017 20:18]

Report message to a moderator

Re: "Comparison method violates its general contract!" adding new Target Plaform [message #1760612 is a reply to message #1760611] Fri, 28 April 2017 20:40 Go to previous message
Geoff Alexander is currently offline Geoff AlexanderFriend
Messages: 21
Registered: November 2013
Junior Member
To answer my own question, I found that "<workspace>\.metadata\.plugins\org.eclipse.pde.core\.local_targets\1493407789951.target" contained information on the target platform that I added. I deleted that file and restarted Eclipse. No more

java.lang.IllegalArgumentException: Comparison method violates its general contract!


Yea!!!
Previous Topic:Add custom wizards to new menu in eclipse plugin
Next Topic:Neon update didn't update Target platform
Goto Forum:
  


Current Time: Fri Sep 21 00:56:32 GMT 2018

Powered by FUDForum. Page generated in 0.02179 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top