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

[image_nodelet] change destroyWindow() to destroyAllWindows() #816

Merged
merged 1 commit into from
May 24, 2023

Conversation

nakane11
Copy link

@nakane11 nakane11 commented May 19, 2023

When image_view window is closed wirh "x" button, cv::Exception is thrown and the node cannot successfully be killed:

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.2.0) ../modules/highgui/src/window_gtk.cpp:1260: error: (-215:Assertion failed) found && "Can't destroy non-registered window" in function 'cvDestroyWindow'

[image_view00-5] process has died [pid 3148875, exit code -6, cmd /home/nakane/ros/catkin_ws/devel/lib/image_view/image_view image:=tile_image_2x1/output __name:=image_view00 __log:=/home/nakane/.ros/log/20230517-160130_a69074d6-f480-11ed-9b90-0b32d9e34b63/image_view00-5.log].

I replaced cv::destroyWindow(window_name_) with cv::destroyAllWindows() to avoid destroying windows that no longer exist.

@JWhitleyWork JWhitleyWork merged commit 9488475 into ros-perception:noetic May 24, 2023
2 checks passed
@nakane11 nakane11 deleted the destroy-window branch May 24, 2023 11:18
mikeferguson added a commit to mikeferguson/image_pipeline that referenced this pull request Jan 19, 2024
ahcorde pushed a commit that referenced this pull request Jan 19, 2024
This ports #816 to ROS 2 and prevents weird exit conditions if you
already closed the window
ahcorde pushed a commit that referenced this pull request Jan 19, 2024
This ports #816 to ROS 2 and prevents weird exit conditions if you
already closed the window
ahcorde pushed a commit that referenced this pull request Jan 19, 2024
This ports #816 to ROS 2 and prevents weird exit conditions if you
already closed the window
mikeferguson added a commit that referenced this pull request Jan 19, 2024
This ports #816 to ROS 2 and prevents weird exit conditions if you
already closed the window

backport #863

Co-authored-by: Michael Ferguson <mfergs7@gmail.com>
mikeferguson added a commit that referenced this pull request Jan 19, 2024
This ports #816 to ROS 2 and prevents weird exit conditions if you
already closed the window

backport #863

Co-authored-by: Michael Ferguson <mfergs7@gmail.com>
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

2 participants