http://bugs.orocos.org/show_bug.cgi?id=869
Summary: Mac OS X regression in types test
Product: Toolchain
Version: master
Platform: All
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: kiwi [dot] net [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
Fails to convert types char and float. Same code works fine on Ubuntu Narwhal
(boost 1.42). Results for Mac OS X (boost 1.46.1 or 1.44)
XXX Failed to convert char to char /g/o/rtt/tests/typekit_test.cpp:151: error in "testComposeDecompose": check ti->composeType( ti->decomposeType(input->getDataSource()), output->getDataSource()) failed ... XXX Failed to convert float to float /g/o/rtt/tests/typekit_test.cpp:151: error in "testComposeDecompose": check ti->composeType( ti->decomposeType(input->getDataSource()), output->getDataSource()) failed
given the following mod to rtt/internal/DataSource.inl
diff --git a/rtt/internal/DataSource.inl b/rtt/internal/DataSource.inl index d94615e..448d737 100644 --- a/rtt/internal/DataSource.inl +++ b/rtt/internal/DataSource.inl @@ -1,6 +1,7 @@ #ifndef CORELIB_DATASOURCE_INL #define CORELIB_DATASOURCE_INL +#include <iostream> #include "AssignCommand.hpp" #include "DataSourceTypeInfo.hpp" #include "../types/TypeTransporter.hpp" @@ -85,8 +86,10 @@ namespace RTT this->set( o->value() ); return true; } + std::cout << "XXX Failed to evaluate " << other->getType() << " for " << DataSourceTypeInfo<T>::getType() <<"\n"; return false; } + std::cout << "XXX Failed to convert " << other->getType() << " to " << DataSourceTypeInfo<T>::getType() <<"\n"; return false; }
[Bug 869] Mac OS X regression in types test
http://bugs.orocos.org/show_bug.cgi?id=869
--- Comment #6 from S Roderick <kiwi [dot] net [..] ...> 2011-07-18 13:54:39 CEST ---
Created attachment 717
--> http://bugs.orocos.org/attachment.cgi?id=717
Mac + boost 1.46 log from trimmed down types_test program
[Bug 869] Mac OS X regression in types test
http://bugs.orocos.org/show_bug.cgi?id=869
--- Comment #5 from S Roderick <kiwi [dot] net [..] ...> 2011-07-18 13:53:54 CEST ---
Created attachment 716
--> http://bugs.orocos.org/attachment.cgi?id=716
Produce trimmed down types_test program
[Bug 869] Mac OS X regression in types test
On Jul 18, 2011, at 06:53 , S Roderick wrote:
>
> http://bugs.orocos.org/show_bug.cgi?id=869
>
> --- Comment #5 from S Roderick <kiwi [dot] net [..] ...> 2011-07-18 13:53:54 CEST ---
> Created attachment 716
> --> http://bugs.orocos.org/attachment.cgi?id=716
> Produce trimmed down types_test program
Sorry, patch applies to RTT v2 master.
[Bug 869] Mac OS X regression in types test
http://bugs.orocos.org/show_bug.cgi?id=869
--- Comment #4 from Peter Soetens <peter [..] ...> 2011-06-15 18:22:05 CEST ---
(In reply to comment #3)
> Created attachment 707
> fixes the char('
Hmm... fixes the char('c') syntax. It was not supported previously, but it may
help nailing type bugs down. I think the root cause of this bug is that on
macos-x the global typeinfo pointer is being overwritten or so and that for
this reason type comparisons fail. Maybe the .dylib patches fix this problem ?
I have pushed this to toolchain-2.4. Please see if this improves things or at
least testing things...
Peter
[Bug 869] Mac OS X regression in types test
On Jun 15, 2011, at 11:22 , Peter Soetens wrote:
>
> http://bugs.orocos.org/show_bug.cgi?id=869
>
> --- Comment #4 from Peter Soetens <peter [..] ...> 2011-06-15 18:22:05 CEST ---
> (In reply to comment #3)
>> Created attachment 707
>> fixes the char('
>
> Hmm... fixes the char('c') syntax. It was not supported previously, but it may
> help nailing type bugs down. I think the root cause of this bug is that on
> macos-x the global typeinfo pointer is being overwritten or so and that for
> this reason type comparisons fail. Maybe the .dylib patches fix this problem ?
>
> I have pushed this to toolchain-2.4. Please see if this improves things or at
> least testing things...
>
> Peter
There's more to this than we thought ... nasty nasty bug ...
It has something to do with boost type_discover and std::vector<double>. Use the attached patch to get a trimmed down types_test program that demonstrates the problem. Comment out line 151 (or 153, depending on your boost version) and the problem goes away. It doesn't matter where in the problem this line occurs, before or after the test, it still causes the problem. Separately, with that line above enabled, switch between the different variable types in the AType structure at top of types_test.cpp. _ONLY_ type_discovery _AND_ std::vector<double> cause the problem. And only on the mac, or only with boost 1.46.1 (not sure which yet).
Same code works fine on Lucid w/ boost 1.41, but fails on Snow Leopard w/ boost 1.46.1
I'll keep hacking at it ...
S
[Bug 869] Mac OS X regression in types test
http://bugs.orocos.org/show_bug.cgi?id=869
--- Comment #3 from Peter Soetens <peter [..] ...> 2011-06-15 18:19:36 CEST ---
Created attachment 707
--> http://bugs.orocos.org/attachment.cgi?id=707
fixes the char('
[Bug 869] Mac OS X regression in types test
http://bugs.orocos.org/show_bug.cgi?id=869
--- Comment #2 from S Roderick <kiwi [dot] net [..] ...> 2011-06-04 20:43:02 CEST ---
Created attachment 701
--> http://bugs.orocos.org/attachment.cgi?id=701
Char type test case in types_test program
[Bug 869] Mac OS X regression in types test
http://bugs.orocos.org/show_bug.cgi?id=869
--- Comment #1 from S Roderick <kiwi [dot] net [..] ...> 2011-06-04 20:42:28 CEST ---
Think that there's something deeper going on here. At least with char ...
and the line in question is
OR
and the line in question is
And for "types_test" with the attached testCharType() function
It's almost as though Mac OS X's ability to manipulate the char type in scripts
is just plain broken.