PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.83k stars 4.6k forks source link

[visualizer] fatal IO error 11 #5008

Closed AdamDamn closed 2 years ago

AdamDamn commented 2 years ago

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server "" after 99 requests (99 known processed) with 0 events remaining.

The compiling and linking both succeeded. But when program runs and the visualizer shows the point cloud, the window will just flash back. The error reported is as above.

Does anyone know how to solve it? Thanks!

mvieth commented 2 years ago

What operating system do you use? What PCL version? What program are you trying to run? If it is a self-written program, at least post a snippet of the code where the visualization happens. There are many reports of this problem, maybe you find a solution somewhere there: https://www.google.com/search?q=XIO%3A+fatal+IO+error+11+(Resource+temporarily+unavailable)+on+X+server

AdamDamn commented 2 years ago

What operating system do you use? What PCL version? What program are you trying to run? If it is a self-written program, at least post a snippet of the code where the visualization happens. There are many reports of this problem, maybe you find a solution somewhere there: https://www.google.com/search?q=XIO%3A+fatal+IO+error+11+(Resource+temporarily+unavailable)+on+X+server

Thank you my friend! I have solved the problem. I re-install a new version of pcl-1.11 and vtk-7.1 instead of pcl-12.1 and vtk-9.1, and the visual tools work well again. The problem could be something related to my Nvidia drive when using vtk9.1 or pcl-12.1.

vebjornjr commented 2 years ago

Hello, @mvieth.

I have the same problem. I installed PCL with vcpkg + cmake.

Error message: XIO: fatal IO error 11 (Resource temporarily unavailable) on X server "p3r�U" after 88 requests (88 known processed) with 0 events remaining.

My system information: Nvidia Jetson AGX Xavier Developer Kit Ubuntu 18.04 PCL 1.12.0 VTK 9.0.3

Example code:

#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/visualization/pcl_visualizer.h>

#include <thread>

int main() {

    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);

    // Fill in the cloud data
    cloud->width = 5;
    cloud->height = 1;
    cloud->is_dense = false;
    cloud->resize(cloud->width * cloud->height);

    for (auto& point : *cloud) {
        point.x = 1024 * rand() / (RAND_MAX + 1.0f);
        point.y = 1024 * rand() / (RAND_MAX + 1.0f);
        point.z = 1024 * rand() / (RAND_MAX + 1.0f);
    }

    pcl::io::savePCDFileASCII("test_pcd.pcd", *cloud);

    std::cerr << "Saved " << cloud->size() << " data points to test_pcd.pcd." << std::endl;

    for (const auto& point : *cloud) {
        std::cerr << "    " << point.x << " " << point.y << " " << point.z << std::endl;
    }

    pcl::visualization::PCLVisualizer visualization("LidarVisualizer");

    visualization.initCameraParameters();

    visualization.addPointCloud<pcl::PointXYZ>(cloud);

    while (true) {
        using namespace std::chrono_literals;
        std::this_thread::sleep_for(500ms);
        visualization.spinOnce(1);
    }

    return 0;
}