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

Cannot instantiate more than one Ogre2SelectionBuffer #664

Closed
hidmic opened this issue Jul 8, 2022 · 0 comments
Closed

Cannot instantiate more than one Ogre2SelectionBuffer #664

hidmic opened this issue Jul 8, 2022 · 0 comments
Labels
bug Something isn't working MBARI-LRAUV Sponsored by MBARI-LRAUV project: https://github.com/osrf/lrauv

Comments

@hidmic
Copy link
Contributor

hidmic commented Jul 8, 2022

Environment

  • OS Version: Ubuntu 20.04
  • Source build using main branch @ 67ee5db
  • Rendering engine: Ogre2

Description

  • Expected behavior: multiple selection buffers can be instantiated, either directly or indirectly (e.g. through a RayQuery).
  • Actual behavior: as soon as as second selection buffer is instantiated, Ogre2 aborts complaining about memory residency.

Steps to reproduce

I came across this issue when trying to instantiate two custom rendering sensors, as implemented in https://github.com/osrf/lrauv/blob/main/lrauv_ignition_plugins/src/DopplerVelocityLog.cc. Naturally, I'm unable to craft a minimal example or test that reproduces the error. I suspect it has to do with multiple selection buffers being instantiated at once in the same rendering loop iteration.

Either way, and for the record:

  1. Build https://github.com/osrf/lrauv from source

  2. Start a (paused) Gazebosim simulation e.g.:

    gz sim -v4 empty_environment_with_tiles.sdf
    
  3. Spawn a tethys LRAUV at a 50m depth.

  4. Spawn a daphne LRAUV at a 50m depth.

  5. Unpause the simulation.

  6. Subscribe tethys' DVL output:

    LRAUV_example_dvl_velocity tethys
    
  7. Subscribe daphne' DVL output:

    LRAUV_example_dvl_velocity daphne
    

Output

Backtrace
gz sim server: /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/OgreMain/src/OgreTextureGpu.cpp:175: void Ogre::TextureGpu::setResolution(Ogre::uint32, Ogre::uint32, Ogre::uint32):
 Assertion `mResidencyStatus == GpuResidency::OnStorage || isRenderWindowSpecific()' failed.
Stack trace (most recent call last) in thread 104609:
#21   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#20   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f56ef96f292, in clone
#19   Object "/usr/lib/x86_64-linux-gnu/libpthread.so.0", at 0x7f56ef833608, in
#18   Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f56ebc52de3, in
#17   Object ".../install/lib/gz-sim-7/plugins/libgz-sim-sensors-system.so", at 0x7f56bd35a54f, in gz::sim::v7::systems::SensorsPrivate::RenderThread()
#16   Object ".../install/lib/gz-sim-7/plugins/libgz-sim-sensors-system.so", at 0x7f56bd359b60, in gz::sim::v7::systems::SensorsPrivate::RunOnce()
#15   Object ".../install/lib/libDopplerVelocityLogSystem.so", at 0x7f56bc7e684a, in std::_Function_handler<void (), std::_Bind<void (tethys::DopplerVeloc
ityLogSystemPrivate::*(tethys::DopplerVelocityLogSystemPrivate*))()> >::_M_invoke(std::_Any_data const&)
#14   Object ".../install/lib/libDopplerVelocityLogSystem.so", at 0x7f56bc7ef4cc, in void std::_Bind<void (tethys::DopplerVelocityLogSystemPrivate::*(teth
ys::DopplerVelocityLogSystemPrivate*))()>::operator()<, void>()
#13   Object ".../install/lib/libDopplerVelocityLogSystem.so", at 0x7f56bc7f9d1e, in void std::_Bind<void (tethys::DopplerVelocityLogSystemPrivate::*(teth
ys::DopplerVelocityLogSystemPrivate*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>)
#12   Object ".../install/lib/libDopplerVelocityLogSystem.so", at 0x7f56bc80352e, in std::__invoke_result<void (tethys::DopplerVelocityLogSystemPrivate::*
&)(), tethys::DopplerVelocityLogSystemPrivate*&>::type std::__invoke<void (tethys::DopplerVelocityLogSystemPrivate::*&)(), tethys::DopplerVelocityLogSystemPrivate*&>(void (tethys::Dop
plerVelocityLogSystemPrivate::*&)(), tethys::DopplerVelocityLogSystemPrivate*&)
#11   Object ".../install/lib/libDopplerVelocityLogSystem.so", at 0x7f56bc80c19b, in void std::__invoke_impl<void, void (tethys::DopplerVelocityLogSystem$
rivate::*&)(), tethys::DopplerVelocityLogSystemPrivate*&>(std::__invoke_memfun_deref, void (tethys::DopplerVelocityLogSystemPrivate::*&)(), tethys::DopplerVelocityLogSystemPrivate*&)
#10   Object ".../install/lib/libDopplerVelocityLogSystem.so", at 0x7f56bc7d88f9, in tethys::DopplerVelocityLogSystemPrivate::OnPostRender()
#9    Object ".../install/lib/libDopplerVelocityLog.so", at 0x7f56bc56ac45, in tethys::DopplerVelocityLog::PostUpdate(std::chrono::duration<long, std::rat
io<1l, 1000000000l> > const&)
#8    Object ".../install/lib/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0x7f569e12f465, in gz::rendering::v7::Ogre2Camera::VisualAt(gz::
math::v7::Vector2<int> const&)
#7    Object ".../install/lib/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0x7f569e12e3db, in gz::rendering::v7::Ogre2Camera::SetSelectionB
uffer()
#6    Object ".../install/lib/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0x7f569e1ddfef, in gz::rendering::v7::Ogre2SelectionBuffer::Ogre
2SelectionBuffer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<gz::rendering::v7::Ogre2Scene>, unsigned int, unsigned int)
#5    Object ".../install/lib/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0x7f569e1dcca9, in gz::rendering::v7::Ogre2SelectionBuffer::Crea
teRTTBuffer()
#4    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7f569ddb219f, in Ogre::TextureGpu::setResolution(unsigned int, unsigned int, unsigned int)
#3    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f56ef883f35, in __assert_fail
#2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f56ef872728, in
#1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f56ef872858, in abort
#0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f56ef89318b, in gsignal
@hidmic hidmic added bug Something isn't working MBARI-LRAUV Sponsored by MBARI-LRAUV project: https://github.com/osrf/lrauv labels Jul 8, 2022
@iche033 iche033 closed this as completed Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MBARI-LRAUV Sponsored by MBARI-LRAUV project: https://github.com/osrf/lrauv
Projects
Archived in project
Development

No branches or pull requests

2 participants