procedure: Fix LIST procedure (and others) in GUI. 20100302040526/pspp 20100303040503/pspp 20100304040503/pspp 20100305040503/pspp 20100306040503/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 2 Mar 2010 06:20:02 +0000 (22:20 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 2 Mar 2010 06:20:02 +0000 (22:20 -0800)
commit885ed747012fd54269ca2d9f8b55a838435ebb3e
tree53e08b4e36a1ea5494076cb52e67004897a66f52
parent0fbcb6682003e6deb5f517c4d54bada0301a61a1
procedure: Fix LIST procedure (and others) in GUI.

John Darrington reported that the following syntax makes PSPPIRE
crash:

    data list list /alpha * beta * gamma *.
    begin data.
    1 2 3
    4 5 6
    end data.

    list.

The problem is that the GUI output driver keeps a reference to the
output_items that are submitted to it.  An output_item that in turn
has a reference to the casereader for the procedure casereader (that
is, the casereader returned by proc_open()), which currently is LIST
and few if any other procedures, then causes an assertion failure in
proc_commit().  This is because until now a precondition of
proc_commit() has been that the procedure casereader be closed, which
is what the assertion enforces.

This commit fixes the problem by getting rid of the precondition on
proc_commit().  Now the procedure casereader's lifetime may be
extended arbitrarily.  This should help take PSPP output in the
direction that I want it to go, where more and more output is
generated directly or semi-directly from casereaders, as the LIST
procedure now does.
src/data/procedure.c