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

Lidar unit test segfaults on Homebrew #4

Closed
osrf-migration opened this issue Mar 12, 2019 · 2 comments
Closed

Lidar unit test segfaults on Homebrew #4

osrf-migration opened this issue Mar 12, 2019 · 2 comments
Assignees
Labels
bug Something isn't working macOS macOS support major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Javier Iván Choclin (Bitbucket: Javier Choclin).


Description

Lidar unit test segfaults on Homebrew.

Expected behavior:

It shouldn't be an issue since Lidar is a class that should be used with GPU and CPU lidar.

Actual behavior:

There is a segfault when the unit test is run.

5: Test command: /Users/jenkins/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/build/bin/UNIT_Lidar_TEST "--gtest_output=xml:/Users/jenkins/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/build/test_results/UNIT_Lidar_TEST.xml"
5: Test timeout computed to be: 240
5: [==========] Running 1 test from 1 test case.
5: [----------] Global test environment set-up.
5: [----------] 1 test from Lidar_TEST
5: [ RUN      ] Lidar_TEST.CreateLaser
5: [Err] [Manager.hh:111] SDF sensor type does not match template type
5: /Users/jenkins/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/ign-sensors/src/Lidar_TEST.cc:127: Failure
5: Value of: sensor != nullptr
5:   Actual: false
5: Expected: true
 5/14 Test  #5: UNIT_Lidar_TEST .............................***Exception: SegFault  0.10 sec

Reproduces how often:

On every Jenkins run.

Versions

Ignition sensors 1

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 15, 2020
@chapulina chapulina added the macOS macOS support label Jul 24, 2020
@scpeters scpeters self-assigned this Oct 9, 2020
@scpeters
Copy link
Member

scpeters commented Oct 9, 2020

@mjcarroll I'd like to look into this; I think I remember you mentioning that you had investigated it before? Let me know if you have any debugging tips.

scpeters added a commit to scpeters/ign-sensors that referenced this issue Nov 10, 2020
This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

Signed-off-by: Steve Peters <[email protected]>
@scpeters
Copy link
Member

fix in #60

scpeters added a commit to scpeters/ign-sensors that referenced this issue Nov 19, 2020
* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <[email protected]>
scpeters added a commit to scpeters/ign-sensors that referenced this issue Nov 20, 2020
* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <[email protected]>
azeey pushed a commit to azeey/gz-sensors that referenced this issue Feb 18, 2021
* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <[email protected]>
azeey pushed a commit to azeey/gz-sensors that referenced this issue Feb 18, 2021
Fix macOS/windows tests that failed to load library (gazebosim#60)

* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <[email protected]>
azeey pushed a commit that referenced this issue Feb 18, 2021
Fix macOS/windows tests that failed to load library (#60)

* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes #4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <[email protected]>
chapulina added a commit that referenced this issue Mar 18, 2021
* Prepare fo 3.2.0 release (#94)

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Backport #60 from ign-sensors4

Fix macOS/windows tests that failed to load library (#60)

* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes #4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <[email protected]>

* 👩‍🌾 Clear Windows warnings (backport #58) (#102)

Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Alejandro Hernández Cordero <[email protected]>

* Master branch updates (#106)

Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS macOS support major
Projects
None yet
Development

No branches or pull requests

3 participants