| Summary: | [ds] NullPointerException in ComponentInstanceImpl.freeServiceReferences | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Silvano <silvano> | ||||||
| Component: | Compendium | Assignee: | Stoyan Boshev <s.boshev> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | remy.suen, tjwatson | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | Juno M4 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Silvano
I could not reproduce this problem as described. I have spent some time to analyze the code and trying to reproduce. I agree this exception can happen but in very specific, hard to reproduce, situations: - when due to circularity a service object cannot be get - if BundleContext.getService() returns null (there can be many reasons) I will apply a fix which is pretty safe and obvious. But I cannot test and confirm if it really fix the problem you experienced. If you have any project/s that reproduce the problem please attach them to the bug. Created attachment 198974 [details]
proposed patch
Created attachment 202076 [details]
Sample project reproducing the issue
I have this problem too, it occurs when I dispose ComponentInstance which has references to other services. See attached sample project (with launcher).
Someone asked about this bug on IRC. M3 is this week so I presume this will be delayed to M4? Moving to M4. I don't think Stoyan is available until November to fix this. Thanks for the sample project Ivan! I was able to reproduce. The problem appears when the component provided by ComponentFactory has a reference and does not specify unbind method for that reference. The patch that I have already provided fixes this bug. I have released it to upstream. |