Earthwings/annotate

Crash during annotation

OrangeJuice3211 opened this issue · 9 comments

[rviz-2] process has died [pid 1048166, exit code -6, cmd /opt/ros/noetic/lib/rviz/rviz -d /home/dell/PytorchWorkspace/annotate_ws/src/annotate/launch/demo.rviz __name:=rviz __log:=/home/dell/.ros/log/71712548-97d2-11ee-971c-9b50c91f07af/rviz-2.log].
log file: /home/dell/.ros/log/71712548-97d2-11ee-971c-9b50c91f07af/rviz-2*.log

Can you provide more details? E.g. more log output, what have you been doing before the crash occurred, does it happen every time or just once?

Thank you for your reply. It always happens when I create a new annotate box and try to change its shape, but everything works fine when I just change the position of the annotate box.
OS:Ubuntu 20.04
ROS:Noetic

[rosmaster.threadpool][ERROR] 2023-12-11 11:11:25,648: Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rosmaster/threadpool.py", line 218, in run
result = cmd(*args)
File "/opt/ros/noetic/lib/python3/dist-packages/rosmaster/master_api.py", line 210, in publisher_update_task
ret = xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in call
return self.__send(self.__name, args)
File "/usr/lib/python3.8/xmlrpc/client.py", line 1450, in __request
response = self.__transport.request(
File "/usr/lib/python3.8/xmlrpc/client.py", line 1153, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.8/xmlrpc/client.py", line 1169, in single_request
return self.parse_response(resp)
File "/usr/lib/python3.8/xmlrpc/client.py", line 1341, in parse_response
return u.close()
File "/usr/lib/python3.8/xmlrpc/client.py", line 655, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -1: 'publisherUpdate: unknown method name'>

To investigate whether it is an issue related to the operating system version, I installed Ubuntu 18.04 and ROS Melodic in VMware Workstations. However, the initial crash and error problems persist, and there is an additional error message: "terminate called after throwing an instance of 'std::runtime_error' what(): Duration is out of dual 32-bit range." It usually occurs when switching to TopDownOrthodox(rviz), moving the annotation box, and then switching back to ThirdPersonFollower(rviz) and clicking on the annotation box. Thank you for your time!
7026012244696

Great, this helps a lot. This error usually occurs when creating ros::Time instances with invalid values. I have fixed similar errors before - seems I didn't catch all yet.

line 752 in src/annotation_marker.cpp
time_offsets += point_time - context.time;
As an attempt, I changed it to the following code:

time_offsets += (point_time >= context.time) ? (point_time - context.time) : (context.time - point_time);

but the error still persisted。So, I tried to change the code as follows:

if (point_time >= context.time)
  time_offsets += point_time - context.time;
else
  return context;

the error disappeared, but it looks very strange when i adjusting the shape of 3D box.
It would be greatly appreciated if you could provide some suggestions on how to identify the areas that need modification and fix this error.

Thanks for tracking it down. I wonder if context.time or point_time is_zero() is true here. This would cause the error and would require a special case also (probably do not update time_offsets if one is zero).

Thank you very much, I think I have fixed the error.

Thanks for tracking it down. I wonder if context.time or point_time is_zero() is true here. This would cause the error and would require a special case also (probably do not update time_offsets if one is zero).

You are right,the following code fixed this:

if (point_time >= context.time)
  time_offsets += point_time - context.time;