-
Notifications
You must be signed in to change notification settings - Fork 42
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
Crash with stack trace gz::common::absPath #614
Comments
https://github.com/gazebosim/gz-common/blob/gz-common5/src/Filesystem.cc#L136 std::string common::absPath(const std::string &_path)
{
return fs::absolute(_path).string();
} The root cause seems to be here, no empty check for _path, or shall it be fixed in the gz-sim repository? https://github.com/gazebosim/gz-sim/blob/gz-sim8/src/ServerPrivate.cc#L489 bool ServerPrivate::ResourcePathsResolveService(
const msgs::StringMsg &_req,
msgs::StringMsg &_res)
{
// Get the request
std::string req = _req.data();
// return false for empty req?
// Handle the case where the request is already a valid path
if (common::exists(common::absPath(req)))
{
_res.set_data(common::absPath(req));
return true;
}
...
} |
Thanks for bringing this up. It should probably be updated to use the Lines 91 to 99 in 1ffd6ef
|
@zhileiren are you interested in working on this? Can I assign it to you? |
Sure I'm interested. I've not contributed to the gazebo repository before, but if it's appropriate, I would like to try filing a pull request fixing this issue. |
Thanks! I've assigned the issue to you. Let me know if you need help with creating the pull request. |
Environment
source build
gz-sim version: 5641ef2cc7bed13e06892d29ffd3663b2f172e76
gz-common version: 1ffd6ef
built with
gcc version: 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
build options: -DCMAKE_BUILD_TYPE=Coverage
Description
Steps to reproduce:
Output
a.log
The text was updated successfully, but these errors were encountered: