EICrecon catches exceptions coming from JFactories and attempts to keep processing. Podio frames have write-exactly-once semantics -- not writing a collection at all, if the factory excepts, causes a segfault. JFactory::Create catches such exceptions coming from JFactory::Process and writes out the empty collection as needed, but doesn't do so from JFactory::Init. The latter case is a bit harder because the exception in Init() happens only once at the start of processing, but requires a fresh collection be stored for each incoming JEvent. The JFactory state machine doesn't represent this. It has further flaws, such as losing track of whether Init() has been called after an Insert() happens. In general, it is currently not safe to Insert() data into a factory for some events but use Process() for others in the same stream.
Reproduced here: #487
EICrecon catches exceptions coming from JFactories and attempts to keep processing. Podio frames have write-exactly-once semantics -- not writing a collection at all, if the factory excepts, causes a segfault. JFactory::Create catches such exceptions coming from JFactory::Process and writes out the empty collection as needed, but doesn't do so from JFactory::Init. The latter case is a bit harder because the exception in Init() happens only once at the start of processing, but requires a fresh collection be stored for each incoming JEvent. The JFactory state machine doesn't represent this. It has further flaws, such as losing track of whether Init() has been called after an Insert() happens. In general, it is currently not safe to Insert() data into a factory for some events but use Process() for others in the same stream.
Reproduced here: #487