[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32182] data loss in hierarchical objects
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #32182] data loss in hierarchical objects |
Date: |
Sat, 22 Jan 2011 09:11:00 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101028 Iceweasel/3.5.15 (like Firefox/3.5.15) |
Follow-up Comment #1, bug #32182 (project octave):
Jaroslav, could you please take a look at this problem? There seems to be
some issue with reference counting here, as the call to the manipulate method
is somehow changing the size of item.baseobj.val (a cell array of objects).
I'm not yet seeing where that is happening and since you've done a lot of work
with indexing and assignment for classes, maybe you will spot it sooner than I
can.
I'm not sure whether it will give you some clues or help with debugging, but
rewriting the @derivobj/manipulate.m function from
function item = manipulate(item)
% manipulate the inherited 'val' field of a derivobj.
for k = 1:numel(item.baseobj.val)
item.baseobj.val{k} = manipulate(item.baseobj.val{k});
end
to
+vertabim+
function item = manipulate(item)
% manipulate the inherited 'val' field of a derivobj.
tmp = cell (1, numel(item.baseobj.val));
for k = 1:numel(item.baseobj.val)
tmp{k} = manipulate(item.baseobj.val{k});
end
item.baseobj.val = tmp;
avoids the problem for me.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32182>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/