Bug #2229
closedAccumulators failing to recover from out-of-memory conditions
100%
Description
When accumulators are run in non-streaming mode, and an accumulator value is requested (using accumulator-before() or accumulator-after()) for a particular node, then Saxon computes the value of the accumulator for every node up to the one one which it is requested, and saves the computed value in case it is needed again. Very often it will not be needed again (for example in the case where the request is for a total or average for the entire document). The saved value is therefore stored as a weak reference, so the garbage collector can deallocate it if space is short. In this case the value will be recomputed if it is later needed.
In the case where the stored value has been de-allocated, Saxon is failing with a NullPointerException when it comes to recompute the value.
This has been reported in the field, and it's evident where the code is wrong, but I haven't actually been able to construct a reproducible test case.
A patch is being committed on the 9.6 and 9.7 branches. Although untested, I'm very confident that at the very least, it will do no harm.
Please register to edit this issue