bugGNU Octave - Bugs: bug #41588, findobj() wrongly processes '-not'

 
 

bug #41588: findobj() wrongly processes '-not'

Submitted by:  sergey plotnikov <nul0m>
Submitted on:  Fri 14 Feb 2014 03:50:25 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 21 Feb 2014 04:42:59 PM UTC, comment #5:

I made a few modifications to the patch.

Octave coding conventions follow C/C++ and we put parentheses around the test condition in an if statement.

I also went with true/false rather than 1/0. Either would work but it seemed clearer to use the actual words.

I pushed the change to the gui-release branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/dca6ecfd622c).

Rik <rik5>
Project Administrator
Tue 18 Feb 2014 05:33:57 PM UTC, comment #4:

With the patch, the original example works for me and all tests still pass.
I attached a mercurial changeset (with Sergei's name and mail retrieved from savanah profile) which is easier to import and test.

(file #30599)

Pantxo Diribarne <pantxo>
Project Member
Tue 18 Feb 2014 05:09:18 PM UTC, comment #3:

i've attached a patch which could solve the problem. What do you think?

sergey plotnikov <nul0m>
Mon 17 Feb 2014 08:58:56 AM UTC, comment #2:

Yep, I saw that comment and it was quite strange because I can't reproduce this "sloppy" behavior in Matlab.

You're right Octave works well in case '-not' is not the first argument, but it will also work incorrect if follows '-depth' or 'flat' argument:

sergey plotnikov <nul0m>
Sun 16 Feb 2014 11:51:01 AM UTC, comment #1:

Here is what matlab returns for the provided example:

I think this particular octave behavior was intended (see the comment in findobj.m near line 180) and it would be useful to have Ben's input here.

Octave works well as long as "-not" is not the first argument after the graphics handle:

Pantxo Diribarne <pantxo>
Project Member
Fri 14 Feb 2014 03:50:25 PM UTC, original submission:

Please try the following code to check if it can work well

I would expect it to find handles of figure and line, but it finds nothing.

sergey plotnikov <nul0m>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #30599:  bug41588.patch added by pantxo (1KiB - text/x-patch)
file #30597:  findobj_patch added by nul0m (1KiB - application/octet-stream - do you think this patch is enough to solve the problem? in my case it worked quite well.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by nul0m (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 21 Feb 2014 04:42:59 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Tue 18 Feb 2014 05:33:57 PM UTCpantxoAttached File-=>Added bug41588.patch, #30599
    Tue 18 Feb 2014 05:03:40 PM UTCmtmillerStatusNone=>Patch Submitted
    Tue 18 Feb 2014 05:01:58 PM UTCnul0mAttached File-=>Added findobj_patch, #30597

    Back to the top


    Powered by Savane 3.1-cleanup1