http://bugs.orocos.org/show_bug.cgi?id=945
Summary: Can't self-configure/start a LuaComponent
Product: Toolchain
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P3
Component: Lua
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
When loading a .lua file you can't start 'tc'. For example:
require "rttlib"
tc=rtt.getTC()
tc:configure() -- hangs here
The reason is that a plain RTT::os::Mutex is used in LuaComponent instead of a
RTT::os::MutexRecursive
I think it should be able to self-configure and self-start, just like you can
do in a C++ component.
[Bug 945] Can't self-configure/start a LuaComponent
http://bugs.orocos.org/show_bug.cgi?id=945
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
[Bug 945] New: Can't self-configure/start a LuaComponent
On Wed, Apr 18, 2012 at 04:34:11PM +0000, Peter Soetens wrote:
>
> http://bugs.orocos.org/show_bug.cgi?id=945
>
> Summary: Can't self-configure/start a LuaComponent
> Product: Toolchain
> Version: master
> Platform: All
> OS/Version: All
> Status: NEW
> Severity: major
> Priority: P3
> Component: Lua
> AssignedTo: orocos-dev [..] ...
> ReportedBy: peter [..] ...
> CC: orocos-dev [..] ...
> Estimated Hours: 0.0
>
>
> When loading a .lua file you can't start 'tc'. For example:
>
> require "rttlib"
>
> tc=rtt.getTC()
>
> tc:configure() -- hangs here
>
> The reason is that a plain RTT::os::Mutex is used in LuaComponent instead of a
> RTT::os::MutexRecursive
>
> I think it should be able to self-configure and self-start, just like you can
> do in a C++ component.
Ack! Patch welcome...
Markus
[Bug 945] New: Can't self-configure/start a LuaComponent
On Thu, Apr 19, 2012 at 10:34:27AM +0200, Markus Klotzbuecher wrote:
> On Wed, Apr 18, 2012 at 04:34:11PM +0000, Peter Soetens wrote:
> >
> > http://bugs.orocos.org/show_bug.cgi?id=945
> >
> > Summary: Can't self-configure/start a LuaComponent
> > Product: Toolchain
> > Version: master
> > Platform: All
> > OS/Version: All
> > Status: NEW
> > Severity: major
> > Priority: P3
> > Component: Lua
> > AssignedTo: orocos-dev [..] ...
> > ReportedBy: peter [..] ...
> > CC: orocos-dev [..] ...
> > Estimated Hours: 0.0
> >
> >
> > When loading a .lua file you can't start 'tc'. For example:
> >
> > require "rttlib"
> >
> > tc=rtt.getTC()
> >
> > tc:configure() -- hangs here
> >
> > The reason is that a plain RTT::os::Mutex is used in LuaComponent instead of a
> > RTT::os::MutexRecursive
> >
> > I think it should be able to self-configure and self-start, just like you can
> > do in a C++ component.
>
> Ack! Patch welcome...
Nack! I just remembered why this is not allowed: if you call yourself
your are going from Lua to C++ and back into the same Lua. However the
interpreter virtual stack and state is setup to expect the C++ call to
return and not to receive a new call. Strange things would happen...
Markus
[Bug 945] New: Can't self-configure/start a LuaComponent
On Tue, Apr 24, 2012 at 04:05:09PM +0200, Markus Klotzbuecher wrote:
> On Thu, Apr 19, 2012 at 10:34:27AM +0200, Markus Klotzbuecher wrote:
> > On Wed, Apr 18, 2012 at 04:34:11PM +0000, Peter Soetens wrote:
> > >
> > > http://bugs.orocos.org/show_bug.cgi?id=945
> > >
> > > Summary: Can't self-configure/start a LuaComponent
> > > Product: Toolchain
> > > Version: master
> > > Platform: All
> > > OS/Version: All
> > > Status: NEW
> > > Severity: major
> > > Priority: P3
> > > Component: Lua
> > > AssignedTo: orocos-dev [..] ...
> > > ReportedBy: peter [..] ...
> > > CC: orocos-dev [..] ...
> > > Estimated Hours: 0.0
> > >
> > >
> > > When loading a .lua file you can't start 'tc'. For example:
> > >
> > > require "rttlib"
> > >
> > > tc=rtt.getTC()
> > >
> > > tc:configure() -- hangs here
> > >
> > > The reason is that a plain RTT::os::Mutex is used in LuaComponent instead of a
> > > RTT::os::MutexRecursive
> > >
> > > I think it should be able to self-configure and self-start, just like you can
> > > do in a C++ component.
> >
> > Ack! Patch welcome...
>
> Nack! I just remembered why this is not allowed: if you call yourself
> your are going from Lua to C++ and back into the same Lua. However the
> interpreter virtual stack and state is setup to expect the C++ call to
> return and not to receive a new call. Strange things would happen...
Un-Nack, I was wrong! Recursive self-calls are legal and even common
in Lua (just confirmed it on the Lua ML), (which also makes sense as
by calling into C we cleanly leave the Lua state). So you patch
switching to recusive mutexes would be welcome again :-)
Markus
[Bug 945] New: Can't self-configure/start a LuaComponent
What a suspens ^^
2012/4/27 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>:
> On Tue, Apr 24, 2012 at 04:05:09PM +0200, Markus Klotzbuecher wrote:
>> On Thu, Apr 19, 2012 at 10:34:27AM +0200, Markus Klotzbuecher wrote:
>> > On Wed, Apr 18, 2012 at 04:34:11PM +0000, Peter Soetens wrote:
>> > >
>> > > http://bugs.orocos.org/show_bug.cgi?id=945
>> > >
>> > > Summary: Can't self-configure/start a LuaComponent
>> > > Product: Toolchain
>> > > Version: master
>> > > Platform: All
>> > > OS/Version: All
>> > > Status: NEW
>> > > Severity: major
>> > > Priority: P3
>> > > Component: Lua
>> > > AssignedTo: orocos-dev [..] ...
>> > > ReportedBy: peter [..] ...
>> > > CC: orocos-dev [..] ...
>> > > Estimated Hours: 0.0
>> > >
>> > >
>> > > When loading a .lua file you can't start 'tc'. For example:
>> > >
>> > > require "rttlib"
>> > >
>> > > tc=rtt.getTC()
>> > >
>> > > tc:configure() -- hangs here
>> > >
>> > > The reason is that a plain RTT::os::Mutex is used in LuaComponent instead of a
>> > > RTT::os::MutexRecursive
>> > >
>> > > I think it should be able to self-configure and self-start, just like you can
>> > > do in a C++ component.
>> >
>> > Ack! Patch welcome...
>>
>> Nack! I just remembered why this is not allowed: if you call yourself
>> your are going from Lua to C++ and back into the same Lua. However the
>> interpreter virtual stack and state is setup to expect the C++ call to
>> return and not to receive a new call. Strange things would happen...
>
> Un-Nack, I was wrong! Recursive self-calls are legal and even common
> in Lua (just confirmed it on the Lua ML), (which also makes sense as
> by calling into C we cleanly leave the Lua state). So you patch
> switching to recusive mutexes would be welcome again :-)
>
> Markus
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev