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 when subscribing to gazebo topics #300

Closed
ljburtz opened this issue Jul 2, 2020 · 5 comments
Closed

Segmentation fault when subscribing to gazebo topics #300

ljburtz opened this issue Jul 2, 2020 · 5 comments

Comments

@ljburtz
Copy link

ljburtz commented Jul 2, 2020

Hello and thanks for this great program.
I have an issue plotting data from gazebo9.

Issue A: Seg fault when subscribing to the live gazebo simulation

Segmentation fault (Address not mapped to object [(nil)])

Subscribing to gazebo topics leads very quickly (few seconds) to a segmentation fault / core dumped : attached log
plot_juggler_fromSource.log
plot_juggler_debianPackage.log
(the logs are lauching Plotjuggler with a layout but Plot juggler also crashes if I just start it without any cli arguments and then manually choose the topics)

Issue B: Seg fault when subscribing to a rosbag made from the gazebo simulation:

  • I recorded the ROS messages : recording started before launching plotjuggler, recording stopped after plotjugler crashed. (attached as .bag).

segfault_2020-07-02-12-08-07bag.zip

  • Then shutdown gazebo.
  • Then restart roscore.
  • Then rosbag play -l segfault_2020-07-02-12-08-07.bag.
  • Then launch plotjuggler: (for example with this layout: plotjuggler_groundruth_xml.zip)

There is no crash like in issue A.
But after a while (several minutes) there is the same seg fault and error output as reported in #93
(I am also using XY plot of messages in the same topic).
log attached:
plot_juggler_XYsame_topic.log
throw std::runtime_error("X and Y axis don't share the same time axis");

I could not reproduce the issues with datasamples/example.bag
I wonder if there is a race condition caused by the messages being published at very high hz and bw by gazebo.

Environment:

  • Using v2.8.1 compiled from source / master branch (latest commit: 6364f73)
  • Ubuntu 18 / ros melodic / gazebo9 from debian packages
  • Debian package ros-melodic-ros-type-introspection is already the newest version (2.0.4-1bionic.20200530.015709)

Please let me know if this is a known issue.

Otherwise I'll be happy to provide more info / explore more simplified configurations to make it easier to reproduce. I'm not sure whether it's related to gazebo.

@ljburtz
Copy link
Author

ljburtz commented Jul 2, 2020

update about issue B:
I could also reproduce it with the .bag from issue #93
(after ~5 minutes in rosbag play loop mode)
The layout xml of issue #93 is from a version of Plotjuggler that's too old. So I used this one (xy_layout_new.xml) with random topics plotted in XY
reproduceIssue93.zip

@ljburtz
Copy link
Author

ljburtz commented Jul 2, 2020

update about issue A :
It works great with the AppImage ! No seg fault with the topics from gazebo or any that I tested so far.

So maybe some library dependency is skewed on my system?

@facontidavide
Copy link
Owner

I will investigate

@facontidavide
Copy link
Owner

facontidavide commented Jul 7, 2020

I think I solved issue A. can you try the last version on master?

EDIT: I haven't been able to reproduce B, but the more I think about it, more I believe that A and B were caused by the same issue that the last commit should have solved (thread safety).

And INDEED, it is the same problem as #93 (plugin were rewritten)

@ljburtz
Copy link
Author

ljburtz commented Jul 8, 2020

Fantastic thanks for the fast fix. I've tested the latest version on master: no more issue. Happy to close the ticket!

@ljburtz ljburtz closed this as completed Jul 8, 2020
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

No branches or pull requests

2 participants