[ 
https://issues.apache.org/jira/browse/FELIX-2901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017082#comment-13017082
 ] 

Richard S. Hall commented on FELIX-2901:
----------------------------------------

Example NPE:

! stop 0
g! ERROR: Bundle host [6] Error detaching fragments. 
(java.lang.NullPointerException)
java.lang.NullPointerException
        at java.util.ArrayList.<init>(ArrayList.java:131)
        at 
org.apache.felix.framework.ModuleImpl.attachFragments(ModuleImpl.java:1183)
        at 
org.apache.felix.framework.BundleImpl.closeModules(BundleImpl.java:138)
        at org.apache.felix.framework.BundleImpl.close(BundleImpl.java:101)
        at 
org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:4593)
        at 
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:651)
        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2226)
        at org.apache.felix.framework.Felix$3.run(Felix.java:876)
        at java.lang.Thread.run(Thread.java:680)


> [Framework] NPE from a host bundle during framework shutdown
> ------------------------------------------------------------
>
>                 Key: FELIX-2901
>                 URL: https://issues.apache.org/jira/browse/FELIX-2901
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-3.2.0
>            Reporter: Richard S. Hall
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: framework-4.0.0
>
>
> When shutting down the framework, if a fragment is released before its host 
> bundle, an NPE results because the host is trying to remove itself from the 
> fragment's wires, but the fragment no longer has any wires. This is likely an 
> issue any time when a fragment is refreshed before the host. I think we just 
> need a null check here. In 3.0.x this wasn't an issue because we didn't use 
> wires in the fragment to keep track of host dependencies.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to