#535 closed defect (fixed)
Unknown crash with DifEq
| Reported by: | César Pérez Álvarez | Owned by: | Víctor de Buen Remiro | 
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Various | Version: | 1.1.6 | 
| Severity: | critical | Keywords: | |
| Cc: | 
Description
When we compile this code:
Set RandNoise(Date ini, Date end, TimeSet dating)
{
Serie residuals = SubSer(Gaussian(0, 0.10, dating), ini, end);
Polyn ma = (1-0.6*B)*(1-0.5*B7);
Polyn ar = (1-0.4*B);
Polyn dif = (1-B)*(1-B7)*(1-B365);
Date iniRes = Succ(ini, dating, -Degree(ma));
Date endRes = Succ(ini, dating, -1);
Serie iniResiduals = SubSer(Gaussian(0, 0.10, dating), iniRes, endRes);
Serie noise = DifEq(ma/(dif*ar), iniResiduals<<residuals,8);
SetOfSerie(ini, residuals)
};
Set test = RandNoise(y2000m01d01, y2007m01d01, Diario);
TOL crashes. Its obvious that we have an eror in "SetOfSerie(ini, residuals)" because "ini" is a "Date" when it must be a "Serie" but TOL never must crash.
If we try with this another code:
Set RandNoise(Date ini, Date end, TimeSet dating)
{
Serie residuals = SubSer(Gaussian(0, 0.10, dating), ini, end);
Polyn ma = (1-0.6*B)*(1-0.5*B7);
Polyn ar = (1-0.4*B);
Polyn dif = (1-B)*(1-B7)*(1-B365);
Date iniRes = Succ(ini, dating, -Degree(ma));
Date endRes = Succ(ini, dating, -1);
Serie iniResiduals = SubSer(Gaussian(0, 0.10, dating), iniRes, endRes);
  Serie noise = DifEq(ma/(dif*ar), iniResiduals<<residuals,8);
SetOfSerie(ini, residuals)
};
Set test = RandNoise(y2000m01d01, y2007m01d01, Diario);
TOL does not crash, and a correct warning is advise us of our error.
I can not isolate much more the error, sorry.
Change History (4)
comment:1 Changed 18 years ago by
| Owner: | changed from danirus to Víctor de Buen Remiro | 
|---|
comment:2 Changed 18 years ago by
| Status: | new → assigned | 
|---|
comment:3 Changed 18 years ago by
| bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000535 | 
|---|---|
| Resolution: | → fixed | 
| Status: | assigned → closed | 
Bug has been fixed in CVS (HEAD and 1.1.6 branches)
BTsrPolyn  BTsrDifEq::ser_ must be a pointer to avoid default copy operator that jumps PutDating and doesn't increments reference of dating_
Congratulations!
This is a very old problem and this bug report has been a great help to detect it.
A standard test has been added at http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000535
Thanks
comment:4 Changed 18 years ago by
| Summary: | Unknown crash → Unknown crash with DifEq | 
|---|


We are working about this bug
Thanks to report it