[Bug 850] New: Conversions between basic types fail on OSX

http://bugs.orocos.org/show_bug.cgi?id=850

Summary: Conversions between basic types fail on OSX
Product: Toolchain
Version: master
Platform: Intel 64bit
OS/Version: Mac OS X
Status: NEW
Severity: major
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created attachment 673
--> http://bugs.orocos.org/attachment.cgi?id=673
logfile with -ldebug

Hi,

I succesfully compiled the orocos_toolchain_ros (without orogen support) based
on RTT and OCL 2.3.x on Mac OSX 10.6.6. After some fiddling with the
DYLD_LIBRARY_PATH I can succesfully start the deployer, rttlua and the ros
integration stuff. All working fine but:

the conversions between types does not work which in the case of rttlua causes
a segfault (backtrace below) and in the case of the deployer failures (the
logfile is attached):

var double a
23.165 [ Debug ][Logger] Building variable 'a' of type float64
= 0

Deployer [S]> a=1
Fatal Semantic error: Incompatible types. Cannot assign: float64 = int32.
Deployer [S]> a=(float64)1
34.525 [ Debug ][Logger] Building variable 'constructor' of type float64
= 0

Deployer [S]> a=1.0
Fatal Semantic error: Incompatible types. Cannot assign: float64 = float64.

The backtrace for rttlua:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000102013ead in RTT::types::TemplateConstructor<int ()(double)>::convert
()
(gdb) bt
#0 0x0000000102013ead in RTT::types::TemplateConstructor<int
()(double)>::convert ()
#1 0x0000000100217fa7 in RTT::types::TypeInfo::convert ()
#2 0x0000000100007936 in Variable_fromlua (L=0x101207830, type=<value
temporarily unavailable, due to optimizations>, valind=5) at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/rtt.cpp:391
#3 0x000000010000f28a in __TaskContext_call [inlined] () at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/rtt.cpp:1861
#4 0x000000010000f28a in TaskContext_call (L=0x101207830) at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/rtt.cpp:1890
#5 0x0000000100761fa2 in luaD_precall ()
#6 0x000000010076ca6f in luaV_execute ()
#7 0x000000010076243d in luaD_call ()
#8 0x0000000100761ae7 in luaD_rawrunprotected ()
#9 0x0000000100761b60 in luaD_pcall ()
#10 0x000000010075d587 in lua_pcall ()
#11 0x000000010003303a in docall (L=0x101207830, narg=3, clear=0) at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/lua-repl.c:108
#12 0x0000000100033ab0 in handle_script [inlined] () at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/lua-repl.c:253
#13 0x0000000100033ab0 in pmain (L=0x101207830) at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/lua-repl.c:365
#14 0x0000000100761fa2 in luaD_precall ()
#15 0x00000001007623de in luaD_call ()
#16 0x0000000100761ae7 in luaD_rawrunprotected ()
#17 0x0000000100761b60 in luaD_pcall ()
#18 0x000000010075d52b in lua_cpcall ()
#19 0x0000000100032fa5 in main_args (L=0x101207830, argc=<value temporarily
unavailable, due to optimizations>, argv=<value temporarily unavailable, due to
optimizations>) at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/lua-repl.c:403
#20 0x000000010001a029 in ~MutexLock [inlined] () at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/LuaComponent.cpp:146
#21 0x000000010001a029 in ~MutexLock [inlined] () at
/Users/rubensmits/ros/orocos_toolchain_ros/rtt/install/include/rtt/os/MutexLock.hpp:146
#22 0x000000010001a029 in OCL::LuaComponent::lua_repl () at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/LuaComponent.cpp:72
#23 0x000000010001a029 in ORO_main_impl (argc=6, argv=0x7fff5fbfc570) at
MutexLock.hpp:208
#24 0x000000010001a439 in main (argc=6, argv=0x7fff5fbfc570) at
/Users/rubensmits/ros/orocos_toolchain_ros/ocl/lua/LuaComponent.cpp:189

-- Ruben