-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr , dynamic_cast Fail #696
Comments
@Chris-166 Could you provide reproducible colcon project to make this problem happen? having android system is hard for us, that would be really appreciated. |
@fujitatomoya We are currently not reproducing this issue on the colcon project. We want to change the "dynamic_cast" in the following code to "static_cast".
after modification: Are there any risks with this modification?Please help to evaluate, Thanks. |
@fujitatomoya For the "dynamic_cast fail", do you have any debugging directions? |
This comment was marked as off-topic.
This comment was marked as off-topic.
@iuhilnehc-ynos Null pointer protection can only prevent the program from crashing, but the program function will be affected.
"NOTE: Without enough information, it's hard to know why the dynamic_cast failed." |
Currently, it's OK.
It seems they're the correct type.
I am not sure if you build some libraries with |
Oh, I see you used the |
this should be no problem, it can downcast to
this only means that it still can access to |
Exception Cases:
2023-06-01 19:01:15.222 7052-7052 E/rmw_fastrtps_shared_cpp: utils.cpp#cast_or_create_topic, desc name = rt/chatter, type = std_msgs::msg::dds_::String_ |
I'd like to share two links with you. https://developer.android.com/ndk/guides/common-problems#rttiexceptions_not_working_across_library_boundaries Maybe you need to update the I am not sure, I didn't test it. |
Thank you for your reply! But I did not understand the description of this exception. Could you please provide me with the patch first to directly verify your doubts? |
``
Note:The complete compilation script is as follows:
|
I guess you used the branch |
Thank you. |
Using this patch, |
@Chris-166 we are not using android to our platform, and which is not officially supported with ROS 2. (https://docs.ros.org/en/rolling/Releases/Release-Rolling-Ridley.html) you can keep this issue open I guess, but we are not gonna be able to help you out on this soon. |
@Chris-166 friendly ping, otherwise i would like to close this issue since Android is not supported platform. |
Bug report
11149 11149 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x70 in tid 11149
06-01 19:19:03.665 11194 11194 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-01 19:19:03.665 11194 11194 F DEBUG : Revision: '0'
06-01 19:19:03.665 11194 11194 F DEBUG : ABI: 'arm64'
06-01 19:19:03.665 11194 11194 F DEBUG : Timestamp: 2023-06-01 19:19:03+0800
06-01 19:19:03.665 11194 11194 F DEBUG : uid: 10148
06-01 19:19:03.665 11194 11194 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x70
06-01 19:19:03.665 11194 11194 F DEBUG : Cause: null pointer dereference
06-01 19:19:03.665 11194 11194 F DEBUG : x0 000000705a8a42e8 x1 0000000000000068 x2 0000007fd0efc0c0 x3 00000070fa842f48
06-01 19:19:03.665 11194 11194 F DEBUG : x4 0000007fd0efc0a0 x5 0000007fd0efc0a9 x6 726574746168632f x7 726574746168632f
06-01 19:19:03.665 11194 11194 F DEBUG : x8 0000000000000000 x9 0000000000000000 x10 0000000000000001 x11 0000000000000000
06-01 19:19:03.665 11194 11194 F DEBUG : x12 7fffffffffffffff x13 fffffffffc000000 x14 0000000000000060 x15 0000000000400000
06-01 19:19:03.665 11194 11194 F DEBUG : x16 00000070666a6c08 x17 000000706638afc4 x18 00000070fb1fc000 x19 000000705a8a4300
06-01 19:19:03.665 11194 11194 F DEBUG : x20 0000007fd0efbe58 x21 000000705a8a3c00 x22 0000000000000068 x23 00000070fa842f48
06-01 19:19:03.665 11194 11194 F DEBUG : x24 0000007fd0efc0c0 x25 00000070faa9b020 x26 0000000000000001 x27 000000706af5f2c8
06-01 19:19:03.665 11194 11194 F DEBUG : x28 00000070fa780fe0 x29 0000007fd0efbdb0
---> [initial analysis]
https://github.com/eProsima/Fast-DDS/blob/2.8.x/src/cpp/fastdds/publisher/PublisherImpl.cpp
DataWriter* PublisherImpl::create_datawriter(
Topic* topic,
const DataWriterQos& qos,
DataWriterListener* listener,
const StatusMask& mask)
{
logInfo(PUBLISHER, "CREATING WRITER IN TOPIC: " << topic->get_name()); // topic is null
//Look for the correct type registration
TypeSupport type_support = participant_->find_type(topic->get_type_name());
...
}
bool
cast_or_create_topic(
eprosima::fastdds::dds::DomainParticipant * participant,
eprosima::fastdds::dds::TopicDescription * desc,
const std::string & topic_name,
const std::string & type_name,
const eprosima::fastdds::dds::TopicQos & topic_qos,
bool is_writer_topic,
TopicHolder * topic_holder)
{
...
...
}
The text was updated successfully, but these errors were encountered: