Open YUKINA-3252 opened 2 years ago
Why it crashes:
While ros::roseus
is trying to connect with the master, the eus node is not responsive to C-c interruptions. This is because the eus sigint handler will only set a flag on C-c, and then activate the new prompt on calls to breakck
. In time-extensive operations we would usually set a smaller timeout, and loop for trials and breakck
s. However, ros::init
doesn't appear to have a timeout option. A solution for this would be to register separate sigint handlers during and after the master connection, but I am not sure if the ability to interrupt a ros::roseus
call is worth the changes.
https://github.com/jsk-ros-pkg/jsk_roseus/blob/master/roseus/roseus.cpp#L655
http://wiki.ros.org/roscpp/Overview/Initialization%20and%20Shutdown
Meanwhile, the emacs client in euslime sends an sigint to the euslisp process and assumes that the process is responsive. Trying to evaluate another request during this time will force the emacs buffer into waiting a response from the euslisp process, which in this case won't come until successfully connected to the master. Thus, leading to a crash.
I'll take a look if there is a way for the emacs client to assert if the console is responsive or not before sending requests.
I have added a 0.5s timeout to interruption requests in https://github.com/jsk-ros-pkg/euslime/commit/8098612ad8ed8e7abca4375a247f1b4de88fa357 This way the emacs window will not crash even if the emacs process is not responsive.
Describe the bug Emacs crashes
To Reproduce without a proper master:
Log *slime-events*
Log *inferior-lisp*