failed asertion
Ben Sapp
bsapp at lanl.gov
Thu Mar 29 18:09:21 CEST 2001
"Richard B. Kreckel" wrote:
>
> There doesn't seem to be enough information to judge what's going on. I
> don't know how you allocate expressions. Can you strip this problem down
> to the bare GiNaC-C++-layer? I would bet you'll find the problem
> anyways, while doing so, though...
I did this and you are right I did find the problem. I ended up
changing a function from this:
GiNaC::symbol octave_sym::sym_value () const
{
return x;
}
to this:
GiNaC::symbol octave_sym::sym_value () const
{
return ex_to_symbol(GiNaC::ex(*(x.duplicate ())));
}
Octave classes overload the new operator and sometimes octave types get
created as a const value. This was also causing me other problems
relating to the fact that GiNaC does reference counting. An ex variable
might be a const and GiNaC might change the reference count. This
caused my code to crash in unpredictable ways. I can't say I completely
understand why the particular assertion failed, but it does not seem to
be a problem any more.
Thanks.
--
Ben Sapp Los Alamos National Laboratory
email: <mailto:bsapp at lanl.gov> Phone: (505)667-3277
Fax: (505)665-7920 URL: http://www.neutrino.lanl.gov/
--
-
To UNSUBSCRIBE, email to ginac-list at ginac.de with a subject of "unsubscribe".
More information about the GiNaC-list
mailing list