Guest User

Untitled

a guest
Oct 19th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. # Error related to segmentation fault
  2.  
  3. * In computing, a segmentation fault (often shortened to segfault) or access violation is a fault,
  4. or failure condition, raised by hardware with
  5. memory protection, notifying an
  6. operating system (OS) the software has attempted to access a restricted area of memory (a memory access violation).
  7.  
  8. * But how the hell do we know where the hell we are accessing the restricted area.
  9.  
  10. * It is a very difficult error to solve, different from its cousin syntax fault which will will indicate where is the problem.
  11.  
  12. * One way is to print something after every code block where there is a possibility of error.
  13.  
  14. * Then one can know after which code block there is problem.
  15.  
  16. * One precaution that one should take is that do not do anything with the subscribed image from the topic with the command ```newframe = cv_bridge::toCvShare(msg, "bgr8")->image``` in any ```task_handler``` node,
  17. because anything changed to it will also change the raw ros image which we are getting from the topic ,which results into a segmentation fault.
  18.  
  19. * That was the reason of 5 hours of irritation and anxiety.
Add Comment
Please, Sign In to add comment