-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault from subscriber defined in dotimes #579
Comments
We found
|
It looks like this is related to some of the existing issues: This problem is originated from the limitation of euslisp: a closure is unsupported. As seen in the link below, In the example you mentioned, this problem can be avoided by changing codes like below for example: (ros::roseus "test" :anonymous nil)
(setq test-list (list 1 2))
(setq topics (list "~test1" "~test2"))
(dotimes (i (length test-list))
(ros::subscribe (elt topics i) std_msgs::Bool
`(lambda-closure () 0 0 (a msg) (print (elt test-list a))) i 1))
(ros::spin) |
related to euslisp/EusLisp#147 (comment) ? |
I think so. This issue comes from the known issue. |
I want to define multiple subscribers by
dotimes
, but that trial failed with segmentation fault.Here is the simple sample code:
When I published to
/test/test1
or/test/test2
, segmentation fault occurs.Debugging with @Affonso-Gui found the following code also occurs segmentation fault:
When we erase local variable
b
, add one more argument tolambda
fuction, or don't use global variablevar
, segmentation fault doesn't occur.The text was updated successfully, but these errors were encountered: