Subject: CGAL users discussion list
List archive
- From: Tom Kazimiers <>
- To:
- Subject: Re: [cgal-discuss] "Vector<T> too long" exception in release mode
- Date: Wed, 04 Mar 2009 18:30:19 +0100
Hi there,
I digged a bit around and found some new aspects out about the crash:
1. The crash happens not all the time. It is pretty strange that I
compile one time and it works (even in Release-Mode) and some other
compilation it does not. I thought things got to be deterministic...
2. The exception gets thrown through this method (in Filtered_Predicate.h):
template <class EP, class AP, class C2E, class C2A, bool Protection>
template <class A1, class A2, class A3, class A4>
typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
Filtered_predicate<EP,AP,C2E,C2A,Protection>::
operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
{
try
{
CGAL_PROFILER(std::string("calls to : ") +
std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4));
if (! is_indeterminate(res))
return res;
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") +
std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<!Protection> P(CGAL_FE_TONEAREST);
return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4));
}
with:
a1::base = {e0=-10.495699882507324 e1=11.799099922180176 }
a2::base = {e0=-10.495699882507324 e1=-10.015500068664551 }
a3::base = {e0=11.730500221252441 e1=-10.015500068664551 }
a4::base = {e0=11.730500221252441 e1=11.799099922180176 }
The problem then occurs with the last point, a4.
In the ep-method the following operator in Quotient.h is called:
void operator()(double d, NT &num, NT &den) const
{
num = NT(d);
den = 1;
}
The relevant d is here 11.799099922180176
in Debug-Mode NT(d) returns successfully and num is:
num.v = [3](-12288,-13166,12)
num.exp = -2.0000000000000000
In Release mode there happens the crash.
previously I see some uncertain_conversion_exceptions's:
758cf35f in snowSim.exe: Microsoft C++ exception:
CGAL::Uncertain_conversion_exception at memory location 0x0017eb84..
First-chance exception at 0x758cf35f in snowSim.exe: Microsoft C++
exception: std::length_error at memory location 0x0017ebd4..
First-chance exception at 0x758cf35f in snowSim.exe: Microsoft C++
exception: CGAL::Uncertain_conversion_exception at memory location
0x0017f02c..
...9 more times the last two lines...
Have you any thoughts about this?
Maybe the error is in my application, but I can not really imagin where,
since I give all the time the same input data to the methods.
Thanks in advane,
Tom
Tom Kazimiers schrieb:
> Hi,
>
> my application uses the constrained delaunay triangulation of CGAL 3.3.
> Up to now everything worked very good, but I developed only in debug
> mode. Now, for checking performance issues, I compiled in release mode
> and suddenly get an error which I do not get in debug mode (the
> "Vector<T> too long error").
> The error happens by inserting a specific constraint to the
> triangulation. The strange thing is, like said above, it only happens in
> release mode. Have you any hint for me to maybe force the auto-linker to
> use debug dll's? This should be slower, but at least it works. Maybe you
> have an idea what happens here?
>
> Thanks in advance,
> Tom
>
- Re: [cgal-discuss] about query k nearest neighbor point in Delaunay triangulation, Query Cgal, 03/01/2009
- <Possible follow-up(s)>
- Re: [cgal-discuss] about query k nearest neighbor point in Delaunay triangulation, Laurent Rineau (GeometryFactory), 03/02/2009
- [cgal-discuss] "Vector<T> too long" exception in release mode, Tom Kazimiers, 03/02/2009
- Re: [cgal-discuss] "Vector<T> too long" exception in release mode, Tom Kazimiers, 03/04/2009
- [cgal-discuss] "Vector<T> too long" exception in release mode, Mohamed BENDAOUD, 03/08/2009
- Re: [cgal-discuss] "Vector<T> too long" exception in release mode, Tom Kazimiers, 03/09/2009
- [cgal-discuss] "Vector<T> too long" exception in release mode, Mohamed BENDAOUD, 03/08/2009
- Re: [cgal-discuss] "Vector<T> too long" exception in release mode, Tom Kazimiers, 03/04/2009
- [cgal-discuss] "Vector<T> too long" exception in release mode, Tom Kazimiers, 03/02/2009
Archive powered by MHonArc 2.6.16.