Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] subtraction error

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] subtraction error


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] subtraction error
  • Date: Wed, 14 Oct 2009 17:39:44 +0200
  • Organization: INRIA

Sterpa wrote:
I've modified the compilation so that I can debug, as suggested on this
mailing
list, so now comes this problem:

void createNode(Line_2 i, Line_2 j) {

l_i = i;

l_j = j;
Point_2 tmp (v_ij.x() - 1, v_ij.y());
/* ERROR */
if(CGAL::compare_y_at_x(tmp, l_i, l_j) == CGAL::SMALLER) {

Line_2 l_k = l_i;

l_i = l_j;

l_j = l_k;

}

}

I got the following error:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: !(i>s)
File: /usr/local/include/CGAL/Interval_nt.h
Line: 88
Explanation: Variable used before being initialized (or CGAL bug)

This usually means : are you sure that v_ij.x() has been properly initialized
?
(not simply default constructed)


Aborted

This is the stack trace:

#0 0xb7fa9410 in __kernel_vsyscall ()
#1 0xb7c43085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7c44a01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7e53480 in __gnu_cxx::__verbose_terminate_handler ()
from /usr/lib/libstdc++.so.6
#4 0xb7e50d05 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb7e50d42 in std::terminate () from /usr/lib/libstdc++.so.6
#6 0xb7e50e6a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xb7f4af33 in CGAL::assertion_fail () from /usr/local/lib/libCGAL.so.4
#8 0x082208dc in Interval_nt (this=0xbff52778, i=-0, s=-1)
at /usr/local/include/CGAL/Interval_nt.h:87
#9 0x08220e2d in CGAL::operator-<false>
(a=@0x82c73e0,

b=@0x82c72a0)
at /usr/local/include/CGAL/Interval_nt.h:602
#10 0x082438e1 in Lazy_exact_Sub (this=0x82c73a8,
a=@0xbff52818,

b=@0xbff52810)
at /usr/local/include/CGAL/Lazy_exact_nt.h:281
#11 0x08243ab9 in CGAL::operator-<CGAL::Gmpq, CGAL::Gmpq> (a=@0xbff52818, b=@0xbff52810) at /usr/local/include/CGAL/Lazy_exact_nt.h:624
#12 0x08259bfd in Node::createNode (this=0xbff529bc, i=@0xbff5286c, j=@0xbff52870) at /home/marco/Desktop/cgal.project/arrangement.cpp:80


--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page