Closed vmayoral closed 10 years ago
The backtrace shared previously appears when stepping through the code. If not the following bt appears:
#0 0x08023b4c in xt_type_delete (tp=0x20000340 <dt_byte>) at ../../../dds/src/xtypes/xtypes.c:2711
#1 0x08038338 in tsm_create_array (lp=0x100047b8, tsm=0x1000327c, iflags=0x10003288) at ../../../dds/src/xtypes/tsm.c:343
#2 0x0803854a in tsm_create_type (lp=0x100047b8, tsm=0x1000327c, iflags=0x10003288) at ../../../dds/src/xtypes/tsm.c:452
#3 0x08037e6c in tsm_create_struct_union (lp=0x100047b8, tsm=0x1000327c, iflags=0x10003288) at ../../../dds/src/xtypes/tsm.c:142
#4 0x0801e316 in DDS_DynamicType_register (tc=0x809f804 <dds_participant_msg_tsm+56>) at ../../../dds/src/xtypes/xtypecode.c:208
#5 0x0807f030 in msg_init () at ../../../dds/src/disc/disc_msg.c:193
#6 0x08081eb2 in spdp_init () at ../../../dds/src/disc/disc_spdp.c:91
#7 0x08053f02 in disc_init () at ../../../dds/src/disc/disc_main.c:992
#8 0x08015c56 in dds_init () at ../../../dds/src/dds/dds.c:1420
#9 0x08044024 in DDS_DomainParticipantFactory_create_participant (domain=0, qos=0x0, listener=0x0, mask=(unknown: 0))
at ../../../dds/src/dcps/dcps_dpfact.c:76
#10 0x08011064 in dds_chat_main (argc=1, argv=0x10003754) at main.c:532
#11 0x0800348e in task_start () at task/task_start.c:139
#12 0x00000000 in ?? ()
This issue needs to be further inspected. For the time being the hack at https://github.com/vmayoral/ros2_embedded_nuttx/commit/e96c6b90ee1ba7d4e9cfdf1fc65d5de2920d20ab allows to continue with development.
There're now two issues with the mutexes. Refer to the hack performed at https://github.com/ros2/ros2_embedded_nuttx/commit/e96c6b90ee1ba7d4e9cfdf1fc65d5de2920d20ab.
The last issue (second) was fixed with https://github.com/ros2/ros2_embedded_nuttx/commit/87f4e564ff99251112231de031802b9b1f687464. There still remains the issue described at the beginning.
Apparently the call at https://github.com/ros2/ros2_embedded_nuttx/blob/master/dds/src/dds/dds.c#L1420 requires a previous call to thread_init
(in order to init rclock
mutex). 3371cdf3e0503227a4fbc31c1fde7892219b2147 provides a solution.
There's some issue in the code in this line https://github.com/vmayoral/ros2_embedded_nuttx/blob/master/nuttx/sched/pthread/pthread_mutexlock.c#L166.