Topic 3 Example 4.1: Image is not displayed

The Error Log in Console 3:

user@rosds_computer:~$ . /home/user/.bashrc_ros2
user@rosds_computer:~$ ros2 run image_tools showimage
Right after init
Creating window
After creating window
AFter creating node
Right before defining callback
Subscribing to topic ‘image’
[INFO] [showimage]: Subscribing to topic ‘image’
Spinning
[INFO] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [showimage]: Received image #camera_link
Received image #camera_link

(showimage:10022): Gdk-ERROR **: 19:16:54.122: The program ‘showimage’ received an X Window System error.
This probably reflects a bug in the program.
The error was ‘BadAccess (attempt to access private resource denied)’.
(Details: serial 256 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

Hello Jan,

I’ve been checking this error for a while and I’ve finally been able to solve it. I will push the fix to Production during today. Thanks for your feedback!

Best,