Fwd: [Bug 734] Adaption of DataSource to const reference

Forgot to reply-to-list
---------- Forwarded message ----------
From: Ruben Smits <ruben [dot] smits [..] ...>
Date: Thu, Nov 19, 2009 at 1:15 PM
Subject: Re: [Orocos-Dev] [Bug 734] Adaption of DataSource to const reference
To: Peter Soetens <Peter [dot] Soetens [..] ...>

Are you sure it is fixed, since this change another test started
failing (or is this unrelated?):

Regression

TypesTestSuite./var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.testTypes
(from /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test)
Failing for the past 1 build (Since Unstable#23 )
Took 50 ms.
add description
Stacktrace

===  Program error on line 65.

File:/var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp
Line:345
===  Program not stopped on line 65.

File:/var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp
Line:357
===  State error on line 65.

File:/var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp
Line:390

Standard Output

=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:320:check
tc->engine() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:321:check
tc->engine()->programs() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:336:check
tc->engine()->programs()->loadProgram( *pg_list.begin() ) passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:337:check
tsim->start() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:338:check
(*pg_list.begin())->start() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:340:check
SimulationThread::Instance()->run(1000) passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:359:check
(*pg_list.begin())->stop() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:366:check
tc->engine() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:367:check
tc->engine()->states() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:381:check
tc->engine()->states()->loadStateMachine( *pg_list.begin() ) passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:382:check
tsim->start() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:383:check
(*pg_list.begin())->activate() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:384:check
(*pg_list.begin())->start() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:386:check
SimulationThread::Instance()->run(1000) passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:393:check
(*pg_list.begin())->stop() passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:394:check
SimulationThread::Instance()->run(100) passed
=== [Info] - /var/lib/hudson/jobs/RTT-trunk/workspace/rtt/tests/types_test.cpp:395:check
(*pg_list.begin())->deactivate() passed

Standard Error

=== [Exception] - ::std::exception: Could not unload StateMachine "x"
with the processor. It is still active, status is deactivating

Ruben

On Thu, Nov 19, 2009 at 12:39 PM, Peter Soetens
<Peter [dot] Soetens [..] ...> wrote:
> https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=734
>
>
> Peter Soetens <peter [..] ...> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>         Resolution|                            |FIXED
>             Status|NEW                         |RESOLVED
>
>
>
>
> --- Comment #2 from Peter Soetens <peter [..] ...>  2009-11-19 12:39:38 ---
> (In reply to comment #0)
>> Created an attachment (id=573)
>  --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=573)
>> adapt AssignableDataSource to const ref without copying
>>
>> If I am not totally wrong, in AdaptDataSource<const TResult&> the second case
>> where the source is an AssignableDataSource<TResult> will never be used, as each
>> AssignableDataSource is also a DataSource. Therefore the conversion always
>> involves copying, although this is not necessary. I would suggest to swap the
>> two cases. A patch for DataSourceAdapter.hpp is attached.
>
> It's on the mainlines and backported to 1.10.
>
> Thanks for reporting.
>
> Peter
>
> --
> Configure bugmail: https://www.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
> You are the assignee for the bug.
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

[Bug 734] Adaption of DataSource to const reference

On Thu, Nov 19, 2009 at 13:15, Ruben Smits <ruben [dot] smits [..] ...> wrote:
> Are you sure it is fixed, since this change another test started
> failing (or is this unrelated?):

The fix revealed a bug in the unit tests. Because we returned copies
before, capacity changes occured during array/string assignments. This
is now gone and original capacity remains, as it should.

So this fix had huge impact for scripting and use of arrays. Any user
of pre-1.10.2 which uses array assignments in scripting should apply
this patch.

Peter