The DVS adapter should provide three outgoing ports: "out_on" for on-events, "out_off" for off-events and "out" for both kinds of events.
When providing all three ports (see implementation), but not connecting all of them, a SegFault in MUSIC arises, when entering the runtime:
[node16:30140] *** Process received signal ***
[node16:30140] Signal: Segmentation fault (11)
[node16:30140] Signal code: (128)
[node16:30140] Failing at address: (nil)
[node16:30140] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf890) [0x7f72c657e890]
[node16:30140] [ 1] /home/hoff/.local/lib/libmusic.so.1(_ZN5MUSIC15EventOutputPort10buildTableEv+0x29) [0x7f72c9575d79]
[node16:30140] [ 2] /home/hoff/.local/lib/libmusic.so.1(_ZN5MUSIC7Runtime11buildTablesEPNS_5SetupE+0x24) [0x7f72c9553db4]
[node16:30140] [ 3] /home/hoff/.local/lib/libmusic.so.1(_ZN5MUSIC7RuntimeC1EPNS_5SetupEd+0x2cc) [0x7f72c955483c]
[node16:30140] [ 4] music(_ZN10DVSAdapter11runROSMUSICEv+0x105) [0x40e5b5]
[node16:30140] [ 5] music(main+0x9b) [0x40d6fb]
[node16:30140] [ 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f72c57b9b45]
[node16:30140] [ 7] music() [0x40d828]
[node16:30140] *** End of error message ***
The MUSIC code on the DVS adapter side looks like this:
// [...]
port_out = initOutput("out", width_);
// TODO MUSIC bug ...
port_out_polarity[true] = NULL; // initOutput("out_on", width_);
port_out_polarity[false] = NULL; // initOutput("out_off", width_);
}
MUSIC::EventOutputPort* DVSAdapter::initOutput(std::string name, int &width)
{
MUSIC::EventOutputPort* port = setup->publishEventOutput(name);
if (port->isConnected())
{
if (not port->hasWidth())
{
std::cout << "ERROR: port " << name << " has no width" << std::endl;
comm.Abort(2);
}
int width_ = port->width();
if (width != -1 and width_ != width)
{
std::cout << "ERROR: node has inconsistent output widths (" << width << " != " << width_ << ")" << std::endl;
comm.Abort(3);
}
width = width_;
// map linear index to event out port
MUSIC::LinearIndex l_index_out(0, width_);
port->map(&l_index_out, MUSIC::Index::GLOBAL, 1);
}
else
{
port = NULL;
}
return port;
}
This issue shall document the problem in the implementation until a fix is available.
@mdjurfeldt @weidel-p FYI
The DVS adapter should provide three outgoing ports: "out_on" for on-events, "out_off" for off-events and "out" for both kinds of events.
When providing all three ports (see implementation), but not connecting all of them, a SegFault in MUSIC arises, when entering the runtime:
The MUSIC code on the DVS adapter side looks like this:
This issue shall document the problem in the implementation until a fix is available.
@mdjurfeldt @weidel-p FYI