Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359294 - NPE writing the state when weaving hooks are present
Summary: NPE writing the state when weaving hooks are present
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: Juno M3   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 359310
  Show dependency tree
 
Reported: 2011-09-28 15:14 EDT by Alasdair Nottingham CLA
Modified: 2011-09-28 17:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alasdair Nottingham CLA 2011-09-28 15:14:50 EDT
Build Identifier: org.eclipse.osgi_3.7.0.v20110613

Exception in thread "State Saver" java.lang.NullPointerException
        at org.eclipse.osgi.internal.resolver.StateWriter.writeImportPackageSpec(StateWriter.java:599)
        at org.eclipse.osgi.internal.resolver.StateWriter.writeStateWire(StateWriter.java:532)
        at org.eclipse.osgi.internal.resolver.StateWriter.writeList(StateWriter.java:521)
        at org.eclipse.osgi.internal.resolver.StateWriter.writeMap(StateWriter.java:490)
        at org.eclipse.osgi.internal.resolver.StateWriter.writeBundleDescriptionLazyData(StateWriter.java:344)
        at org.eclipse.osgi.internal.resolver.StateWriter.saveState(StateWriter.java:112)
        at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.writeState(StateObjectFactoryImpl.java:439)
        at org.eclipse.osgi.internal.baseadaptor.StateManager.writeState(StateManager.java:178)
        at org.eclipse.osgi.internal.baseadaptor.StateManager.update(StateManager.java:116)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage.saveStateData(BaseStorage.java:661)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage.saveAllData(BaseStorage.java:458)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage$StateSaver.run(BaseStorage.java:1304)
        at java.lang.Thread.run(Thread.java:680)

This doesn't seem to cause a huge issue but it causes unsightly worrying messages in log files

Reproducible: Sometimes

Steps to Reproduce:
I haven't been able to reliably introduce this. I've tried with a clean and dirty work area and I've tried several different methods. I can reproduce but not reliably.
Comment 1 Thomas Watson CLA 2011-09-28 16:43:22 EDT
The issue is that we are not reading the bundle wiring correctly from the resolver cache when dynamic imports are added and resolved from weaving hooks.
Comment 2 Thomas Watson CLA 2011-09-28 17:24:51 EDT
Fix and testcase release in the following commit:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=2f1876381b370bff65fed6f35db1e4f24a17d881