Project

Profile

Help

Bug #2229

closed

Accumulators failing to recover from out-of-memory conditions

Added by Michael Kay about 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
Start date:
2014-11-20
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

Updated by O'Neil Delpratt almost 10 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.3

Bug fix patch applied to the Saxon 9.6.0.3 maintenance release

Actions #2

Updated by O'Neil Delpratt almost 9 years ago

  • Sprint/Milestone set to 9.6.0.3
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.3 added

Please register to edit this issue

Also available in: Atom PDF