In our project, we have a C++ component that launches other components
through a Lua start script. When running this component under a gnulinux
rttlua deployer, everything works well. Also, all components involved run
fine under the non-rttlua Xenomai deployer (we're trying to move from ops
scripts to the rttlua deployer).
However, when we try to run our system under Xenomai and the rttlua
deployer, we get a segfault.
Here is the Lua script (up to the line which segfaults):
RTTLua crashing when trying to create a component under Xenomai
Hi Jonathan,
This is a known issue for the readline + Xenomai combo. The
TaskBrowser.cpp contains the official work-around/solution to this.
So basically copying the snippets in the
#if defined(USE_SIGNALS) && defined(OROCOS_TARGET_XENOMAI) &&
CONFIG_XENO_VERSION_MAJOR == 2 && CONFIG_XENO_VERSION_MINOR >= 5
to the LuaComponent.cpp should do the trick (USE_SIGNALS should always
be true, also check for USE_READLINE or similar)
The idea of this solution is to always catch the sigwinch signal,
which readline *and* xenomai use, and pass it on to xenomai if xenomai
is used.
The other workaround is to first initialize readline and then xenomai,
but that is not so easy with the existing Orocos main function.
Peter
On Fri, Dec 7, 2012 at 7:08 PM, Johnathan Van Why <jrvanwhy [..] ...> wrote:
> In our project, we have a C++ component that launches other components
> through a Lua start script. When running this component under a gnulinux
> rttlua deployer, everything works well. Also, all components involved run
> fine under the non-rttlua Xenomai deployer (we're trying to move from ops
> scripts to the rttlua deployer).
>
> However, when we try to run our system under Xenomai and the rttlua
> deployer, we get a segfault.
>
> Here is the Lua script (up to the line which segfaults):
>