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

Submitted by:  Jarno Rajahalme <jarno>
Submitted on:  Tue 11 May 2010 03:29:48 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by judd (Posted a comment)
  • -unavailable- added by jarno (Submitted the item)
  •  

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

     

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 11 May 2010 05:31:33 AM UTChigheggStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1