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

Fix duplicate vertex program name crash #3161

Merged
merged 1 commit into from
Jan 19, 2022
Merged

Fix duplicate vertex program name crash #3161

merged 1 commit into from
Jan 19, 2022

Conversation

Ace314159
Copy link
Contributor

I'm on Windows 10, using Ogre 1.12.9.

On launch, Gazebo crashes due to the following error, which I found in the logs:

[D:\vcpkg\buildtrees\gazebo11\src\gazebo\server_main.cc:57] Ogre Error:Ogre::ItemIdentityException::ItemIdentityException: HighLevelGpuProgram with the name shadow_caster_vp_glsl already exists. in ResourceManager::add at D:\vcpkg\buildtrees\ogre\src\OgreMain\src\OgreResourceManager.cpp (line 149)

I was able to determine that it started occurring after #3051. However, the file causing the issue was changed because it couldn't find the vertex program with that name, brought up here.

In order to fix both issues, I renamed the vertex program to be unique. This fixes my crash, but I'm not familiar with Ogre and how it handles shaders, so I'm not sure if it'll fix the original issue as well. I'm assuming if the CI looks good, it means it worked? If there's a better way to address this issue, I'm happy to do that as well.

@WilliamLewww
Copy link
Contributor

This should work fine because the program still directs to the correct vertex program source:
https://github.com/osrf/gazebo/blob/ea2e1075b1132d509e5b368c7751f75a937f7103/media/materials/scripts/shadow_caster_ignore_heightmap.program#L3

@scpeters scpeters merged commit 382dcc3 into gazebosim:gazebo11 Jan 19, 2022
scpeters added a commit to scpeters/gazebo that referenced this pull request Jan 19, 2022
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
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

Successfully merging this pull request may close these issues.

None yet

3 participants