foreverdavid / geodesic Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/geodesic
Automatically exported from code.google.com/p/geodesic
What steps will reproduce the problem?
1. Compile example0.cpp with:
g++ -Wall example0.cpp -o test
on Ubuntu 14.04 LTS
Intel® Core™ i5-4200M CPU @ 2.50GHz × 4
64-bit
2. Try:
./test flat_triangular_mesh.txt 35
3. Get Error:
mesh has 121 vertices, 200 faces, 320 edges
40 edges are boundary edges
shortest/longest edges are 0.2/0.282843 = 0.707107
enclosing XYZ box: X[1.5,3.5] Y[-1,1] Z[0,0]
approximate diameter of the mesh is 2.82843
min/max face angles are 45/90 degrees
test: geodesic_algorithm_exact.h:1165: void
geodesic::GeodesicAlgorithmExact::construct_propagated_intervals(bool,
geodesic::edge_pointer, geodesic::face_pointer, geodesic::IntervalWithStop*,
unsigned int&, geodesic::interval_pointer): Assertion `p->start() < p->stop()'
failed.
Aborted (core dumped)
What is the expected output? What do you see instead?
Expectet is that the shortest distance of the 35. vertex to all other vertices
is printed.
What version of the product are you using? On what operating system?
See above.
Please provide any additional information below.
I guess the flat mesh is maybe not a mesh? Maybe another set of triangles (corrupted mesh)?
The other mesh (hedgehog.txt) works fine.
Original issue reported on code.google.com by [email protected]
on 1 Jun 2015 at 1:11
What steps will reproduce the problem?
1. g++ -Wall example0.cpp -o test
What is the expected output? What do you see instead?
Expect successful compile. Instead:
In file included from geodesic_algorithm_exact.h:5:0,
from example0.cpp:10:
geodesic_memory.h:187:2: error: ‘auto_ptr’ in namespace ‘std’ does not
name a type
geodesic_memory.h: In member function ‘void
geodesic::OutputBuffer::clear()’:
geodesic_memory.h:156:3: error: ‘m_buffer’ was not declared in this scope
geodesic_memory.h:156:14: error: ‘auto_ptr’ is not a member of ‘std’
geodesic_memory.h:156:28: error: expected primary-expression before ‘double’
geodesic_memory.h:156:28: error: expected ‘;’ before ‘double’
geodesic_memory.h: In member function ‘T*
geodesic::OutputBuffer::allocate(unsigned int)’:
geodesic_memory.h:166:4: error: ‘m_buffer’ was not declared in this scope
geodesic_memory.h:166:15: error: ‘auto_ptr’ is not a member of ‘std’
geodesic_memory.h:166:29: error: expected primary-expression before ‘double’
geodesic_memory.h:166:29: error: expected ‘;’ before ‘double’
geodesic_memory.h:170:14: error: ‘m_buffer’ was not declared in this scope
geodesic_memory.h: In member function ‘T* geodesic::OutputBuffer::get()’:
geodesic_memory.h:176:14: error: ‘m_buffer’ was not declared in this scope
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h: In member function ‘virtual void
geodesic::GeodesicAlgorithmExact::propagate(std::vector<geodesic::SurfacePoint>&
, double, std::vector<geodesic::SurfacePoint>*)’:
geodesic_algorithm_exact.h:549:63: error: no matching function for call to
‘max(std::set<geodesic::Interval*, geodesic::Interval>::size_type, unsigned
int&)’
geodesic_algorithm_exact.h:549:63: note: candidates are:
In file included from /usr/include/c++/4.7/bits/char_traits.h:41:0,
from /usr/include/c++/4.7/ios:41,
from /usr/include/c++/4.7/ostream:40,
from /usr/include/c++/4.7/iostream:40,
from example0.cpp:7:
/usr/include/c++/4.7/bits/stl_algobase.h:210:5: note: template<class _Tp> const
_Tp& std::max(const _Tp&, const _Tp&)
/usr/include/c++/4.7/bits/stl_algobase.h:210:5: note: template argument
deduction/substitution failed:
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h:549:63: note: deduced conflicting types for
parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
In file included from /usr/include/c++/4.7/bits/char_traits.h:41:0,
from /usr/include/c++/4.7/ios:41,
from /usr/include/c++/4.7/ostream:40,
from /usr/include/c++/4.7/iostream:40,
from example0.cpp:7:
/usr/include/c++/4.7/bits/stl_algobase.h:254:5: note: template<class _Tp, class
_Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
/usr/include/c++/4.7/bits/stl_algobase.h:254:5: note: template argument
deduction/substitution failed:
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h:549:63: note: deduced conflicting types for
parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
geodesic_algorithm_exact.h: In member function ‘void
geodesic::GeodesicAlgorithmExact::update_list_and_queue(geodesic::list_pointer,
geodesic::IntervalWithStop*, unsigned int)’:
geodesic_algorithm_exact.h:755:35: error: ‘memcpy’ was not declared in this
scope
geodesic_algorithm_exact.h:829:40: error: ‘memcpy’ was not declared in this
scope
geodesic_algorithm_exact.h:872:32: error: ‘memcpy’ was not declared in this
scope
geodesic_algorithm_exact.h:886:52: error: ‘memcpy’ was not declared in this
scope
geodesic_algorithm_exact.h:890:48: error: ‘memcpy’ was not declared in this
scope
What version of the product are you using? On what operating system?
geodesic_cpp_03_02_2008.zip on Ubuntu 12.10, g++ version 4.7.2
Please provide any additional information below.
Issues are fixed by changing 3 lines in 2 files:
geodesic_algorithm_exact.cpp
12 :+ #include <string.h>
137 : change m_queue_max_size type from 'unsigned' to 'long unsigned'
geodesic_memory.cpp
10+ #include <memory>
then all compiles fine (there are still warnings about using chars for array
indexing and the like but I guess these are things you are already taking into
consideration).
Many thanks for the code anyway,
James
Original issue reported on code.google.com by [email protected]
on 14 Feb 2013 at 9:45
Attachments:
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Traceback:
Program received signal SIGSEGV, Segmentation fault.
0xb336a6da in geodesic::GeodesicAlgorithmExact::check_stop_conditions
(this=0xa25e190, sources=...,
max_propagation_distance=1e+100, stop_points=0x0) at geodesic_library/geodesic_algorithm_exact.h:683
683 double queue_distance = (*m_queue.begin())->min();
Current language: auto
The current source language is "auto; currently c++".
(gdb) backtrace
#0 0xb336a6da in geodesic::GeodesicAlgorithmExact::check_stop_conditions
(this=0xa25e190, sources=...,
max_propagation_distance=1e+100, stop_points=0x0) at geodesic_library/geodesic_algorithm_exact.h:683
#1 geodesic::GeodesicAlgorithmExact::propagate (this=0xa25e190, sources=...,
max_propagation_distance=1e+100,
stop_points=0x0) at geodesic_library/geodesic_algorithm_exact.h:555
#2 0xb3358423 in __pyx_pf_5gdist_compute_gdist (__pyx_self=<value optimized
out>,
__pyx_v_vertices=<value optimized out>, __pyx_v_triangles=0x1268b028, __pyx_v_source_indices=0xa2f2370,
__pyx_v_target_indices=0xb7fa9680, __pyx_v_max_distance=1e+100) at gdist.cpp:1815
#3 0xb335a0c6 in __pyx_pw_5gdist_1compute_gdist (__pyx_self=0x0,
__pyx_args=0x8c81f0c, __pyx_kwds=0x13da757c)
at gdist.cpp:1430
#4 0xb7ebf178 in PyCFunction_Call (func=0xb2f956c, arg=0x8c81f0c,
kw=0x13da757c) at Objects/methodobject.c:85
#5 0xb7f24231 in do_call (f=0xa260634, throwflag=0) at Python/ceval.c:4236
#6 call_function (f=0xa260634, throwflag=0) at Python/ceval.c:4044
#7 PyEval_EvalFrameEx (f=0xa260634, throwflag=0) at Python/ceval.c:2666
What version of the product are you using? On what operating system?
latest code, Debian GNU/Linux 6.0, 32 bit
Please provide any additional information below.
I'm using this in a python wrapper. Everything worked fine with default debian
python 2.6.6. Now I switched to 2.7.3 and rebuilt gdist.so, seems to work fine
for lower vertices, but on a larger surface (~40.000 * 3 vertices) I get the
above error. Any pointers would be a great help?
Original issue reported on code.google.com by [email protected]
on 16 May 2013 at 3:52
Attempting to compile examples on on Windows 7 64 bit with MinGW gcc 4.7.0
results in errors.
Issuing the command:
g++ -Wall example0.cpp -o example0.exe
Produces traceback:
In file included from geodesic_algorithm_exact.h:5:0,
from example0.cpp:10:
geodesic_memory.h:187:2: error: 'auto_ptr' in namespace 'std' does not name a
type
geodesic_memory.h: In member function 'void geodesic::OutputBuffer::clear()':
geodesic_memory.h:156:3: error: 'm_buffer' was not declared in this scope
geodesic_memory.h:156:14: error: 'auto_ptr' is not a member of 'std'
geodesic_memory.h:156:28: error: expected primary-expression before 'double'
geodesic_memory.h:156:28: error: expected ';' before 'double'
geodesic_memory.h: In member function 'T*
geodesic::OutputBuffer::allocate(unsigned int)':
geodesic_memory.h:166:4: error: 'm_buffer' was not declared in this scope
geodesic_memory.h:166:15: error: 'auto_ptr' is not a member of 'std'
geodesic_memory.h:166:29: error: expected primary-expression before 'double'
geodesic_memory.h:166:29: error: expected ';' before 'double'
geodesic_memory.h:170:14: error: 'm_buffer' was not declared in this scope
geodesic_memory.h: In member function 'T* geodesic::OutputBuffer::get()':
geodesic_memory.h:176:14: error: 'm_buffer' was not declared in this scope
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h: In member function 'unsigned int
geodesic::GeodesicAlgorithmExact::intersect_intervals(geodesic::interval_pointer
, geodesic::IntervalWithStop*)':
geodesic_algorithm_exact.h:448:21: warning: array subscript has type 'char'
[-Wchar-subscripts]
geodesic_algorithm_exact.h:451:28: warning: array subscript has type 'char'
[-Wchar-subscripts]
geodesic_algorithm_exact.h:454:26: warning: array subscript has type 'char'
[-Wchar-subscripts]
geodesic_algorithm_exact.h:459:29: warning: array subscript has type 'char'
[-Wchar-subscripts]
geodesic_algorithm_exact.h:460:12: warning: array subscript has type 'char'
[-Wchar-subscripts]
geodesic_algorithm_exact.h: In member function 'virtual void
geodesic::GeodesicAlgorithmExact::propagate(std::vector<geodesic::SurfacePoint>&
, double, std::vector<geodesic::SurfacePoint>*)':
geodesic_algorithm_exact.h:549:63: error: no matching function for call to
'max(std::set<geodesic::Interval*, geodesic::Interval>::size_type, unsigned
int&)'
geodesic_algorithm_exact.h:549:63: note: candidates are:
In file included from
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/char_traits.h:41:0,
from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ios:41,
from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ostream:40,
from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/iostream:40,
from example0.cpp:7:
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:210:5: note: template<class _Tp>
const _Tp& std::max(const _Tp&
, const _Tp&)
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:210:5: note: template argument
deduction/substitution failed:
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h:549:63: note: deduced conflicting types for
parameter 'const _Tp' ('long long unsigned int' and 'unsigned int')
In file included from
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/char_traits.h:41:0,
from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ios:41,
from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ostream:40,
from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/iostream:40,
from example0.cpp:7:
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:254:5: note: template<class _Tp,
class _Compare> const _Tp& std
::max(const _Tp&, const _Tp&, _Compare)
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:254:5: note: template argument
deduction/substitution failed:
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h:549:63: note: deduced conflicting types for
parameter 'const _Tp' ('long long unsigned int' and 'unsigned int')
geodesic_algorithm_exact.h:563:16: warning: unused variable 'list'
[-Wunused-variable]
example0.cpp: In function 'int main(int, char**)':
example0.cpp:78:13: warning: unused variable 'best_source' [-Wunused-variable]
Compiler Settings:
------------------
> g++ -v
Using built-in specs.
COLLECT_GCC=C:\Anaconda\Scripts\g++.bat\..\..\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/anaconda/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.
0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../build/gcc/src/configure --target=x86_64-w64-mingw32
--prefix=/c/bb/vista64-mingw32/mingw-x86-x
86_64/build/build/root
--with-sysroot=/c/bb/vista64-mingw32/mingw-x86-x86_64/build/build/root
--enable-languages=all,obj
-c++ --enable-fully-dynamic-string --disable-multilib
Thread model: win32
gcc version 4.7.0 20111220 (experimental) (GCC)
Original issue reported on code.google.com by [email protected]
on 3 Mar 2014 at 5:44
Some versions of g++ define INFINITY which conflicts with mine defined in
geodesic_constants_and_simple_functions.h
Cygwin g++ compiles my code fine, but Linux g++ version 3.2.3 has a
problem.
So you can either change INFINITY to, say, GEODESIC_INF in all files of my
project, or wait for a day or two until I upload a new version of the code.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2008 at 7:16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.