gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.21k stars 484 forks source link

Silent crash when using MovableText::Load() #3302

Open tonydangct opened 1 year ago

tonydangct commented 1 year ago

Environment

Description

I am trying to use the MovableText class to display text in my gazebo simulation. My code looks as follows:

auto text_ptr = new gazebo::rendering::MovableText;
text_ptr->Load("model", "sample_text", "Arial", 1.0, ignition::math::Color::Green);

The code crashes (silently) when trying to load the object:

[ERROR] [gzclient-16]: process has died [pid 166166, exit code -11, cmd 'gzclient --verbose <path_to_world>'].

After inspecting the source code, the exact line where it crashes is here: https://github.com/gazebosim/gazebo-classic/blob/ba78508ca453f6b75d5a99939d6e3e8883b5bd15/gazebo/rendering/MovableText.cc#L207 which led me to this (old) Ogre related issue: https://forums.ogre3d.org/viewtopic.php?t=84010. If this is indeed the issue, it should be an easy fix.

Steps to reproduce

Try out the piece of code I added above.

scpeters commented 1 year ago

Thank you for the bug report. Where did you add that code? Is it in a plugin or a modification of the code in gzclient?