bugGNU Octave - Bugs: bug #33012, getappdata called before...

 
 

bug #33012: getappdata called before setappdata should not fail

Submitter:  None
Submitted:  Thu 07 Apr 2011 11:16:09 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  bpabbott
Originator Name:  David Bateman Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 18 Apr 2011 01:20:12 AM UTC, comment #8: 

I'm closing this. It can be reopened if needed.

Ben Abbott <bpabbott>
Group Member
Tue 12 Apr 2011 11:02:42 PM UTC, comment #7: 

I've pushed another changeset to the stable branch.

http://hg.savannah.gnu.org/hgweb/octave/rev/e12a7c0a1fc5


Ben Abbott <bpabbott>
Group Member
Tue 12 Apr 2011 03:29:23 PM UTC, comment #6: 

Thanks David. I'll push a fix later today.

Ben Abbott <bpabbott>
Group Member
Tue 12 Apr 2011 03:02:33 PM UTC, comment #5: 

The getappdata function should also allow ta call with a single argument, returning the structure _appdata_ directly. So some code something like

if (nargin == 1 && ishandle (h))
  if (isfield (get (h), "__appdata__"))
    val = get(h, "__appdata__");
  else
    val = struct ();
  endif
endif
 
at the start of getappdata is needed

D.

PS: Sorry still posting anonymously due to my dev machine being out of service (David Bateman)

Anonymous
Tue 12 Apr 2011 12:44:29 AM UTC, comment #4: 

Should this patch be committed to stable as well?

... or maybe I should ask what the policy is going forward?

Ben Abbott <bpabbott>
Group Member
Mon 11 Apr 2011 11:54:02 PM UTC, comment #3: 

The patch for bug #33025 was applied on stable and merged to default.  You should be okay to go ahead and commit your patch now.

Rik <rik5>
Group administrator
Fri 08 Apr 2011 12:21:17 PM UTC, comment #2: 

I've attached a patch. But it will not work correctly until the bug below is fixed.

https://savannah.gnu.org/bugs/?33025

(file #23137)

Ben Abbott <bpabbott>
Group Member
Thu 07 Apr 2011 10:38:06 PM UTC, comment #1: 

I'll push a fix shortly. I just need to confirm how multiple objects are supposed to be treated.

Ben Abbott <bpabbott>
Group Member
Thu 07 Apr 2011 11:16:09 AM UTC, original submission:  

In matlab the getappdata function can be called before setappdata and an empty matrix is returned. Octave's getappdata function should be modified accordingly. Either the call to get(h, "__appdata__") might be wrapped in an unwind_protect, or the presence of the property might be tested before it is used.

Sorry I can't fix this myself as I don't have access to my development machine at the moment.

D.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #23137:  changeset.patch added by bpabbott (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by None (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-04-18 bpabbott StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2011-04-12 bpabbott StatusPatch Submitted Ready For Test
    2011-04-08 bpabbott Attached File- Added changeset.patch, #23137
        StatusNone Patch Submitted
    2011-04-07 bpabbott Assigned toNone bpabbott

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code