Re: segfault with rotate() using visual 5.4 on Debian i386

Bruce Sherwood <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
When I run your program on Windows I get this:

Traceback (most recent call last):
  File "Untitled", line 4
    b.rotate(pi/4)
ValueError: primitive.rotate(): angle of rotation must be specified.

The rotate statement should look like this  b.rotate(angle=pi/4)

The C++ code at wrap_primitive.cpp, line 48, is this:

throw std::invalid_argument(
            "primitive.rotate(): angle of rotation must be specified.");

I don't know why Debian would segfault rather than giving an error.
However, I note that translate_exception shows up in your error
report, and in INSTALL.txt there is the following comment (though if
this were the problem I would expect the compilation to fail):

If you get this error in compiling cvisualmodule.cpp:
		
    In file included from /usr/include/boost/python/exception_translator.hpp:12,
    from ../../vpython-core2/src/python/cvisualmodule.cpp:12:
    /usr/include/boost/python/detail/translate_exception.hpp:34:
	      error: expected nested-name-specifier before "add_reference"

	You need to make this change:
	
	In /usr/include (probably), change /boost/python/detail/translate_exception.hpp
	=========================================================
	--- boost/python/detail/translate_exception.hpp (revision 50228)
	+++ boost/python/detail/translate_exception.hpp (working copy)
	@@ -9,6 +9,7 @@

	# include <boost/call_traits.hpp>
 	# include <boost/type_traits/add_const.hpp>
	+# include <boost/type_traits/add_reference.hpp>

	# include <boost/function/function0.hpp>
	--------------------------------------
	(That is, add "# include <boost/type_traits/add_reference.hpp>" after the
	statement "# include <boost/type_traits/add_const.hpp>".)

Bruce Sherwood

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.