Discussion:
[SmartBody-dev] compile errors
James Walker
2012-05-10 18:19:26 UTC
Permalink
In core/smartbody/sbm/src/panimationviewer/ParamAnimStateEditor.cpp,
lines 825, 838, 851, and in
core/smartbody/sbm/src/panimationviewer/ParamAnimAutoMarkingEditor.cpp,
lines 124 and 283, there is code that looks like this:

std::vector<std::string>& selectedMotions =
stateEditor->getSelectedMotions();

This is not legal C++, because getSelectedMotions() returns a vector,
resulting in a temporary value, and you can't take a non-const reference
to a temporary. (I have a vague recollection that maybe Visual Studio
allows it, but standard C++ does not allow it.)

I changed this code to:

std::vector<std::string> selectedMotions(
stateEditor->getSelectedMotions() );
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
Ari Shapiro
2012-05-10 18:28:49 UTC
Permalink
Hi James,

I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Were you able to successfully build and run SmartBody?

Ari


-----Original Message-----
From: James Walker [mailto:***@frameforge3d.com]
Sent: Thursday, May 10, 2012 11:19 AM
To: Smartbody-***@lists.sourceforge.net
Subject: [SmartBody-dev] compile errors

In core/smartbody/sbm/src/panimationviewer/ParamAnimStateEditor.cpp,
lines 825, 838, 851, and in
core/smartbody/sbm/src/panimationviewer/ParamAnimAutoMarkingEditor.cpp,
lines 124 and 283, there is code that looks like this:

std::vector<std::string>& selectedMotions =
stateEditor->getSelectedMotions();

This is not legal C++, because getSelectedMotions() returns a vector, resulting in a temporary value, and you can't take a non-const reference to a temporary. (I have a vague recollection that maybe Visual Studio allows it, but standard C++ does not allow it.)

I changed this code to:

std::vector<std::string> selectedMotions(
stateEditor->getSelectedMotions() );
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
James Walker
2012-05-10 19:17:02 UTC
Permalink
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
Build, yes. Run, no. When I try to run sbm-fltk, I get this output:

SocketOpenTcp() failed
Segmentation fault

and here's the most likely relevant part of the crash report:

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52


I'm guessing it might be because /usr/local/lib contains the too-new
version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
Ari Shapiro
2012-05-10 20:40:19 UTC
Permalink
Can you use:

DYLD_LIBRARY_PATH

to set the location of the older BOOST version?

Ari


-----Original Message-----
From: James Walker [mailto:***@frameforge3d.com]
Sent: Thursday, May 10, 2012 12:17 PM
To: Ari Shapiro
Cc: Smartbody-***@lists.sourceforge.net
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
Build, yes. Run, no. When I try to run sbm-fltk, I get this output:

SocketOpenTcp() failed
Segmentation fault

and here's the most likely relevant part of the crash report:

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52


I'm guessing it might be because /usr/local/lib contains the too-new version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
James Walker
2012-05-10 21:58:29 UTC
Permalink
Post by Ari Shapiro
DYLD_LIBRARY_PATH
to set the location of the older BOOST version?
That was a good idea, but it didn't fix the crash. The crash report
does indicate that it's now using boost dylibs from my
boost_1_44_0/stage/lib folder, but otherwise the crash looks the same.

Is there a particular version of python I need to be using?
Post by Ari Shapiro
Ari
-----Original Message-----
Sent: Thursday, May 10, 2012 12:17 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
SocketOpenTcp() failed
Segmentation fault
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52
I'm guessing it might be because /usr/local/lib contains the too-new version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
Ari Shapiro
2012-05-10 22:10:48 UTC
Permalink
You should use Python 2.6, since that matches BOOST 1.44

-----Original Message-----
From: James Walker [mailto:***@frameforge3d.com]
Sent: Thursday, May 10, 2012 2:58 PM
To: Ari Shapiro
Cc: Smartbody-***@lists.sourceforge.net
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
DYLD_LIBRARY_PATH
to set the location of the older BOOST version?
That was a good idea, but it didn't fix the crash. The crash report does indicate that it's now using boost dylibs from my boost_1_44_0/stage/lib folder, but otherwise the crash looks the same.

Is there a particular version of python I need to be using?
Post by Ari Shapiro
Ari
-----Original Message-----
Sent: Thursday, May 10, 2012 12:17 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
SocketOpenTcp() failed
Segmentation fault
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52
I'm guessing it might be because /usr/local/lib contains the too-new version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
James Walker
2012-05-10 22:45:03 UTC
Permalink
Post by Ari Shapiro
You should use Python 2.6, since that matches BOOST 1.44
Hmm. The crash report's list of binary image has the lines

org.python.python 2.6.1 (2.6.1) <126DA8FF-5BC2-8788-51E3-D7A29A3F9F0F>
/System/Library/Frameworks/Python.framework/Versions/2.6/Python

and also

+org.python.python 2.7.2, (c) 2004-2011 Python Software Foundation.
(2.7.2) <49D18B1A-C92D-E32E-A7C1-086D0B14BD76>
/Library/Frameworks/Python.framework/Versions/2.7/Python

I don't really know what that means.

I tried using the environment variable

VERSIONER_PYTHON_VERSION=2.6

