OpenDDS / OpenDDS

OpenDDS is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). OpenDDS also supports Java bindings through JNI.
http://www.opendds.org
Other
1.28k stars 463 forks source link

A problem when using OpenDDS in Simulink #4582

Closed NawTun closed 1 month ago

NawTun commented 1 month ago

I used a s-function to implement an OpenDDS application in Simulink. This application can read and write data as expected, but matlab will crash when the s-function runs again. Matlab crashs when execute this _narrow function: bustwoInputs_reader_i = bustwo::inputsDataReader::_narrow(bustwoInputs_reader); A part of stack trace is as follws:

[  0] 0x00007fff61b0eb09        E:\OpenDDS-3.26.1\ACE_wrappers\lib\ACEd.dll+02681609 ACE_Configuration_Win32Registry::enumerate_values+01529406
[  1] 0x00007ffec567d579            E:\OpenDDS-3.26.1\lib\OpenDDS_Dcpsd.dll+12047737 OpenDDS::DCPS::getMetaStruct<DDS::PublicationMatchedStatus>+04362850
[  2] 0x00007ffec55d9a75            E:\OpenDDS-3.26.1\lib\OpenDDS_Dcpsd.dll+11377269 OpenDDS::DCPS::getMetaStruct<DDS::PublicationMatchedStatus>+03692382
[  3] 0x00007fff463c0847        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+03475527 OpenDDS::DCPS::DataReaderImpl_T<bustwo::inputs>::purge_data+00000103
[  4] 0x00007fff462b29c3        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+02369987 OpenDDS::DCPS::DataReaderImpl_T<bustwo::inputs>::~DataReaderImpl_T<bustwo::inputs>+00001347
[  5] 0x00007fff462f77e8        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+02652136 OpenDDS::DCPS::DataReaderImpl_T<bustwo::inputs>::`vbase destructor'+00000040
[  6] 0x00007fff462fe80c        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+02680844 OpenDDS::DCPS::DataReaderImpl_T<bustwo::inputs>::`scalar deleting destructor'+00000044
[  7] 0x00007ffec53204e4            E:\OpenDDS-3.26.1\lib\OpenDDS_Dcpsd.dll+08520932 OpenDDS::DCPS::getMetaStruct<DDS::PublicationMatchedStatus>+00836045
[  8] 0x00007fff4634b473        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+02995315 OpenDDS::DCPS::LocalObjectBase::_remove_ref+00000067
[  9] 0x00007fff49643fc3        E:\OpenDDS-3.26.1\ACE_wrappers\lib\TAOd.dll+02047939 TAO::unbounded_basic_string_sequence<char>::release+01091232
[ 10] 0x00007fff461d8e4d        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+01478221 CORBA::release<bustwo::inputsDataReader *>+00000077
[ 11] 0x00007fff461e386b        D:\onedrive\AVIC\bus2bus\BusoneDDS_Idld.dll+01521771 TAO::Objref_Traits<bustwo::inputsDataReader>::release+00000043
[ 12] 0x00007ff81be05c86          D:\onedrive\AVIC\bus2bus\busoneDDS.mexw64+00023686 mexFunction+00010310
[ 13] 0x00007ff81be033b2          D:\onedrive\AVIC\bus2bus\busoneDDS.mexw64+00013234

How can I solve this issue?

mitza-oci commented 1 month ago

The large offsets such as getMetaStruct<DDS::PublicationMatchedStatus>+04362850 are a hint that debug information was not used to make the stack trace. It's going to be difficult to offer any help without it.