concatenating strings and numbers: bug in Orocos

(thread was accidentally going outside of orocos-users...)

On Wednesday 13 October 2010 16:13:13 Charles Lesire-Cabaniols wrote:
> Hi Peter,
>
> I have succeeded (unfortunately) in reproducing, in some way, the
> SegFault Florent had with your patch. Actually he made his tests
> importing a toolkit its concatenation function, but also defining
> std::vector types such as:
>
> types()->addType(new StdVectorTemplateTypeInfo<unsigned int,
> true>("uints"));
>
> In the deployer, while I get:
> In Task Deployer[S]. (Status of last Command : none )
> (type 'ls' for context info) :array(1)[0]
> Got :array(1)[0]
> = 0
>
> I have the following error:
> In Task Deployer[S]. (Status of last Command : none )
> (type 'ls' for context info) :uints(1)[0]
> Got :uints(1)[0]
> Instruction non permise
>
> i.e. a SegFault with a not allowed instruction.
>
> gdb seems to point to a parser problem (a lot of classic lines :/), and
> seems to go up to your ExactMatch method.
> When I remove your operation-match patch, everything is ok!

That's really strange. I can't reproduce this (nor could I explain it). I took
all our patches on 1.12, and added the patch in attachment to get uints
support and nothing crashed:

In Task Deployer[S]. (Status of last Command : none )
(type 'ls' for context info) :uints(1)[0]
Got :uints(1)[0]
= 0

rtt 1.12 + ocl 1.12

>
> I think array does not have this problem as its TypeInfo is directly
> defined and does not specializes the StdVectorTemplateTypeInfo.

I don't see any connection between operators and the TypeInfo. Only a corrupt
typekit could cause this (typekit compiled against RTT without the patch,
while rtt is compiled with the patch).

Peter

AttachmentSize
test-uints.patch2.06 KB

concatenating strings and numbers: bug in Orocos

Finally you're right: it works after recompiling OCL (make clean; make)
What is strange is that the deployer took care of the patch as ["toto" +
2] was taken into account (printing "toto2")...
Coming from the fact that both RTT and OCL define a
StdVectorTemplateTypeInfo structure ?

On 13/10/2010 17:18, Peter Soetens wrote:
> (thread was accidentally going outside of orocos-users...)
>
> On Wednesday 13 October 2010 16:13:13 Charles Lesire-Cabaniols wrote:
>
>> Hi Peter,
>>
>> I have succeeded (unfortunately) in reproducing, in some way, the
>> SegFault Florent had with your patch. Actually he made his tests
>> importing a toolkit its concatenation function, but also defining
>> std::vector types such as:
>>
>> types()->addType(new StdVectorTemplateTypeInfo<unsigned int,
>> true>("uints"));
>>
>> In the deployer, while I get:
>> In Task Deployer[S]. (Status of last Command : none )
>> (type 'ls' for context info) :array(1)[0]
>> Got :array(1)[0]
>> = 0
>>
>> I have the following error:
>> In Task Deployer[S]. (Status of last Command : none )
>> (type 'ls' for context info) :uints(1)[0]
>> Got :uints(1)[0]
>> Instruction non permise
>>
>> i.e. a SegFault with a not allowed instruction.
>>
>> gdb seems to point to a parser problem (a lot of classic lines :/), and
>> seems to go up to your ExactMatch method.
>> When I remove your operation-match patch, everything is ok!
>>
> That's really strange. I can't reproduce this (nor could I explain it). I took
> all our patches on 1.12, and added the patch in attachment to get uints
> support and nothing crashed:
>
> In Task Deployer[S]. (Status of last Command : none )
> (type 'ls' for context info) :uints(1)[0]
> Got :uints(1)[0]
> = 0
>
> rtt 1.12 + ocl 1.12
>
>
>> I think array does not have this problem as its TypeInfo is directly
>> defined and does not specializes the StdVectorTemplateTypeInfo.
>>
> I don't see any connection between operators and the TypeInfo. Only a corrupt
> typekit could cause this (typekit compiled against RTT without the patch,
> while rtt is compiled with the patch).
>
> Peter
>