0
$\begingroup$

Rosanswers logo

Why am I getting this after pressing "Ctrl+C"?

Warning: recursive print statement has occurred. Throwing out recursive print.

Warning: recursive print statement has occurred. Throwing out recursive print.

forever

I can't stop it!


Originally posted by ubuntuslave on ROS Answers with karma: 347 on 2011-06-20

Post score: 4


Original comments

Comment by Felix Endres on 2011-06-20:
nice, didn't know that :-)

Comment by Lorenz on 2011-06-20:
Even quicker fix: CTRLl-\ to directly send a sigkill.

Comment by Felix Endres on 2011-06-20:
I have seen this being discussed (and fixed) for nodelets, but for me it happens also for regular nodes. Quick Fix: Ctrl+Z to send process to background, Then "kill %1" to kill the background process.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Perhaps you don't check for ros::ok()? If you don't, then Ctrl-C won't kill your node.


Originally posted by Martin Günther with karma: 11816 on 2011-06-20

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Martin Günther on 2011-06-21:
Yes, spin() does the ros::ok() check.

Comment by Felix Endres on 2011-06-20:
I have the problem too. I'm using the multithreaded spinner (but I think I also had it with other spinners), so I'm just calling spin(), which should to the ros::ok check, shouldn't it?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.