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

Segfault when running rviz_qt on OS X related to QTimer::stop (ros-pkg ticket #5286) #459

Closed
hershwg opened this issue Sep 19, 2012 · 1 comment
Labels

Comments

@hershwg
Copy link
Member

hershwg commented Sep 19, 2012

When running rviz_qt on OS X it segfaults with (from gdb):

{{{
................ done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
[ INFO] [1323569573.780456000]: rviz revision number 1.6.7
[ INFO] [1323569573.780533000]: ogre_tools revision number 1.6.2
[ INFO] [1323569573.780553000]: compiled against OGRE version 1.7.3 (Cthugha)
[ INFO] [1323569573.796513000]: Loading general config from [/Users/william/.rviz_qt/config]
Config file '/Users/william/.rviz_qt/config' could not be opened for reading.
[ INFO] [1323569573.796662000]: Loading display config from [/Users/william/.rviz_qt/display_config]
Config file '/Users/william/.rviz_qt/display_config' could not be opened for reading.
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
[ERROR] [1323569574.096676000]: Caught exception while loading: OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library RenderSystem_GL. System Error: dlopen(/Users/william/devel/vis_exp/visualization_experimental/rviz_qt/bin/Contents/Plugins//RenderSystem_GL.dylib, 9): image not found in DynLib::load at /Users/william/ros/visualization_common/ogre/build/ogre_src_v1-7-3/OgreMain/src/OgreDynLib.cpp (line 91)

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000040
0x00000001031b6d68 in QObject::killTimer ()
(gdb) bt
#0 0x00000001031b6d68 in QObject::killTimer ()
#1 0x00000001031c1379 in QTimer::stop ()
#2 0x0000000101d6a2aa in rviz::VisualizerApp::~VisualizerApp (this=0x7fff5fbff168) at visualizer_app.cpp:210
#3 0x0000000101d6a275 in rviz::VisualizerApp::~VisualizerApp (this=0x7fff5fbff168) at visualizer_app.cpp:209
#4 0x000000010000e229 in main (argc=1, argv=0x7fff5fbff208) at main.cpp:47

(gdb)
}}}

I fixed this with the patch:

{{{
diff -r 830568a7d2a9 rviz_qt/src/rviz/visualizer_app.cpp
--- a/rviz_qt/src/rviz/visualizer_app.cpp Fri Dec 09 14:07:11 2011 -0800
+++ b/rviz_qt/src/rviz/visualizer_app.cpp Sat Dec 10 20:24:30 2011 -0600
@@ -207,7 +207,6 @@

VisualizerApp::~VisualizerApp()
{

  • timer_->stop();
    continue_ = false;

raise(SIGQUIT);
}}}

This just keeps it from segfaulting, there is still the ogre exception to deal with that causes it to close immediately. Also, I don't know why calling stop on the timer crashes, I also tried wrapping it with:

{{{
if (timer_ != NULL && timer_->isActive() && this != NULL) {
timer_->stop();
}
}}}

But that had no effect.

Patch is for visualization_experimental 830568a7d2a9.

trac data:

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[hersh] Fixed in rev 192. Problem was timer_ member was not being initialized to NULL and the exception happened before it was initialized with a proper value.

@hershwg hershwg closed this as completed Sep 19, 2012
seanyen pushed a commit to seanyen/rviz that referenced this issue Oct 7, 2019
* Fix material definition

The shader was incomplete: Without declaring textures,
of the texture is assumed to be 2d, which is incompatible
with the fragment shader sampler1d variable.

Previously, this did not manifest at all because no texture
units were assigned while now they may be

* Fix error in Map display

Previously the old texture was replaced but not rebound.
Now we only delete the texture when actually binding it to
the shader unit state

* Cleanup includes (delete unused and order alphabetically)

* Do not set position when transform invalid

This might cause problems because Ogre vectors are not initialised

* Add necessary algorithms include for std::copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant