Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Bug report: Incrementing an invalid iterator

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Bug report: Incrementing an invalid iterator


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Bug report: Incrementing an invalid iterator
  • Date: Wed, 11 Mar 2015 11:00:58 +0100
  • Organization: GeometryFactory

What are you reporting exactly? That you might have a bug in your code
and you need some help to figure it out or you know there is a bug in
CGAL?

Do you have an example showing it?

Sebastien


On 03/11/2015 02:48 AM, Adam Getchell wrote:
Summary:
Building in debug mode produces errors (see below).

Building in release mode doesn't (see below).

Details:
Operating system: 10.10.2
Compiler: AppleClang 6.0.0.6000057
Hardware: MacBook Pro (Retina, Mid 2012)
Version:

┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus/build]

└─▪ brew info cgal

cgal: stable 4.5.2 (bottled)

http://www.cgal.org/

/usr/local/Cellar/cgal/4.5.2 (2731 files, 33M) *

Built from source with: --c++11, --imaging, --with-eigen3, --with-lapack

From:
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cgal.rb

*==>**Dependencies*

Build: cmake *✔*

Required: boost *✔*, gmp *✔*, mpfr *✔*

*==>**Options*

--c++11

Build using C++11 mode

--imaging

Build ImageIO and QT compoments of CGAL

--with-eigen3

Build with Eigen3 support

--with-lapack

Build with LAPACK support


┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus/build]

└─▪ brew info tbb

tbb: stable 4.3-20141023 (bottled)

http://www.threadingbuildingblocks.org/

/usr/local/Cellar/tbb/4.3-20141023 (104 files, 1.9M) *

Built from source with: --c++11

From:
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/tbb.rb

*==>**Options*

--c++11

Build using C++11 mode


gmock-1.7.0
Kernel:
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

Linking unittests fails:

*Scanning dependencies of target unittests*

[ 27%] Building CXX object CMakeFiles/unittests.dir/unittests/main.cpp.o

[ 36%] Building CXX object
CMakeFiles/unittests.dir/unittests/PointTest.cpp.o

[ 45%] Building CXX object
CMakeFiles/unittests.dir/unittests/S3BulkActionTest.cpp.o

[ 54%] Building CXX object
CMakeFiles/unittests.dir/unittests/S3ErgodicMovesTest.cpp.o

[ 63%] Building CXX object
CMakeFiles/unittests.dir/unittests/S3TetrahedronTest.cpp.o

[ 72%] Building CXX object
CMakeFiles/unittests.dir/unittests/SdTriangulationTest.cpp.o

[ 81%] Building CXX object
CMakeFiles/unittests.dir/unittests/SphereTest.cpp.o

[ 90%] Building CXX object
CMakeFiles/unittests.dir/unittests/Triangulated2SphereTest.cpp.o

[100%] Building CXX object
CMakeFiles/unittests.dir/unittests/VertexTest.cpp.o

*Linking CXX executable unittests*

Undefined symbols for architecture x86_64:

"tbb::task_group_context::init()", referenced from:


Full debug dump is here.

https://gist.github.com/acgetchell/3466c16aa47fb80c6199

However, the main program builds:

┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus/build]

└─▪ make

*Scanning dependencies of target cdt*

[ 9%] Building CXX object CMakeFiles/cdt.dir/src/cdt.cpp.o

[ 18%] Building CXX object CMakeFiles/cdt.dir/src/docopt/docopt.cpp.o

*Linking CXX executable cdt*

[ 18%] Built target cdt



Running the main program produces the following:

┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus/build]

└─▪ ./cdt --s -n6400 -t256 -a1.1 -k2.2 -l3.3 -p1000

Topology is spherical

Number of dimensions = 3

Number of simplices = 6400

Number of timeslices = 256

Alpha = 1.1

K = 2.2

Lambda = 3.3

Number of passes = 1000

User = adam

Hostname = Hapkido.local

Generating universe ...

Pass #1

Fixing foliation....

CGAL error: assertion violation!

Expression : DSC::type(m_ptr.p) == DSC::USED

File : /usr/local/Cellar/cgal/4.5.2/include/CGAL/Compact_container.h

Line : 1076

Explanation: Incrementing an invalid iterator.

Refer to the bug-reporting instructions at
http://www.cgal.org/bug_report.html

libc++abi.dylib: terminating with uncaught exception of type
CGAL::Assertion_exception: CGAL ERROR: assertion violation!

Expr: DSC::type(m_ptr.p) == DSC::USED

File: /usr/local/Cellar/cgal/4.5.2/include/CGAL/Compact_container.h

Line: 1076

Explanation: Incrementing an invalid iterator.

Abort trap: 6


If I build in release mode everything works:

┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus]

└─▪ ./build.sh

-- The C compiler identification is AppleClang 6.0.0.6000057

-- The CXX compiler identification is AppleClang 6.0.0.6000057

-- Check for working C compiler using: Ninja

-- Check for working C compiler using: Ninja -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler using: Ninja

-- Check for working CXX compiler using: Ninja -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Build type: Release

-- USING CXXFLAGS = ' -O3 -DNDEBUG'

-- USING EXEFLAGS = '
-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
'

-- Targetting Ninja

-- Using /usr/bin/c++ compiler.

-- DARWIN_VERSION=14

-- Mac Leopard detected

-- Requested component: Core

-- Requested component: MPFR

-- Requested component: GMP

-- Found Eigen3: /usr/local/include/eigen3 (found suitable version
"3.2.4", minimum required is "3.1.0")

-- Found Intel TBB

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/adam/CDT-plusplus/build

[13/13] Linking CXX executable unittests

┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus]

└─▪ ./build/cdt --s -n6400 -t256 -a1.1 -k2.2 -l3.3 -p1000

Topology is spherical

Number of dimensions = 3

Number of simplices = 6400

Number of timeslices = 256

Alpha = 1.1

K = 2.2

Lambda = 3.3

Number of passes = 1000

User = adam

Hostname = Hapkido.local

Generating universe ...

Pass #1

Fixing foliation....

Pass #2

Fixing foliation....

Pass #3

Fixing foliation....

Classifying simplices....

Valid foliation: true

Delaunay triangulation has 1089 cells.

There are 365 (3,1) simplices and 341 (2,2) simplices and 383 (1,3)
simplices.

Universe has been initialized ...

Now performing 1000 passes of ergodic moves.

Final Delaunay triangulation has 210 vertices and 1334 edges and 2214
faces and 1089 cells

Running time is 2.794 seconds.

Writing to file :46:21PDT.dat


--

Adam Getchell
about.me/adamgetchell <http://about.me/adamgetchell>
"Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu




Archive powered by MHonArc 2.6.18.

Top of Page