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

VoxelGrid::filter crash in VS2017 #1949

Closed
feliwir opened this issue Jul 24, 2017 · 16 comments
Closed

VoxelGrid::filter crash in VS2017 #1949

feliwir opened this issue Jul 24, 2017 · 16 comments

Comments

@feliwir
Copy link

feliwir commented Jul 24, 2017

Hey, PCL 1.8.1rc2 is crashing for me with VS2017 Win64 Debug. It doesn't happen in Release
The crash seems to occur in filter.h when the output_temp variable goes out of scope:

        if (input_.get () == &output)  // cloud_in = cloud_out
        {
          PointCloud output_temp;
          applyFilter (output_temp);
          output_temp.header = input_->header;
          output_temp.sensor_origin_ = input_->sensor_origin_;
          output_temp.sensor_orientation_ = input_->sensor_orientation_;
          pcl::copyPointCloud (output_temp, output);
        }

When diving deeper into the code it seems that std::free is crashing somewhere in Memory.h

The code to reproduce this issue is the following:

  pcl::PointCloud<pcl::PointNormal>::Ptr cloud(new  pcl::PointCloud<pcl::PointNormal>());
  cloud->push_back(pcl::PointNormal());
  pcl::VoxelGrid<pcl::PointNormal> grid;
  grid.setLeafSize(0.005, 0.005, 0.005);
  grid.setInputCloud(cloud);
  grid.filter(*cloud);

Maybe someone can test that code and confirm that it crashes in the same configuration. Thanks

@feliwir
Copy link
Author

feliwir commented Jul 24, 2017

this seems somewhat related to pcl::copyPointCloud and smart pointers i also get a crash with that when not using filter

@SergioRAgostinho
Copy link
Member

Can you provide a self contained final stripped down example?

@SergioRAgostinho SergioRAgostinho added this to the pcl-1.8.1 milestone Jul 24, 2017
@feliwir
Copy link
Author

feliwir commented Jul 25, 2017

The sample code i gave in the first post is a minimal example of a crash

@SergioRAgostinho
Copy link
Member

What is PointNT on that snippet?

@feliwir
Copy link
Author

feliwir commented Jul 25, 2017

Ah forgot to replace that. Its a typedef to pcl::PointNormal

@UnaNancyOwen
Copy link
Member

Can you provide full source code and input data for reproduce this problem? I will test it.

@SergioRAgostinho
Copy link
Member

The second code snippet should be enough @UnaNancyOwen. It's self contained.

@UnaNancyOwen
Copy link
Member

UnaNancyOwen commented Jul 27, 2017

I tried it, but it ran successfully. It didn't crash on my environment.
@feliwir Please tell me your compiler version. If your compiler version is old, Please update and retry. I confirmed it at 19.10.25019.0.

@feliwir
Copy link
Author

feliwir commented Jul 28, 2017

@UnaNancyOwen as mentioned in the first post i use: Visual Studio 2017 in x64 with Debug. That's also the only configuration i'm crashing with. I am using pcl 1.8.1 rc2, Binaries were download here from github releases

@UnaNancyOwen
Copy link
Member

@feliwir Sorry, my question was insufficient.
I suspect a bug in the compiler of old version.
Visual Studio 2017 has been published several updates.
(The latest version is Update 2.)
If your compiler version is old, Please update and retry.

https://docs.microsoft.com/en-us/visualstudio/install/update-visual-studio

Please check the C++ compiler version of Visual Studio 2017.
It will be displayed on output area when first time configure using CMake.

The CXX compiler identification is MSVC 19.10.25019.0

Or, Please tell me the IDE version of Visual Studio 2017.
You can check it from [Help]>[About Microsoft Visual Studio].

Microsoft Visual Studio Enterprise 2017
Version 15.2 (26430.6) Release

@feliwir
Copy link
Author

feliwir commented Jul 28, 2017

Here is my version:

Microsoft Visual Studio Community 2017
Version 15.2 (26430.16) Release

@UnaNancyOwen
Copy link
Member

UnaNancyOwen commented Jul 28, 2017

@feliwir I updated Visual Studio to the same version as you. And I was retry it, but it works successfully.
Can you reconfigure the development environments and try it again? (from regenerate your own project using CMake.)

@taketwo taketwo mentioned this issue Jul 29, 2017
15 tasks
@SergioRAgostinho
Copy link
Member

It's been almost a week since the last ping. I propose ignore this for now and move with the release.

@feliwir if you have any more feedback to provide, now it's definitely the time, otherwise this will be moved to another release milestone.

@UnaNancyOwen
Copy link
Member

UnaNancyOwen commented Aug 3, 2017

@SergioRAgostinho I think that's fine. We should release 1.8.1.

@UnaNancyOwen
Copy link
Member

UnaNancyOwen commented Aug 7, 2017

@feliwir We change milestone of this issue to pcl-1.9.0 in order to release PCL 1.8.1.
We ask for your continued report. Thanks,

@UnaNancyOwen UnaNancyOwen modified the milestones: pcl-1.9.0, pcl-1.8.1 Aug 7, 2017
@SergioRAgostinho
Copy link
Member

I'm closing this for now. I have the impression it might be another manifestation of incorrect SSE flags being passed between the compiled PCL and the downstream target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants