Closed vmayoral closed 10 years ago
fds
variable gets corrupted:
(gdb) p fds[0]
$8 = {fd = 0, sem = 0x2000e1fc <g_mmheap+208>, events = 25 '\031', revents = 0 '\000', priv = 0xbc6b6eaa}
(gdb) p fds[1]
$9 = {fd = 9, sem = 0xce38d526, events = 25 '\031', revents = 0 '\000', priv = 0x7d278190}
(gdb) p fds[2]
$10 = {fd = 10, sem = 0x976206fc, events = 25 '\031', revents = 0 '\000', priv = 0x8e761cfd}
(gdb) p fds[3]
$11 = {fd = 11, sem = 0x16f9febc, events = 25 '\031', revents = 0 '\000', priv = 0x3e3d7bdb}
(gdb) p fds[4]
$12 = {fd = 12, sem = 0xbfd7f4fd, events = 25 '\031', revents = 0 '\000', priv = 0xb1e5e72a}
(gdb) p fds[5]
$13 = {fd = 0, sem = 0x5437b3fe, events = 29 '\035', revents = 0 '\000', priv = 0x5f2e13dd}
But we expect to have fd=4
in the first position (0). It's populated as 4 but for some reason it's set to 0 as soon as the second position (1) of fds is populated.
The last position (5) is created by the do_chat application. Needs to be further inspected. File descriptors with value 0 are causing issues with stdinput.
Currently the issue has been narrowed down to a problem with the STM32 Ethernet driver. Refer to https://github.com/brunodebus/tinq-core/issues/7
2f5c0b4bfb4280be23a413784edd856176c3bf80 fixes the issue. The code now receives all the packages
The implementation https://github.com/ros2/ros2_embedded_nuttx/commit/37ef52ad574ffc93e25f05983eccaaf2212678cf receives packages but they are not processed appropiately by the underlaying DDS system. Needs to be inspected.