Bug 15679 - Assertion failed parsing features and/or plugins
Summary: Assertion failed parsing features and/or plugins
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 14282
Blocks:
  Show dependency tree
 
Reported: 2002-05-09 17:10 EDT by Nick Edgar CLA
Modified: 2002-05-29 08:00 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2002-05-09 17:10:22 EDT
Build 20020508 plus latest changes to update core and platform UI.

- Window / About
- it does not appear

- got the following errors in the console:

org.eclipse.update.core_1.9.0^dc031b8 ******* START RECONCILIATION ********
Unhandled exception caught in event loop.
Reason:
assertion failed: The minor (2nd) component of plugin version identifier, 1.0 
001 (20010423_0619), must be numeric.


- the stack is:

Thread [main] (Suspended (exception AssertionFailedException))
	Assert.isTrue(boolean, String) line: 95
	PluginVersionIdentifier.<init>(String) line: 155
	VersionedIdentifier.<init>(String, String) line: 67
	DefaultPluginParser.parse(InputStream) line: 63
	SiteFileFactory.parseInstalledPlugin(File) line: 277
	SiteFileFactory.parseSite(File) line: 164
	SiteFileFactory.createSite(URL) line: 82
	InternalSiteManager.createSite(String, URL) line: 182
	InternalSiteManager.attemptCreateSite(String, URL) line: 118
	InternalSiteManager.getSite(URL) line: 94
	SiteManager.getSite(URL) line: 43
	SiteReconciler.reconcile(boolean) line: 138
	SiteLocal.reconcile(boolean) line: 646
	SiteLocal.parseLocalSiteFile(SiteLocal, IPlatformConfiguration, URL, 
boolean) line: 128
	SiteLocal.internalGetLocalSite(boolean) line: 74
	InternalSiteManager.internalGetLocalSite(boolean) line: 64
	InternalSiteManager.getLocalSite() line: 51
	SiteManager.getLocalSite() line: 57
	Workbench.readFeaturesInfo() line: 908
	Workbench.getFeaturesInfo() line: 500
	AboutDialog.getFeaturesInfo() line: 332
	AboutDialog.createDialogArea(Composite) line: 252
	AboutDialog(Dialog).createContents(Composite) line: 496
	AboutDialog(Window).create() line: 275
	AboutDialog(Window).open() line: 524
	AboutAction.run() line: 42
	AboutAction(Action).runWithEvent(Event) line: 590
	ActionContributionItem.handleWidgetSelection(Event) line: 407
	ActionContributionItem.handleWidgetEvent(Event) line: 361
	ActionContributionItem.access$0(ActionContributionItem, Event) line: 
352
	ActionContributionItem$ActionListener.handleEvent(Event) line: 47
	EventTable.sendEvent(Event) line: 75
	MenuItem(Widget).notifyListeners(int, Event) line: 637
	Display.runDeferredEvents() line: 1432
	Display.readAndDispatch() line: 1221
	Workbench.runEventLoop() line: 1058
	Workbench.run(Object) line: 1041
	InternalBootLoader.run(String, URL, String, String[], Runnable) line: 
739
	BootLoader.run(String, URL, String, String[]) line: 420
	EclipseRuntimeLauncher.main(String[]) line: 16


The problem is that I have a bogus plugin in my target, 
com.ibm.etools.common.command, with version= "1.0 001 (20010423_0619)".
(Note that the console gave me no hint as to which plugin was the problem).

The SiteManager should be resilient to malformed plugins.
Comment 1 Christophe Elek CLA 2002-05-15 09:04:49 EDT
We use PluginVersionIdentifier from Core.
Move to core for comment.
Comment 2 Nick Edgar CLA 2002-05-15 09:40:13 EDT
PluginVersionIdentifier is doing the right thing.  It is being passed a 
malformed string, so it is throwing an assertion failed.
This PR was not a complaint about PluginVersionIdentifier's behaviour, it was 
that install/update should be resilient to malformed plugins.

Perhaps the failure mode of PluginVersionIdentifier should be more clearly 
identified, or throw a checked exception, e.g. as is done for parsing numeric 
strings in the class libraries.
Core should consider this, but this is an install/update PR.
Comment 3 Nick Edgar CLA 2002-05-15 10:00:33 EDT
Please see above comments.
Comment 4 Vlad Klicnik CLA 2002-05-15 11:31:49 EDT
agreed .... site parsing needs to handle more gracefully
Comment 5 DJ Houghton CLA 2002-05-15 11:48:13 EDT
Note that plugin version identifier validity checks are addressed in Bug 14282.
Comment 6 Vlad Klicnik CLA 2002-05-24 10:12:05 EDT
Investigate to ensure we log the error and continue
Comment 7 Christophe Elek CLA 2002-05-27 08:40:52 EDT
Would be much easier when bug 14282 is solved. Wait a day or two to see if Core
decides to implement it. Otherwise we will need to catch RuntimeException ;-(
Comment 8 Christophe Elek CLA 2002-05-29 08:00:25 EDT
Verfied 0528