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

clone cv_ptr->image before set queued_image #526

Merged
merged 1 commit into from
May 6, 2020

Conversation

k-okada
Copy link
Contributor

@k-okada k-okada commented May 6, 2020

This fixes #498 (comment), image_view segfaults on version 1.14.0 of 18.04 , and it works on 1.13.0.

The is because that #479 convert image_view node to use nodelet codes, which changes image_view processing.
And gdb output is as follows. I am not quite sure what is the exact reason, but at least. This PR fixes on my environment.

Thread 23 "image_view" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa4411700 (LWP 15650)]
0x00007fffdc04c220 in cvConvertImage ()
   from /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2
(gdb) where
    at /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2
    at /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2
    at /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2
    at /home/k-okada/catkin_ws/ws_recognition/devel/lib//libimage_view.so
    at /home/k-okada/catkin_ws/ws_recognition/devel/lib//libimage_view.so
    at /home/k-okada/catkin_ws/ws_recognition/devel/lib//libimage_view.so

you can check with launch file follows:

<launch>
  <node pkg="image_publisher" type="image_publisher"
        name="image_publisher"
        args="$(find rviz)/images/splash.png" />

  <!-- node -->
  <node pkg="image_view" type="image_view"
        name="image_view" >
    <remap from="image" to="/image_publisher/image_raw" />
  </node>

  <!-- nodelet -->
  <node pkg="nodelet" type="nodelet"
        name="nodelet_image_view"
        args="standalone image_view/image" >
    <remap from="image" to="/image_publisher/image_raw" />
  </node>

@SteveMacenski SteveMacenski merged commit 7bb4544 into ros-perception:melodic May 6, 2020
@SteveMacenski
Copy link
Member

SteveMacenski commented May 6, 2020

Thanks!

JWhitleyWork pushed a commit that referenced this pull request May 13, 2020
* Fix import path on camera_calibrator.py (#509)

* clone cv_ptr->image before set queued_image (#526)

Co-authored-by: Gonçalo Camelo Neves Pereira <goncalo_pereira@outlook.pt>
Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp>
wep21 pushed a commit to wep21/image_pipeline that referenced this pull request Oct 17, 2021
…-perception#528)

* Fix import path on camera_calibrator.py (ros-perception#509)

* clone cv_ptr->image before set queued_image (ros-perception#526)

Co-authored-by: Gonçalo Camelo Neves Pereira <goncalo_pereira@outlook.pt>
Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp>
JWhitleyWork pushed a commit that referenced this pull request Nov 11, 2021
* Fix import path on camera_calibrator.py (#509)

* clone cv_ptr->image before set queued_image (#526)

Co-authored-by: Gonçalo Camelo Neves Pereira <goncalo_pereira@outlook.pt>
Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp>
JWhitleyWork pushed a commit that referenced this pull request Apr 14, 2022
* Fix import path on camera_calibrator.py (#509)

* clone cv_ptr->image before set queued_image (#526)

Co-authored-by: Gonçalo Camelo Neves Pereira <goncalo_pereira@outlook.pt>
Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp>
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.

Image view seg faults on raw images
2 participants