but it didn't make any difference.
Post by Ari Shapiro
-----Original Message-----
Sent: Thursday, May 10, 2012 2:58 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
DYLD_LIBRARY_PATH
to set the location of the older BOOST version?
That was a good idea, but it didn't fix the crash. The crash report does indicate that it's now using boost dylibs from my boost_1_44_0/stage/lib folder, but otherwise the crash looks the same.
Is there a particular version of python I need to be using?
Post by Ari Shapiro
Ari
-----Original Message-----
Sent: Thursday, May 10, 2012 12:17 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
SocketOpenTcp() failed
Segmentation fault
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52
I'm guessing it might be because /usr/local/lib contains the too-new version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
Ari Shapiro
2012-05-10 23:27:30 UTC
Permalink
Can you run this in gdb and send me the backtrace?

-----Original Message-----
From: James Walker [mailto:***@frameforge3d.com]
Sent: Thursday, May 10, 2012 3:45 PM
To: Ari Shapiro
Cc: Smartbody-***@lists.sourceforge.net
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
You should use Python 2.6, since that matches BOOST 1.44
Hmm. The crash report's list of binary image has the lines

org.python.python 2.6.1 (2.6.1) <126DA8FF-5BC2-8788-51E3-D7A29A3F9F0F>
/System/Library/Frameworks/Python.framework/Versions/2.6/Python

and also

+org.python.python 2.7.2, (c) 2004-2011 Python Software Foundation.
(2.7.2) <49D18B1A-C92D-E32E-A7C1-086D0B14BD76>
/Library/Frameworks/Python.framework/Versions/2.7/Python

I don't really know what that means.

I tried using the environment variable

VERSIONER_PYTHON_VERSION=2.6

but it didn't make any difference.
Post by Ari Shapiro
-----Original Message-----
Sent: Thursday, May 10, 2012 2:58 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
DYLD_LIBRARY_PATH
to set the location of the older BOOST version?
That was a good idea, but it didn't fix the crash. The crash report does indicate that it's now using boost dylibs from my boost_1_44_0/stage/lib folder, but otherwise the crash looks the same.
Is there a particular version of python I need to be using?
Post by Ari Shapiro
Ari
-----Original Message-----
Sent: Thursday, May 10, 2012 12:17 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
SocketOpenTcp() failed
Segmentation fault
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52
I'm guessing it might be because /usr/local/lib contains the too-new version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
James Walker
2012-05-11 00:15:42 UTC
Permalink
Post by Ari Shapiro
Can you run this in gdb and send me the backtrace?
Indeed I can...

#0 0x0000000000000000 in ?? ()
#1 0x00000001052bff67 in PyEval_GetGlobals ()
#2 0x00000001052e0282 in PyImport_Import ()
#3 0x00000001052e04b8 in PyImport_ImportModule ()
#4 0x000000010283b0e9 in boost::python::import (name=<value temporarily
unavailable, due to optimizations>) at libs/python/src/import.cpp:22
#5 0x00000001004a0372 in initPython () at IceRandom.h:29
#6 0x000000010003bfe8 in main () at IceRandom.h:29

I don't know where it got that IceRandom.h, seeing that initPython
really seems to be in SBPython.cpp.

By the way, I inserted an fprintf in import.cpp to verify that the value
being passed by boost::python::import to PyImport_ImportModule is
"__main__".
Post by Ari Shapiro
-----Original Message-----
Sent: Thursday, May 10, 2012 3:45 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
You should use Python 2.6, since that matches BOOST 1.44
Hmm. The crash report's list of binary image has the lines
org.python.python 2.6.1 (2.6.1)<126DA8FF-5BC2-8788-51E3-D7A29A3F9F0F>
/System/Library/Frameworks/Python.framework/Versions/2.6/Python
and also
+org.python.python 2.7.2, (c) 2004-2011 Python Software Foundation.
(2.7.2)<49D18B1A-C92D-E32E-A7C1-086D0B14BD76>
/Library/Frameworks/Python.framework/Versions/2.7/Python
I don't really know what that means.
I tried using the environment variable
VERSIONER_PYTHON_VERSION=2.6
but it didn't make any difference.
Post by Ari Shapiro
-----Original Message-----
Sent: Thursday, May 10, 2012 2:58 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
DYLD_LIBRARY_PATH
to set the location of the older BOOST version?
That was a good idea, but it didn't fix the crash. The crash report does indicate that it's now using boost dylibs from my boost_1_44_0/stage/lib folder, but otherwise the crash looks the same.
Is there a particular version of python I need to be using?
Post by Ari Shapiro
Ari
-----Original Message-----
Sent: Thursday, May 10, 2012 12:17 PM
To: Ari Shapiro
Subject: Re: [SmartBody-dev] compile errors
Post by Ari Shapiro
Hi James,
I updated the code this morning with those fixes, so those errors shouldn't be there anymore.
Oh, OK, I'll try to remember to run svn update more frequently. Thanks.
Post by Ari Shapiro
Were you able to successfully build and run SmartBody?
SocketOpenTcp() failed
Segmentation fault
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001052ce282 PyImport_Import + 50
2 org.python.python 0x00000001052ce4b8
PyImport_ImportModule + 40
3 libboost_python.dylib 0x00000001028290e9
boost::python::import(boost::python::str) + 73 (import.cpp:20)
4 sbm-fltk 0x000000010049d845
initPython(std::string) + 74
5 sbm-fltk 0x000000010003b8b8 main + 5664
6 sbm-fltk 0x00000001000397e8 start + 52
I'm guessing it might be because /usr/local/lib contains the too-new version of boost.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
Loading...