Bug #4529
closed
NPE while saving KAR crashes Kepler
Added by Oliver Soong about 15 years ago.
Updated about 15 years ago.
Description
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
java.lang.NullPointerException
at org.kepler.kar.handlers.ActorMetadataKAREntryHandler.open(ActorMetadataKAREntryHandler.java:217)
[...]
ERROR (org.kepler.kar.handlers.ActorMetadataKAREntryHandler:open:235) error opening the workflow: null
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
Incidentally, I can restart Kepler and open the saved KAR.
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.
aaron - can you take a look at this since the stack trace looks to be around ActorMetadataKAREntryHandler?
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().
Original Bugzilla ID was 4529
Also available in: Atom
PDF