bugGNU Octave - Bugs: bug #36356, textscan: error using...

 
 

bug #36356: textscan: error using CollectOutput with uneven-length data columns

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Mon 30 Apr 2012 07:53:43 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 22 Jun 2012 05:22:18 PM UTC, comment #5: 
Philip Nienhuis <philipnienhuis>
Group Member
Sun 13 May 2012 06:31:47 PM UTC, comment #4: 

patch rebased to tip

(file #25854)

Philip Nienhuis <philipnienhuis>
Group Member
Fri 04 May 2012 03:58:51 PM UTC, comment #3: 


> Could a dev please push the changeset?


Isn't that you? Or are you facing problems pushing csets?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 04 May 2012 03:31:16 PM UTC, comment #2: 

Alexander confirms that the fixes work OK.

Could a dev please push the changeset?

Philip Nienhuis <philipnienhuis>
Group Member
Thu 03 May 2012 10:44:33 PM UTC, comment #1: 

Fix/changeset (also including fix for bug #36392) attached.


(file #25777)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 30 Apr 2012 07:53:43 PM UTC, original submission:  

While investigating a bug report by Alexander Graf

https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-April/028137.html

(under "another small problem"), I found that textscan.m always removes a trailing "\n" before handing the data text string to strread().
If the last char of the data stream is a "\n", strread.m pads data columns with 0x0[] or NaN so that all columns have the same size.
If strread.m gets data w/o trailing "\n", it leaves uneven-length data column sizes as-is.
This of course is potentially the wrong thing for later CollectOutput processing by textscan.m - combining columns of the same class requires all columns to be of the same length.

I already have a fix + new test ready; I'm awaiting feedback from Alexander.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #25854:  textscan_strread_36356_36392.patch added by philipnienhuis (7KiB - application/x-download)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

    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 group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-06-22 philipnienhuis StatusPatch Submitted Fixed
    2012-06-22 philipnienhuis Open/ClosedOpen Closed
    2012-05-13 philipnienhuis Attached File- Added textscan_strread_36356_36392.patch, #25854
    2012-05-03 philipnienhuis StatusIn Progress Patch Submitted
    2012-05-03 philipnienhuis Attached File- Added textscan_textread_36356_36392.patch, #25777

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code