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

Segmentation Fault in sdf::getBestSupportedModelVersion #152

Closed
osrf-migration opened this issue Mar 22, 2017 · 7 comments
Closed

Segmentation Fault in sdf::getBestSupportedModelVersion #152

osrf-migration opened this issue Mar 22, 2017 · 7 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Dominic Jud (Bitbucket: djud).


Since the last update of sdformat4, there is a segmentation fault occurring that was not there before the update. I'm using gazebo7 and Ubuntu 14.04. The backtrace goes to sdf::getBestSupportedModelVersion.

Log with the backtrace from GDB when running gazebo:

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106	../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff4eaf485 in sdf::getBestSupportedModelVersion(TiXmlElement*, std::string&) ()
   from /usr/lib/x86_64-linux-gnu/libsdformat.so.4
#2  0x00007ffff4eafaae in sdf::getModelFilePath(std::string const&) () from /usr/lib/x86_64-linux-gnu/libsdformat.so.4
#3  0x00007ffff4eb7a7d in sdf::readXml(TiXmlElement*, std::shared_ptr<sdf::Element>) () from /usr/lib/x86_64-linux-gnu/libsdformat.so.4
#4  0x00007ffff4eb54ec in sdf::readXml(TiXmlElement*, std::shared_ptr<sdf::Element>) () from /usr/lib/x86_64-linux-gnu/libsdformat.so.4
#5  0x00007ffff4eb7ff4 in sdf::readDoc(TiXmlDocument*, std::shared_ptr<sdf::SDF>, std::string const&) ()
   from /usr/lib/x86_64-linux-gnu/libsdformat.so.4
#6  0x00007ffff4eb89d8 in sdf::readFile(std::string const&, std::shared_ptr<sdf::SDF>) () from /usr/lib/x86_64-linux-gnu/libsdformat.so.4
#7  0x00007ffff7baedb4 in gazebo::Server::LoadFile(std::string const&, std::string const&) ()
   from /usr/lib/x86_64-linux-gnu/libgazebo.so.7
#8  0x00007ffff7bb088c in gazebo::Server::ParseArgs(int, char**) () from /usr/lib/x86_64-linux-gnu/libgazebo.so.7
#9  0x00000000004024c9 in ?? ()
#10 0x00007ffff6890f45 in __libc_start_main (main=0x4023e0, argc=10, argv=0x7fffffffc268, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffc258) at libc-start.c:287
#11 0x0000000000402a38 in _start () 

@scpeters As the author of the related PR: Is this a general bug or might it be a problem specific to me?

@osrf-migration
Copy link
Author

Original comment by Dominic Jud (Bitbucket: djud).


This is resolved. The issue was that we had an old definition of a sun where in the
model.config we still had <sdf>model.sdf</sdf> causing the seg fault instead of <sdf version="1.5">model.sdf</sdf>.

@osrf-migration
Copy link
Author

Original comment by Dominic Jud (Bitbucket: djud).


  • changed state from "new" to "resolved"

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


A similar issue has been posted on Gazebo:

https://bitbucket.org/osrf/gazebo/issues/2238/gzserver-or-gazebo-76-crashes-on-startup

We should try to handle this better so there are no crashes.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • changed state from "resolved" to "open"

Let's' add a test case with a malformed model.config to confirm that it doesn't crash.

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


  • set assignee_account_id to "557058:155a32e2-420c-4d50-98e0-0e722f63f906"
  • set assignee to "jrivero (Bitbucket: jrivero, GitHub: j-rivero)"

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


pull request #327, thanks Dominic for the report and the workaround.

My plan is to role a patch version of sdformat4 as soon as we get the PR merged.

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


  • changed state from "open" to "resolved"

version 4.3.1 is in the repo. Please reopen if the issue still persists for you.

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant