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: Marco Aurelio Sterpa <>
  • To:
  • Subject: Re: [cgal-discuss] subtraction error
  • Date: Wed, 14 Oct 2009 17:46:51 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=D/7ny8q/T9iKXLO/TkkdxB+53Gg8kNlPhCLFeRSwi4FsVn8YqznFTNsUNib5YNKzvA 4aWV+n6vAO6m0otqgumo9bUATcXqf/AQn1PVg9Y/AYC7dd4aTN+rVKUMxzq2aABgGstJ IE1MjajLkRHvaESZA7LmEZjyU45fyNhjwAkTs=

I've printed is value and it seems to give no error, should I do something more?

2009/10/14 Sylvain Pion <>
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/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page