Skip to content

Rendering heightmaps in systems with only integrated GPU crashes Ogre2 #3479

@16stelter

Description

@16stelter

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build?
    • binary, gz-sim 8.10.0
  • If this is a GUI or sensor rendering bug, describe your GPU and rendering system. Otherwise delete this section.
    • Rendering plugin: ogre2

      • Sensor rendering error.
      • GUI rendering error.
    • EGL headless mode:

      • Running in EGL headless mode
    • Generally, mention all circumstances that might affect rendering capabilities:

      • running on a dual GPU machine (integrated GPU + discrete GPU)
      • running on a multi-GPU machine (it has multiple discrete GPUs)
      • running on real hardware
      • running in virtual machine
      • running in Docker/Singularity
      • running remotely (e.g. via SSH)
      • running in a cloud
      • using VirtualGL, XVFB, Xdummy, XVNC or other indirect rendering utilities
      • GPU is concurrently used for other tasks
        • desktop acceleration
        • video decoding (i.e. a playing Youtube video)
        • video encoding
        • CUDA/ROCm computations (Tensorflow, Torch, Caffe running)
        • multiple simulators running at the same time
      • other...
    • Rendering system info:

      • On Linux, provide the outputs of the following commands:
        LANG=C lspci -nn | grep VGA  # might require installing pciutils
        c3:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev dd)
        echo "$DISPLAY"
        :0
        LANG=C glxinfo -B | grep -i '\(direct rendering\|opengl\|profile\)'  # might require installing mesa-utils package
        direct rendering: Yes
            Preferred profile: core (0x1)
            Max core profile version: 4.6
            Max compat profile version: 4.6
            Max GLES1 profile version: 1.1
            Max GLES[23] profile version: 3.2
        OpenGL vendor string: AMD
        OpenGL renderer string: AMD Radeon 780M Graphics (radeonsi, phoenix, LLVM 20.1.2, DRM 3.64, 6.17.0-20-generic)
        OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.2.8-0ubuntu0.24.04.1
        OpenGL core profile shading language version string: 4.60
        OpenGL core profile context flags: (none)
        OpenGL core profile profile mask: core profile
        OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.1
        OpenGL shading language version string: 4.60
        OpenGL context flags: (none)
        OpenGL profile mask: compatibility profile
        OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.2.8-0ubuntu0.24.04.1
        OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
        ps aux | grep Xorg
        sebasti+  124873  0.0  0.0   9496  2444 pts/5    S+   14:45   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox --exclude-dir=.venv --exclude-dir=venv Xorg
        sudo env LANG=C X -version  # if you don't have root access, try to tell the version of Xorg e.g. via package manager
        X.Org X Server 1.21.1.11
        X Protocol Version 11, Revision 0
        Current Operating System: Linux T14s 6.17.0-20-generic #20~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 01:28:37 UTC 2 x86_64
        Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.17.0-20-generic root=UUID=92f7996a-1d75-41db-91b4-2decee2cfecb ro quiet splash vt.handoff=7
        xorg-server 2:21.1.12-1ubuntu1.5 (For technical support please see http://www.ubuntu.com/support) 
        Current version of pixman: 0.42.2
            Before reporting problems, check http://wiki.x.org
            to make sure that you have the latest version. 
      • On Windows, run dxdiag and report the GPU-related information.
      • On Mac OS, open a terminal and type system_profiler SPDisplaysDataType. Copy the output here.
    • Please, attach the ogre.log or ogre2.log file from ~/.gz/rendering

      [ogre2.log](https://github.com/user-attachments/files/26677249/ogre2.log)
      

`

Details
[gazebo-1] [Wrn] [Ogre2Camera.cc:423] Ogre2Camera::SetVisibilityMask: Mask bits c0000000 are set but will be ignored as they conflict with the reserved bits used internally by the ogre2 backend.
[gazebo-1] [Wrn] [RenderPassSystem.cc:54] RenderPass of typeid 'N2gz9rendering2v814DistortionPassE' is not registered
[gazebo-1] [Wrn] [ImageBrownDistortionModel.cc:112] ImageBrownDistortionModel is not supported in ogre2
[gazebo-1] terminate called after throwing an instance of 'Ogre::RenderingAPIException'
[gazebo-1]   what():  OGRE EXCEPTION(3:RenderingAPIException): Fragment Program 700000000PixelShader_ps failed to compile. See compile log above for details. in GLSLShader::compile at ./.obj-x86_64-linux-gnu/gz_ogre_next_vendor-prefix/src/gz_ogre_next_vendor/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp (line 361)
[gazebo-1] Stack trace (most recent call last) in thread 126557:
[gazebo-1] #30   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
[gazebo-1] #29   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305ccf29c6b, in 
[gazebo-1] #28   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce9caa3, in 
[gazebo-1] #27   Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7eecdb3, in 
[gazebo-1] #26   Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/libgz-sim-sensors-system.so", at 0x7305a7b3fcff, in gz::sim::v8::systems::SensorsPrivate::RenderThread()
[gazebo-1] #25   Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/libgz-sim-sensors-system.so", at 0x7305a7b3f27b, in gz::sim::v8::systems::SensorsPrivate::RunOnce()
[gazebo-1] #24   Object "/opt/ros/jazzy/opt/gz_sensors_vendor/lib/libgz-sensors8.so.8", at 0x7305a728a03e, in gz::sensors::v8::Manager::RunOnce(std::chrono::duration<long, std::ratio<1l, 1000000000l> > const&, bool)
[gazebo-1] #23   Object "/opt/ros/jazzy/opt/gz_sensors_vendor/lib/libgz-sensors8.so.8", at 0x7305a7289f5b, in gz::sensors::v8::Sensor::Update(std::chrono::duration<long, std::ratio<1l, 1000000000l> > const&, bool)
[gazebo-1] #22   Object "/opt/ros/jazzy/opt/gz_sensors_vendor/lib/libgz-sensors8-camera.so.8", at 0x7305a72bce19, in gz::sensors::v8::CameraSensor::Update(std::chrono::duration<long, std::ratio<1l, 1000000000l> > const&)
[gazebo-1] #21   Object "/opt/ros/jazzy/opt/gz_sensors_vendor/lib/libgz-sensors8-rendering.so.8", at 0x7305a72a1ac5, in gz::sensors::v8::RenderingSensor::Render()
[gazebo-1] #20   Object "/opt/ros/jazzy/opt/gz_rendering_vendor/lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so", at 0x73059760e00d, in gz::rendering::v8::Ogre2RenderTarget::Render()
[gazebo-1] #19   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x73059724c4c3, in Ogre::CompositorWorkspace::_update(bool)
[gazebo-1] #18   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x73059723cb35, in Ogre::CompositorNode::_update(Ogre::Camera const*, Ogre::SceneManager*)
[gazebo-1] #17   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x730597257fb8, in Ogre::CompositorPassScene::execute(Ogre::Camera const*)
[gazebo-1] #16   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x730596fb52fb, in Ogre::Camera::_renderScenePhase02(Ogre::Camera const*, unsigned char, unsigned char, bool)
[gazebo-1] #15   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x7305971537c2, in Ogre::SceneManager::_renderPhase02(Ogre::Camera*, Ogre::Camera const*, unsigned char, unsigned char, bool)
[gazebo-1] #14   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x73059710f504, in Ogre::RenderQueue::render(Ogre::RenderSystem*, unsigned char, unsigned char, bool, bool)
[gazebo-1] #13   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextMain.so.2.3.3", at 0x73059710e01e, in Ogre::RenderQueue::renderGL3(Ogre::RenderSystem*, bool, bool, Ogre::HlmsCache*, Ogre::RenderQueue::RenderQueueGroup const&, Ogre::IndirectBufferPacked*, unsigned char*, unsigned char*)
[gazebo-1] #12   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/libOgreNextHlmsPbs.so.2.3.3", at 0x7305a435b8f4, in Ogre::HlmsPbs::createShaderCacheEntry(unsigned int, Ogre::HlmsCache const&, unsigned int, Ogre::QueuedRenderable const&)
[gazebo-1] #11   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/OGRE-Next/RenderSystem_GL3Plus.so", at 0x73057c58c400, in Ogre::GLSLMonolithicProgramManager::getActiveMonolithicProgram()
[gazebo-1] #10   Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/OGRE-Next/RenderSystem_GL3Plus.so", at 0x73057c590f9d, in Ogre::GLSLMonolithicProgram::activate()
[gazebo-1] #9    Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/OGRE-Next/RenderSystem_GL3Plus.so", at 0x73057c590905, in Ogre::GLSLMonolithicProgram::compileAndLink()
[gazebo-1] #8    Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/OGRE-Next/RenderSystem_GL3Plus.so", at 0x73057c5970c4, in Ogre::GLSLShader::compile(bool)
[gazebo-1] #7    Object "/opt/ros/jazzy/opt/gz_ogre_next_vendor/lib/OGRE-Next/RenderSystem_GL3Plus.so", at 0x73057c580dc6, in 
[gazebo-1] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ebb390, in __cxa_throw
[gazebo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ea5a54, in std::terminate()
[gazebo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ebb0d9, in 
[gazebo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ea5ff4, in 
[gazebo-1] #2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce288fe, in abort
[gazebo-1] #1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce4527d, in gsignal
[gazebo-1] #0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce9eb2c, in pthread_kill
[gazebo-1] Aborted (Signal sent by tkill() 126501 1000)
[gazebo-1] [GUI] [Wrn] [Application.cc:908] [QT] Qt has caught an exception thrown from an event handler. Throwing
[gazebo-1] exceptions from an event handler is not supported in Qt.
[gazebo-1] You must not let any exception whatsoever propagate through Qt code.
[gazebo-1] If that is not possible, in Qt 5 you must at least reimplement
[gazebo-1] QCoreApplication::notify() and catch all exceptions there.
[gazebo-1] 
[gazebo-1] terminate called after throwing an instance of 'Ogre::RenderingAPIException'
[gazebo-1]   what():  OGRE EXCEPTION(3:RenderingAPIException): Fragment Program 700000000PixelShader_ps failed to compile. See compile log above for details. in GLSLShader::compile at ./.obj-x86_64-linux-gnu/gz_ogre_next_vendor-prefix/src/gz_ogre_next_vendor/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp (line 361)
[gazebo-1] Stack trace (most recent call last) in thread 126648:
[gazebo-1] #10   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
[gazebo-1] #9    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305ccf29c6b, in 
[gazebo-1] #8    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce9caa3, in 
[gazebo-1] #7    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7305c5c920a6, in 
[gazebo-1] #6    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7305c5c90242, in qTerminate()
[gazebo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ea5a54, in std::terminate()
[gazebo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ebb0d9, in 
[gazebo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7305c7ea5ff4, in 
[gazebo-1] #2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce288fe, in abort
[gazebo-1] #1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce4527d, in gsignal
[gazebo-1] #0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7305cce9eb2c, in pthread_kill
[gazebo-1] Aborted (Signal sent by tkill() 126502 1000)
[INFO] [gazebo-1]: process has finished cleanly [pid 126411]

Description

  • Expected behavior: gz does not crash
  • Actual behavior: gz crashes. This only happens for visual heightmap elements, collision heightmaps work correctly.

Steps to reproduce

  1. Create a sdf world containing a heightmap visual element
  2. Start the simulation

Output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions