SICKAG / sick_safetyscanners_base

CPP (C++) Driver for SICK safety laser scanners
https://www.sick.com/de/en/opto-electronic-protective-devices/safety-laser-scanners/c/g187225
Apache License 2.0
12 stars 32 forks source link

Program crashes occasionally with "Segmentation fault" error related to parseUDPSequence() #13

Closed Einslyn closed 1 year ago

Einslyn commented 1 year ago

Our program uses Sick nanoScan3 radar and works fine most of the time. However our embedded system has a small probability of crashing, which is related to this API sick::data_processing::ParseMeasurementData::parseUDPSequence(). The probability of the crashing may be once every 3 days or not.

I haven't pulled the latest code, because the old version has been running very stable. Do I need to update the code?

Is this issue a known issue or has it been resolved?

No warnnings or erros message related to Sick, before the crashing log. Here is the log:

Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]: *** Aborted at 1660883506 (unix time) try "date -d @1660883506" if you are using GNU date ***
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]: PC: @   0x6ef25c sick::data_processing::ParseMeasurementData::parseUDPSequence()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]: *** SIGSEGV (@0xafb00000) received by PID 618 (TID 0x9dbe0440) from PID 18446744072362131456; stack trace: ***
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @ 0xb5a95b10 (unknown)
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x6ef25c sick::data_processing::ParseMeasurementData::parseUDPSequence()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x6ea050 sick::data_processing::ParseData::setMeasurementDataInData()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x6eb2f2 sick::data_processing::ParseData::parseUDPSequence()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x6df76a sick::SickSafetyscanners::processUDPPacket()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x6e8e2c _ZN5boost4asio6detail27reactive_socket_recvfrom_opINS0_17mutable_buffers_1ENS0_2ip14basic_endpointINS4_3udpEEEZN4sick13communication14AsyncUDPClient12startReceiveEvEUlNS_6system10error_codeEjE_E11do_completeEPNS1_15task_io_serviceEPNS1_25task_io_service_operationERKSC_j
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x3b9d74 boost::asio::detail::epoll_reactor::descriptor_state::do_complete()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @   0x6de8f6 sick::SickSafetyscanners::UDPClientThread()
Aug 19 12:31:46 apalis-tk1-mainline startup.sh[348]:     @ 0xb6ec57d4 (unknown)
Aug 19 12:31:47 apalis-tk1-mainline ui_server_start.sh[445]: 192.168.213.254:53902 - - [19/Aug/2022 12:31:47] "HTTP/1.1 GET /api/v0/map/TIANMA/meta" - 200 OK
Aug 19 12:32:04 apalis-tk1-mainline startup.sh[348]: /sros/bin/startup.sh: line 689:   618 Segmentation fault      (core dumped) ${SROS_ROOT}/bin/sros --log_path=${SROS_ROOT}/log/

Thank you very much for your reply.

puck-fzi commented 1 year ago

Hi,

please use the updated code. There are always some minor fixes which might improve your experience. Otherwise please provide a stack trace using gdb or similar, to determine where the segfault is happening.

puck-fzi commented 1 year ago

Since this was on older code and there was no update I am closing this. Please open a new issue if the error persists.