Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

OSX gzclient crashes when loading heightmaps #828

Closed
osrf-migration opened this issue Sep 8, 2013 · 15 comments
Closed

OSX gzclient crashes when loading heightmaps #828

osrf-migration opened this issue Sep 8, 2013 · 15 comments
Labels
all bug Something isn't working major os::osx

Comments

@osrf-migration
Copy link

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


In one terminal:

$ gzserver worlds/heightmap.world

In the next terminal:

$ gzclient
Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
...
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

libc++abi.dylib: terminate called throwing an exception
Abort trap: 6
@osrf-migration
Copy link
Author

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


This is preventing DEM's from working on OS X as well (see #1063).

@osrf-migration
Copy link
Author

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


I got a little more info from the console about the failure:

libc++abi.dylib: terminating with uncaught exception of type Ogre::Exception: OGRE 
EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a 
compile error. in GpuProgramParameters::_findNamedConstantDefinition at 
/tmp/ogre-wLLoLh/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)

@osrf-migration
Copy link
Author

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


@iche033 maybe you can give me some advice about this? I think it's an ogre problem. Here's the ogre formula we're using.

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


this looks like a shader compilation issue. I'll need to take a look at it on my osx and see what which script is failing

@osrf-migration
Copy link
Author

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


Here's my ogre.log

@osrf-migration
Copy link
Author

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


There's one glsl compiler error that is fixed with the following:

diff -r ae3980f4bfa24a543e5ee8b6cf7b58ba1d1335e0 media/materials/scripts/glsl120.program
--- a/media/materials/scripts/glsl120.program	Mon Feb 02 11:00:12 2015 -0800
+++ b/media/materials/scripts/glsl120.program	Mon Feb 02 13:30:03 2015 -0800
@@ -15,6 +15,6 @@
     param_named Scale float2 0.3 0.3
     param_named ScaleIn float2 2.0 2.0
     param_named HmdWarpParam float4 1.0 0.22 0.24 0.0
-    param_named ChromAbParam float4 0.996, -0.004, 1.014, 0
+    param_named ChromAbParam float4 0.996 -0.004 1.014 0.0
   }
 }

but the rest of the errors refer to version '130' is not supported. This sounds like an OpenGL compatibility issue. There's some discussion on stack overflow, but I'm still googling it.

@osrf-migration
Copy link
Author

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


I know OS X supports later versions of OpenGL, but I see the following in my glxinfo:

OpenGL version string: 2.1 NVIDIA-10.2.1 310.41.15f01
OpenGL shading language version string: 1.20

@osrf-migration
Copy link
Author

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


There seems to be an answer here:

http://stackoverflow.com/questions/19865463/opengl-4-1-under-mavericks/19868861#19868861

@osrf-migration
Copy link
Author

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


Maybe this is fixed in ogre 1.9. If so, we could try to upgrade the ogre formula.

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


did some digging into this, looks like the XQuartz on OSX is limited to opengl 2.1 and doesn't support 3.2+ profile. Gazebo requires version 130 shaders to create heightmaps which is not available in 2.1.

We could try:

  • downgrading gazebo heightmap shaders to version 120 and see if it still works,

  • or find out if unstable development version of XQuartz supports opengl 3.2 or not.

@osrf-migration
Copy link
Author

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


I found a comment from Nov 2012 that matches what you said. Have their been any updates since then? Is glfw relevant?

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


not sure if glfw will help here.

I ported the heightmap shader code to version 120 in heightmap_osx_4.1 branch. Initial version working after changes in 9c4ac29, just need to tidy up the code and put in some ifdefs for osx.

@osrf-migration
Copy link
Author

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


  • changed state from "new" to "resolved"

pull request #1455

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • set version to "all"

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "resolved" to "closed"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
all bug Something isn't working major os::osx
Projects
None yet
Development

No branches or pull requests

1 participant