bugPSPP - Bugs: bug #45218, PSPP hangs on unknown CLUSTER...

 
 

bug #45218: PSPP hangs on unknown CLUSTER subcommands

Submitter:  None
Submitted:  Sat 30 May 2015 05:52:40 PM UTC
   
 
Category:  Syntax Parser Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 30 May 2015 11:14:54 PM UTC, comment #3: 

I agree it's a bug.  I checked in a fix similar to yours, and a test.  Thank you for the report!

Ben Pfaff <blp>
Group administrator
Sat 30 May 2015 08:29:58 PM UTC, comment #2: 

This bug is happening in cmd_quick_cluster(). I can fix the issue by adding a final else at the end of parser:

$ diff quick-cluster.c quick-cluster.c.original
579,584d578
<       else
<         {
<         lex_error (lexer, _("Invalid or unsupported subcommand"));
<         goto error;
<       }
<

Is there a reason not to do this? One reason is that it will break any SPSS syntax that uses unsupported subcommands but that seems better than having PSPP hang.

Alan Mead <amead>
Sat 30 May 2015 05:57:01 PM UTC, comment #1: 

Sorry, I posted this bug before I logged in.  I am the submitter.

Alan Mead <amead>
Sat 30 May 2015 05:52:40 PM UTC, original submission:  

I'm adding code to PSPP v. 0.8.4 CLUSTER to show cluster membership (PRINT and SAVE subcommands) and some of my test scripts fail to produce any output for many seconds (normal run-time is < 1 sec; I've waited a minute or two). When I add printf statements into kmeans_cluster() I see them when output is produced, I don't see any output when PSPP hangs.

I then checked and these hangs occur in 0.8.4 (without any of my code). In the attached file:

<pre>

  • this works fine.

QUICK CLUSTER Married WorkF
  /CRITERIA=CLUSTERS(3).

  • below causes hang in 0.8.4.
  • with, or without the FOO.

QUICK CLUSTER Married WorkF
  /CRITERIA=CLUSTERS(3)
  /PRINT=INITIAL CLUSTER
  /FOO=BAR
  /SAVE=CLUSTER DISTANCE.
</pre>

After I've added my code to CLUSTER to parse PRINT and SAVE, the /FOO line still hangs PSPP.

So, I conclude that there is a problem in how the subcommands of CLUSTER are parsed that occurs before kmeans_cluster() sees the syntax.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #34127:  TestData.csv added by None (10KiB - text/csv)
file #34128:  qc3.sps added by None (920B - text/spss)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by amead (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-30 blp StatusNone Fixed
        Open/ClosedOpen Closed
    2015-05-30 None Attached File- Added TestData.csv, #34127
        Attached File- Added qc3.sps, #34128

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code