Bug 577704 - NPE in org.eclipse.equinox.internal.p2.engine.phases.CheckTrust
Summary: NPE in org.eclipse.equinox.internal.p2.engine.phases.CheckTrust
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 4.22   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.23 M1   Edit
Assignee: Mickael Istria CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-12-09 03:12 EST by Lars Vogel CLA
Modified: 2021-12-17 04:32 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2021-12-09 03:12:10 EST
Trying to install the Asciidoc editor into latest I-Build from the following update site results in an error:
 https://de-jcup.github.io/update-site-eclipse-asciidoctor-editor/update-site/

Worked fine in 4.22.

An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
NullPointerException
java.lang.NullPointerException
Comment 1 Andrey Loskutov CLA 2021-12-09 03:13:56 EST
(In reply to Lars Vogel from comment #0)
> An error occurred during the
> org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
> session context was:(profile=SDKProfile,
> phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=,
> action=).
> NullPointerException
> java.lang.NullPointerException

Can you provide a stack trace please?
Comment 2 Lars Vogel CLA 2021-12-09 03:17:23 EST
Stack trace:

java.lang.NullPointerException
	at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.checkCertificates(CertificateChecker.java:226)
	at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.start(CertificateChecker.java:73)
	at org.eclipse.equinox.internal.p2.engine.phases.CheckTrust.completePhase(CheckTrust.java:63)
	at org.eclipse.equinox.internal.p2.engine.Phase.postPerform(Phase.java:254)
	at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:105)
	at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
	at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:181)
	at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:76)
	at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:188)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Comment 3 Andrey Loskutov CLA 2021-12-09 03:53:23 EST
Regression from bug 577193.
"trustedKeys" is null because it only initialized if code is not signed. Obviously we have signed code only?

I guess trustedKeys must be initialized to something useful if still is null after the big first "for" loop in org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.checkCertificates(SignedContentFactory)
Comment 4 Eclipse Genie CLA 2021-12-09 07:32:01 EST
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/188689
Comment 5 Mickael Istria CLA 2021-12-09 08:20:40 EST
This should now be fixed.
Comment 7 Lars Vogel CLA 2021-12-10 02:59:56 EST
Thanks Mickael for the fast fix, verified in the latest I-build.