bugGNU Octave - Bugs: bug #29853, assignment testdata(find([1:2] !=...

 
 

bug #29853: assignment testdata(find([1:2] != 0)) = [1:2] fails to produce the right result

Submitter:  Jarno Rajahalme <jarno>
Submitted:  Tue 11 May 2010 03:29:48 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 11 May 2010 05:31:33 AM UTC, comment #3: 

The fix to #29851
http://hg.savannah.gnu.org/hgweb/octave/rev/6fb954475e21
apparently fixes this as well. Thanks for the report.

octave:1> testdata(find([1:2] != 0)) = [1:2]
testdata =

   1   2


Jaroslav Hajek <highegg>
Tue 11 May 2010 04:56:21 AM UTC, comment #2: 

It seems to be that this happens when testdata has not been defined. i.e. I see this behavior:

octave:1> testdata = [0 0]
testdata =
   0   0

octave:2> testdata(find([1:2] != 0)) = [1:2]
testdata =
   1   2

octave:3> clear testdata
octave:4> testdata(find([1:2] != 0)) = [1:2]
testdata =  1

Judd Storrs <judd>
Tue 11 May 2010 03:34:56 AM UTC, comment #1: 

This also happened in this context, btu currently I don't know how to reproduce:

panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid
panic: attempted clean up apparently failed -- aborting...
Abort trap

Jarno Rajahalme <jarno>
Tue 11 May 2010 03:29:48 AM UTC, original submission:  

This is likely related to 29851, but a different expression of the bug?

$ octave
GNU Octave, version 3.3.51+
...
Octave was configured for "x86_64-apple-darwin10.3.0".
...
octave:1> testdata(find([1:2] != 0)) = [1:2]
testdata =  1
octave:2> testdata(find([1:2] != 0)+0) = [1:2]
testdata =

   1   2

octave:3>

The second form produces the right outcome.

Jarno Rajahalme <jarno>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by highegg (Posted a comment)
  • -email is unavailable- added by judd (Posted a comment)
  • -email is unavailable- added by jarno (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-11 highegg StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code