NPE while saving KAR crashes Kepler
While exploring another bug, I encountered this NPE, and it entirely killed Kepler. This happened after saving a workflow into a local repository. I don't know specifically how to replicate it, though.
done writing KAR file to C:\Documents and Settings\visitor\Desktop\kepler\workflows\test1.kar
ERROR (org.kepler.kar.handlers.ActorMetadataKAREntryHandler:open:235) error opening the workflow: null
#2 Updated by Oliver Soong about 12 years ago
I can reproduce this on 21316. I'm not sure which of these steps is absolutely necessary, but this is what I do:
1. clean-cache and run Kepler.
2. Create a trivial workflow. Opening an example workflow does not trigger the bug. This is what I use:
a. SDF Director. Set iterations to 1
b. Expression actor, set expression to 1
c. Another Expression actor (Expression2), add an input port called in, set expression to in
d. Hook Expression.output to Expression2.in
3. Save the workflow (I put it into kepler\workflows\test.xml)
4. Save Archive (KAR) (I put it into kepler\workflows\test.kar)
At that point, Kepler should abort with an NPE on the console. I have only tested this under Windows.
#4 Updated by ben leinfelder about 12 years ago
The Configuration that was being retrieved ended up being null so the openModel() call failed with the NPE. I used a more direct method for retrieving a Configuration instance and that seems to work fine.
NB: I'm a litte worried about how there are GUI classes being invoked inside the KAREntryHandler. Especially since we are trying to use the handlers in both gui and non-gui contexts.
I think we are mostly dodging the bullet with KeplerConfigurationApplication in that it extracts the MOML and opens/runs it using it's own gui-less way while other pieces of the KAR are cached by their respective handlers so that they are available during wrapup().