close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 21 years ago

Closed 21 years ago

Last modified 18 years ago

#10 closed defect (fixed)

TimeSet global & TimeSet no global

Reported by: rcsoto Owned by: danirus
Priority: high Milestone:
Component: Kernel Version: head
Severity: major Keywords:
Cc: jimarin

Description

When working with TimeSet not global, an error when acceding to the created
object.

To see the following example:

TimeSet global. It works correctly.
Serie ser = Gaussian(0,1,Monthly)+Gaussian(1,0.5,Monthly);
TimeSet fec = Dating(ser);
Serie fun( Serie ser)
{

Set s = MatSerSet(Row(1,2,3,4,5,6,7,8,9,10) ,fec , y2000);
Serie b = s[1] ;
b

};

Serie c=fun(ser);

TimeSet not global. Error when operating with Serie c.

Serie ser = Gaussian(0,1,Monthly)+Gaussian(1,0.5,Monthly);
Serie fun( Serie ser)
{

TimeSet fec = Dating(ser);
Set s = MatSerSet(Row(1,2,3,4,5,6,7,8,9,10) ,fec , y2000);
Serie b = s[1] ;
b

};

Serie c = fun(ser);

Change History (6)

comment:1 Changed 21 years ago by danirus

Status: newassigned

comment:2 Changed 21 years ago by danirus

Resolution: fixed
Status: assignedclosed

This is a problem related with attribute nRefs_ that all Tol Object inherit from
BAtom class.
When we create a Serie, we associates it with a TimeSet that represent its
dating_ attribute. All Series need a TimeSet (dating_ attribute) to live.
When we use a local TimeSet (I say, a TimeSet inside not global scope) to create
a Serie, Tol removes it after leaving the scope (a function or whatever) and
then abort when we try to use that Serie.

Uploaded solution increments nRefs_ attribute of that TimeSet in order to be
used by that Serie, although it does not exist in the global scope.

comment:3 Changed 21 years ago by manuelb

blocked: 80

comment:4 Changed 21 years ago by danirus

Cc: jimarin added

comment:5 Changed 21 years ago by danirus

* Bug 93 has been marked as a duplicate of this bug. *

comment:6 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000010
Note: See TracTickets for help on using tickets.