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

 
 

bug #45218: PSPP hangs on unknown CLUSTER subcommands

Submitted by:  None
Submitted on:  Sat 30 May 2015 05:52:40 PM UTC  
 
Category: Syntax ParserSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
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
  • -unavailable- added by blp (Posted a comment)
  • -unavailable- added by amead (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 May 2015 11:14:54 PM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 30 May 2015 05:52:40 PM UTCNoneAttached File-=>Added TestData.csv, #34127
      Attached File-=>Added qc3.sps, #34128

    Back to the top


    Powered by Savane 3.1-cleanup1