Skip to content
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

gazebo_ros_api_plugin: improve plugin xml parsing when spawning model (lunar-devel) #627

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

j-rivero
Copy link
Contributor

{ port of pull request #584 }
Spawning a model with an xml comment that starts with plugin causes a seg-fault:
<!--plugin-->
or
<!--plugin filename="lib.so"/-->
Checking the Type() prevents trying to add child elements to xml comments, which is the source of the seg-fault. I also switched from find to compare to make sure that only <plugin> blocks are affected instead of elements that start with plugin like <plugin1>, <pluginCustom>, etc.

It should be easy to add a test for this that just spawns some simple models with these xml tags added.

Here's the backtrace I was seeing:

An xml comment that start with plugin causes a seg-fault:
<!--plugin-->
or
<!--plugin filename="lib.so"/-->
This fixes the xml parsing to not try to add child elements
to xml comments.
@j-rivero
Copy link
Contributor Author

@osrf-jenkins run tests please

@j-rivero j-rivero merged commit 50b52f5 into lunar-devel Nov 28, 2017
@scpeters scpeters deleted the lunar-devel-transplant-584 branch December 15, 2017 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants