Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: [cgal-discuss] problem running demo/Geomview/terrain.cpp
- Date: Wed, 7 Oct 2009 06:35:53 +0200 (CEST)
I am a novice programmer wondering why the "terrain" demo has problems when
the
"input" and "kernel" demos run without issue, and what needs to be done to fix
the problem.
I'm using g++ compiler (codelite IDE), GNU gdb debugger, geomview 1.9.4 and
CGAL 3.3.1
it builds and runs until it hits line 86 of terrain.cpp.
Geomview closes and the error message is:
"Error <1>: OOGLNew: couldn't allocate -16 bytes: SKEL lines: Cannot allocate
memory
File: mallocp.c, line62"
The operation in line 86 is
...
81 // use different colors, and put a few sleeps/clear.
82
83 gv << CGAL::BLUE;
84 std::cout << "Drawing 2D Delaunay triangulation in wired mode.\n";
85 gv.set_wired(true);
86 gv << D;
...
stepping into that line shows the problem appears in line 109 of
/usr/include/CGAL/IO/Triangulation_geomview_ostream_2.h
...
96 template < class GT, class TDS >
97 Geomview_stream&
98 operator<<( Geomview_stream &gv, const Triangulation_2<GT,TDS> &T)
99 {
100 bool ascii_bak = gv.get_ascii_mode();
101 bool raw_bak = gv.set_raw(true);
102
103 if (gv.get_wired())
104 show_triangulation_edges(gv, T);
105 else
106 show_triangulation_faces(gv, T);
107
108 // Footer.
109 gv << "}})";
110
111 gv.set_raw(raw_bak);
112 gv.set_ascii_mode(ascii_bak);
113 return gv;
}
...
- [cgal-discuss] problem running demo/Geomview/terrain.cpp, ajf, 10/07/2009
- Re: [cgal-discuss] problem running demo/Geomview/terrain.cpp, ajf, 10/07/2009
Archive powered by MHonArc 2.6.16.